-
Notifications
You must be signed in to change notification settings - Fork 200
[Core] Supports stage abstraction in the diffusion model #391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 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 model != "", "Null model id detected, please specify a model id." | ||
| model = omni_snapshot_download(model) | ||
| if args: | ||
| args[0] = model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid assigning to immutable args tuple in Omni init
When Omni is instantiated with the model passed positionally (e.g. Omni("Qwen/Qwen-Image")), the constructor assigns to args[0], but args is a tuple, so the assignment raises TypeError: 'tuple' object does not support item assignment before any initialization occurs. This makes the new entrypoint unusable for positional calls that previously worked with OmniLLM; callers must now pass model as a keyword or hit a hard crash.
Useful? React with 👍 / 👎.
|
looking forward to it |
|
let's get the initial version done before 1230 release |
|
Does this pr support reuse vllm as text encoding stage for diffusion models? |
Not yet. This PR only encapsulates the entire diffusion model into a single stage first. |
| @@ -0,0 +1,36 @@ | |||
| # stage config for running Qwen-Image with diffusion stage type. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have concerns about adding this for diffusion models, as I believe it introduces a significant UX drawback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree
|
Does this PR mean that all models under diffusion folder can be deployed using YAML? |
Through some offline discussions, we decided that this version will not require providing a yaml file for the Diffusion model. Instead, the system will automatically generate a YAML file for the current Diffusion model. |
|
In which group you are discussing? Can you add me? |
|
Fixes #340 |
Signed-off-by: Chenguang ZHENG <[email protected]>
Signed-off-by: Chenguang ZHENG <[email protected]>
Signed-off-by: Chenguang ZHENG <[email protected]>
To align with our initial vision and for future overall optimization, we gradually began to provide Stage abstractions for Diffusion.
[Core] Add Stage Abstraction Support for Diffusion Models
Overview
This PR adds stage abstraction support for the diffusion model component of vLLM-Omni, achieving a consistent architectural design with LLM models. It also includes code refactoring to unify the sampling parameter interface, improving code maintainability and extensibility.
Major Changes
1. Code Refactoring
omni_llm.pyintoomni.py, unifying entry point managementomni_stage.pyto support stage configuration and management for diffusion models2. Diffusion Stage Abstraction Support
omni_sampling_params.py):OmniSamplingParamsclass to uniformly manage sampling parameters for both LLM and diffusion modelsSamplingParamsdiffusion_engine.pyto support stage abstractiongpu_worker.pyQwenImagePipeline.yaml3. Example Updates
text_to_image.pyexample to demonstrate how to use the new stage abstraction interface4. Outputs