Skip to content

Avoid unused VAE and routing allocations in Wan I2V training - #3412

Merged
bghira merged 1 commit into
mainfrom
fix/issue-3373-norm-memory
Nov 21, 2026
Merged

bghira merged 1 commit into
mainfrom
fix/issue-3373-norm-memory

Conversation

@bghira

@bghira bghira commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Closes #3373.

Reuse the temporal compression stride recorded when loading Wan's preprocessing VAE. First-frame conditioning from cached latents can then build its mask after the VAE has been unloaded. Skip the full-sequence importance calculation when TREAD selects tokens randomly.

Validation

  • Both bundled Wan 2.2 I2V A14B TREAD presets completed 100 steps on a single H100 80 GB with crop disabled on current main.
  • The High preset completed a three-step H100 run with this follow-up patch, with peak sampled GPU memory about 272 MiB lower.
  • Ran 172 targeted tests with one CUDA-only skip. The routing regression checks seeded masks and the Wan regression checks reuse of a custom temporal stride after unloading the VAE.

@bghira
bghira merged commit 4c2518b into main Nov 21, 2026
2 checks passed
@bghira
bghira deleted the fix/issue-3373-norm-memory branch November 21, 2026 20:38
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.

Wan 2.2 I2V A14B TREAD High and Low single-GPU presets OOM on H100 80 GB

1 participant