-
Notifications
You must be signed in to change notification settings - Fork 53
Adding Img2Vid support for WAN 2.1 and WAN 2.2 #306
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
Merged
+2,303
−74
Conversation
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
entrpn
previously approved these changes
Jan 14, 2026
entrpn
approved these changes
Jan 15, 2026
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.
This PR aims to add support for Img 2Vid for WAN 2.1 and WAN 2.2
New Files added:
wan_pipeline_i2v_2p1.py: New file for WAN 2.1 Img2Vidwan_pipeline_i2v_2p2.py: New file for WAN 2.2 Img2Vidwan_checkpointer_i2v_2p1.py: Checkpointer for WAN 2.1 I2Vwan_checkpointer_i2v_2p2.py: Checkpointer for WAN 2.2 I2Vbase_wan_i2v_14b.yml: New config file for WAN 2.1 I2Vbase_wan_i2v_27b.yml: New config file for WAN 2.2 I2VFiles modified:
generate_wan.py: modified to handle new I2V pipelineswan_pipeline.py: modified to handle new I2V pipelineswan_checkpointer.py: modified to handle new I2V pipelinesembeddings_flax.py: Adds a new class NNXWanImageEmbedding for transforming raw image embeddings into a format expected by the transformertransformer_wan.py: it now has an image embedder, which is an instance of NNXWanImageEmbedding and is used to process image embeddingsattention_flax.py:wan_utils.py: Added necessary changes to load image specific keyswan_checkpointer_test.py: added relevant tests for I2VSample runs:
WAN 2.1 I2V:
WAN 2.2 I2V:
Testing other pipelines:
Currently this implementation will support video generation for height = 480, width = 832, model: Wan-AI/Wan2.1-I2V-14B-480P-Diffusers, Wan-AI/Wan2.2-I2V-A14B-Diffusers.
Optimisations needed to support 720x1280 will follow in the upcoming PRs