Repository navigation
fix(qwen-image): drop the shadowed dead _get_qwen_prompt_embeds duplicate - #7461
Conversation
QwenImageEditPipeline defines _get_qwen_prompt_embeds twice, so Python binds only the second one. The live call site in encode_prompt passes max_sequence_length= and prompt_name=, which only the second definition accepts -- the first (44-line) copy would raise TypeError if it were ever reached. Remove the unreachable duplicate; no behavior change. Signed-off-by: Anai-Guo <antai12232931@outlook.com>
|
This PR appears to belong to: docs/design/module/diffusion/offloader.md, docs/design/module/diffusion/diffusion_model_integration.md, docs/design/module/diffusion/index.md. Module owners: @wtomin @david6666666 @Isotr0py Routing: @wtomin via module of the changed files, module named in the PR description, CODEOWNERS; @david6666666 via module of the changed files, module named in the PR description; @Isotr0py via module of the changed files, module named in the PR description @Anai-Guo, please review your own changes and leave a short self-review comment describing what you checked. PRs without author self-review may not be assigned a reviewer. Please take a look when you have a chance. If you would like an automated review, mention @vllm-omni-review-bot in a comment. |
NickCao
left a comment
There was a problem hiding this comment.
LGTM, the shadowed first copy is never reachable.
…cate (vllm-project#7461) Signed-off-by: Anai-Guo <antai12232931@outlook.com> Signed-off-by: Matthieu Laneuville <matthieu.laneuville@surf.nl>
…cate (vllm-project#7461) Signed-off-by: Anai-Guo <antai12232931@outlook.com>
Problem
QwenImageEditPipeline._get_qwen_prompt_embedsis defined twice invllm_omni/diffusion/models/qwen_image/pipeline_qwen_image_edit.py. In Pythonthe second
defsilently shadows the first, so the first 44-line copy is deadcode that can never run.
The two definitions are not interchangeable:
The first (dead) copy has signature
(self, prompt, image, dtype)and nosequence-length validation.
The second (live) copy adds
max_sequence_length/prompt_name, callsvalidate_prompt_sequence_lengths(...), and is whatencode_promptactuallyinvokes:
Those keyword arguments only exist on the second definition — the first would
raise
TypeErrorif it were ever bound.Fix
Remove the unreachable first definition. This is a pure no-op at runtime (the
live method is untouched) and drops a latent footgun.
+0 / -45, no behavior change.🤖 Generated with Claude Code