fix qwenimage mask ordering, tensor images, layered output, vae clamp, and exports#14147
Open
akshan-main wants to merge 1 commit into
Open
fix qwenimage mask ordering, tensor images, layered output, vae clamp, and exports#14147akshan-main wants to merge 1 commit into
akshan-main wants to merge 1 commit into
Conversation
Contributor
|
Hi @akshan-main, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. |
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.
What does this PR do?
Part of #13581 (qwenimage review). Fixes six of the findings:
num_images_per_prompt > 1paired attention masks with the wrong prompt:prompt_embedsexpanded to[p0, p0, p1, p1]but the mask to[p0, p1, p0, p1]. Both now userepeat_interleave(the embeds tensor is unchanged, only the mask alignment is fixed).imageinputs crashed onimage.size(a method onTensor, not a tuple) before preprocessing, in the edit / edit-inpaint / edit-plus / layered pipelines and the modular encoder. Now read the shape for tensors.QwenImageLayeredPipeline(output_type="latent")returned an undefinedimages(the latent branch assignedimage), so it raised instead of returning latents.zero_cond_tdoubledtimestepbut notadditional_t_cond, so batch > 1 mismatched in the time embedding. Now both are doubled.[-1, 1]clamp that plain decode applies, so tiling shifted the output range. Now clamped, matching_decodeand the Wan VAE.__init__lazily exportedQwenImagePriorReduxPipelineOutputandReduxImageEncoder, neither of which exists here (Redux is a Flux feature), so importing the subpackage failed. Removed.The guidance-path finding is a dead code path (nothing sets
guidance_embeds), and the test-coverage finding is tracked separately as issue 8 of #13581.Fixes #13581
Part of the huge #13656 take over
Before submitting
Who can review?
@yiyixuxu