Skip to content

Fix missing raise for unsupported Qwen25_vl quant scheme - #1768

Open
kayaal34 wants to merge 1 commit into
ModelTC:mainfrom
kayaal34:fix/qwen25-missing-raise
Open

kayaal34 wants to merge 1 commit into
ModelTC:mainfrom
kayaal34:fix/qwen25-missing-raise

Conversation

@kayaal34

Copy link
Copy Markdown

What was wrong

In load_text_encoder (hunyuan15 Qwen25 text encoder), the final else branch for an unsupported text_encoder_quant_scheme constructs NotImplementedError(...) but never raises it. The exception object is discarded, linear_cls is never assigned, and the next line replace_linear(text_encoder.layers, linear_cls) fails with an unrelated UnboundLocalError, hiding the actual "Unsupported Qwen25_vl quant scheme" message.

Fix

Add the missing raise.

How it was checked

  • Found with ruff (PLW0133, useless exception statement); confirmed by reading the surrounding code.
  • python -m py_compile on the file.
  • I did not run the model or any tests.

I used Claude (an AI assistant) to help with this change; I reviewed it and ran the check(s) above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant