Skip to content

Fix Matrix-Game-2 VAE decoding#78

Draft
Arison591 wants to merge 1 commit into
SkyworkAI:mainfrom
Arison591:agent/fix-matrix-game2-vae-decode
Draft

Fix Matrix-Game-2 VAE decoding#78
Arison591 wants to merge 1 commit into
SkyworkAI:mainfrom
Arison591:agent/fix-matrix-game2-vae-decode

Conversation

@Arison591

Copy link
Copy Markdown

Summary

  • iterate over the latent batch passed to WanVAEWrapper.decode_to_pixel
  • restore both regular and cached Matrix-Game-2 VAE decoding

Root cause and impact

decode_to_pixel accepts a tensor named latent, but the decode loop referenced an undefined variable named zs. Both decode paths therefore raised NameError before any generated latent could be converted back to video pixels.

Validation

  • python -m ruff check Matrix-Game-2/utils/wan_wrapper.py --select F821,F822,F823
  • RTX 5090 CUDA regression with a synthetic VAE covering:
    • regular decoding with a batch of two latents
    • cached decoding with a single latent
    • output shape, CUDA device, float32 conversion, and [-1, 1] clamping
    • the existing cached-decode batch-size assertion

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.

1 participant