fix style

This commit is contained in:
BUAADreamer 2024-09-29 21:39:37 +08:00
parent 83abf86657
commit 23916d57c1
1 changed files with 3 additions and 1 deletions

View File

@ -108,7 +108,9 @@ def configure_visual_model(config: "PretrainedConfig") -> None:
Patches VLMs before loading them.
"""
model_type = getattr(config, "model_type", None)
if model_type in ["llava", "video_llava"] or "llava_next" in model_type: # required for ds zero3 and valuehead models
if (
model_type in ["llava", "video_llava"] or "llava_next" in model_type
): # required for ds zero3 and valuehead models
setattr(config, "hidden_size", getattr(config.text_config, "hidden_size", None))
if getattr(config, "is_yi_vl_derived_model", None):