Remove Qwen Omni workaround that's no longer necessary (#21057)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor 2025-07-16 17:25:23 +01:00 committed by GitHub
parent a0f8a79646
commit a931b4cdcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -733,13 +733,6 @@ def get_hf_text_config(config: PretrainedConfig):
"""Get the "sub" config relevant to llm for multi modal models.
No op for pure text models.
"""
# This block should be unnecessary after https://github.com/huggingface/transformers/pull/37517
if hasattr(config, "thinker_config"):
# TODO(suyang.fy): Refactor code.
# For Qwen2.5-Omni, change hf_text_config to
# thinker_config.text_config.
return config.thinker_config.text_config
text_config = config.get_text_config()
if text_config is not config: