fix qwen2vl preprocess

Former-commit-id: 52ddd42b7d2ae9e1aa08c15fd5c13ddad96f1b74
This commit is contained in:
hiyouga
2024-09-09 22:33:33 +08:00
parent dfff411e1a
commit 7a3ba5a25d
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