fix style

Former-commit-id: 23916d57c1d22653739dbf913d3e427fcb978a15
This commit is contained in:
BUAADreamer 2024-09-29 21:39:37 +08:00
parent 8e164f3594
commit ddec40ac16

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):