[data] fix qwen2.5 omni plugin (#7573)

* align key with qwen2vl

* nit && change scripts
This commit is contained in:
Kingsley
2025-04-02 21:28:52 +08:00
committed by GitHub
parent 7b9deb9410
commit d32c6c014d
4 changed files with 47 additions and 6 deletions

View File

@@ -157,7 +157,7 @@ def load_model(
model = load_class.from_config(config, trust_remote_code=model_args.trust_remote_code)
else:
model = load_class.from_pretrained(**init_kwargs)
if load_class is AutoModelForTextToWaveform:
if getattr(model.config, "model_type", None) == "qwen2_5_omni":
model = model.thinker # use part of Omni model
if model_args.mixture_of_depths == "convert":