fix wan i2v num_videos batching, vace latent trim, config scale factors, processor config, modular dtype#14170
Open
akshan-main wants to merge 3 commits into
Open
fix wan i2v num_videos batching, vace latent trim, config scale factors, processor config, modular dtype#14170akshan-main wants to merge 3 commits into
akshan-main wants to merge 3 commits into
Conversation
…rs, processor config, modular dtype
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 #13578 (wan review). Same families of issues as the qwenimage review:
WanImageToVideoPipelineconditioning batching:image_embedswas repeated bybatch_sizeonly (notnum_videos_per_prompt) while the latents reachbatch_size * num_videos_per_prompt, sonum_videos_per_prompt > 1failed the transformer concat; and list image inputs (a documentedPipelineImageInputtype) were rejected incheck_inputs. Nowcheck_inputsaccepts lists, and bothimage_embedsand the conditioning latents expand from a single image or a per-prompt list up to the effective batch. The first+last-frame path keeps its two-frame layout.WanVACEPipeline(output_type="latent"): the decode path trims the prepended reference latents but the latent path returned them untrimmed, so latent output carried extra frames. The trim now runs before the branch.WanVACEPipeline,WanVideoToVideoPipeline, and the modular Wan pipeline derived scale factors fromlen(vae.temperal_downsample)and a hardcoded spatial8instead ofvae.config.scale_factor_spatial/scale_factor_temporal. Now read from config, matching the baseWanPipeline.WanAnimateImageProcessor.__init__acceptedvae_scale_factor/vae_latent_channels/resampleetc. but calledsuper().__init__()with no args, so the base re-registered defaults over the subclass config. Now forwards them.WanTextInputStepderivedblock_state.dtypefromprompt_embeds.dtype; the denoise blocks cast scheduler timesteps to it, losing precision on bf16/fp16 paths. Now usestransformer.dtype, matching the comment.Before submitting
Who can review?
@yiyixuxu