fix qwen2vl preprocess

This commit is contained in:
hiyouga
2024-09-09 22:33:33 +08:00
parent 90d6df6222
commit c93795ae14
2 changed files with 143 additions and 110 deletions

View File

@@ -103,10 +103,6 @@ def load_tokenizer(model_args: "ModelArguments") -> "TokenizerModule":
setattr(processor, "video_resolution", model_args.video_resolution)
setattr(processor, "video_fps", model_args.video_fps)
setattr(processor, "video_maxlen", model_args.video_maxlen)
if getattr(config, "model_type", None) == "qwen2_vl":
setattr(processor, "video_factor", 2)
else:
setattr(processor, "video_factor", 1)
except Exception:
processor = None