Skip to content

feat: support vae for wan2.2#1447

Open
ethan686 wants to merge 5 commits into
jd-opensource:mainfrom
ethan686:wan22_push_vae
Open

feat: support vae for wan2.2#1447
ethan686 wants to merge 5 commits into
jd-opensource:mainfrom
ethan686:wan22_push_vae

Conversation

@ethan686
Copy link
Copy Markdown
Contributor

  1. vae still has very small percision loss, while after 40 steps without cfg, the percision still can be 99.8% compared with mindiesd.
  2. the current percision is based on the resize mode change, from knearnest to kBicubic; while since there will be new resize method, so this change is not commited now.

ethan686 and others added 2 commits May 14, 2026 09:57
Co-authored-by: bubaishenhua112 <bubaishenhua112@gmail.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the AutoencoderKLWan model and a corresponding VideoProcessor for the Wan2.2 architecture. Key changes include the implementation of various 3D causal convolution blocks, residual blocks, and attention mechanisms for video encoding and decoding. Feedback focuses on several critical bugs, such as uninitialized member variables in WanResidualDownBlockImpl leading to null pointer dereferences, and incorrect index resets for shared pointers in the VAE implementation. Additionally, multiple style guide violations were identified, including the use of TORCH_CHECK instead of CHECK, non-compliant naming for local variables and constants, and the use of std::map where std::unordered_map is preferred.

Comment thread xllm/models/dit/npu/wan2_2/autoencoder_kl_wan.h
Comment thread xllm/models/dit/npu/wan2_2/autoencoder_kl_wan.h Outdated
Comment thread xllm/models/dit/npu/wan2_2/autoencoder_kl_wan.h
Comment thread xllm/models/dit/npu/wan2_2/autoencoder_kl_wan.h
Comment thread xllm/models/dit/npu/wan2_2/autoencoder_kl_wan.h Outdated
Comment thread xllm/models/dit/npu/wan2_2/autoencoder_kl_wan.h
Comment thread xllm/models/dit/npu/wan2_2/autoencoder_kl_wan.h
Comment thread xllm/models/dit/npu/wan2_2/autoencoder_kl_wan.h Outdated
Comment thread xllm/models/dit/npu/wan2_2/video_processor.h Outdated
Comment thread xllm/models/dit/npu/wan2_2/video_processor.h
@ethan686 ethan686 changed the title Wan22 push vae feat: support vae for wan2.2 May 14, 2026
ethan686 and others added 2 commits May 14, 2026 11:02
Co-authored-by: bubaishenhua112 <bubaishenhua112@gmail.com>
XuZhang99
XuZhang99 previously approved these changes May 18, 2026
Copy link
Copy Markdown
Collaborator

@yq33victor yq33victor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants