Conversation
Member
Author
|
Cc: @naykun |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
The changes needed to facilitate CP in QwenImage 2.1 turned out to be more involved than in other models because of its KV caching machinery and how it disentangles the prefilling stage from decoding. The changes present in this PR, IMO, are minimal to accommodate CP in QwenImage 2.1. I am open to other alternatives, too.
Given the above information, one would ask why add CP support in the first place then?
TL;DR: CP enables Qwen-Image 2.1 multi-condition generation on two 24 GB GPUs when the same workload cannot run on one 24 GB GPU, reducing peak transformer-path memory from 26.52 GiB to 18.92 GiB per rank.
It is because when a user has, say, two consumer GPUs like A10G (each having 24 GB of VRAM), they can still perform inference with a reasonably large context window. Consider the below scenario:
Workload:
Script with HF Jobs
Result:
3 input condition images:

(Edit prompt: Combine the subject, setting, composition, and colors from all references into one coherent oil painting)