[New model] Support model qwen image layered#381
[New model] Support model qwen image layered#381hsliuustc0106 merged 1 commit intovllm-project:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| assert requests.resolution in [640, 1024], ( | ||
| f"resolution must be either 640 or 1024, but got {requests.resolution}" | ||
| ) | ||
| calculated_width, calculated_height = calculate_dimensions( | ||
| requests.resolution * requests.resolution, image_size[0] / image_size[1] |
There was a problem hiding this comment.
Use request resolution instead of list attribute
Inside the pre-processing loop the resolution is read from requests rather than the individual req, so the function raises an AttributeError before any request is processed because the list object has no resolution attribute. This prevents the new layered pipeline from calculating dimensions or running at all.
Useful? React with 👍 / 👎.
| temb = ( | ||
| self.time_text_embed(timestep, hidden_states) | ||
| self.time_text_embed(timestep, hidden_states, additional_t_cond) | ||
| if guidance is None | ||
| else self.time_text_embed(timestep, guidance, hidden_states) | ||
| else self.time_text_embed(timestep, guidance, hidden_states, additional_t_cond) |
There was a problem hiding this comment.
Guidance branch calls time embedding with wrong signature
The guidance code path calls self.time_text_embed(timestep, guidance, hidden_states, additional_t_cond), but QwenTimestepProjEmbeddings.forward only accepts (timestep, hidden_states, addition_t_cond=None). When guidance is enabled (e.g., for guidance-distilled models), this path raises a TypeError before any diffusion steps run.
Useful? React with 👍 / 👎.
|
add test ci please |
ZJY0516
left a comment
There was a problem hiding this comment.
please also test if this break qwen-image and qwen-image-edit
vllm_omni/diffusion/models/qwen_image/pipeline_qwen_image_layered.py
Outdated
Show resolved
Hide resolved
vllm_omni/diffusion/models/qwen_image/pipeline_qwen_image_layered.py
Outdated
Show resolved
Hide resolved
59173fe to
607147c
Compare
| @@ -0,0 +1,1054 @@ | |||
| # Copyright 2025 The Qwen-Image Team, Wan Team and The HuggingFace Team. All rights reserved. | |||
There was a problem hiding this comment.
We can import this from diffusers directly
There was a problem hiding this comment.
The modify for image layered in autoencoder_kl_qwenimage.py only in main branch; and current diffusers release version is 0.36
There was a problem hiding this comment.
User should install latest diffusers from source as mentioned in https://huggingface.co/Qwen/Qwen-Image-Layered#quick-start
There was a problem hiding this comment.
shall we leave it for a later PR fixing this?
Signed-off-by: dengyunyang <[email protected]>
607147c to
a2d8c99
Compare
|
add the test result and provide the run example command |
|
Signed-off-by: dengyunyang <[email protected]> Signed-off-by: Didan Deng <[email protected]>
Signed-off-by: dengyunyang <[email protected]> Signed-off-by: wangyu31577 <[email protected]>
Signed-off-by: dengyunyang <[email protected]>
PLEASE FILL IN THE PR DESCRIPTION HERE ENSURING ALL CHECKLIST ITEMS (AT THE BOTTOM) HAVE BEEN CONSIDERED.
Purpose
Support Qwen image Layered model
Run with image_edit.py,parameters of strong correlation are
--color-format "RGBA"and--layers xTest Plan
(1) run with vllm_omni
(2) run with diffusers
(3) Run image edit also success
Test Result
(1) vllm-omni 2-layers

(2) diffusers 2-layers

(3) vllm-omni 3-layers

(4) diffusers 3-layers

Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.BEFORE SUBMITTING, PLEASE READ https://github.com/vllm-project/vllm-omni/blob/main/CONTRIBUTING.md (anything written below this line will be removed by GitHub Actions)