Add opt-in low-VRAM mode for Wan generation - #9462
Open
JPPhoto wants to merge 3 commits into
Open
Conversation
JPPhoto
requested review from
Pfannkuchensack,
dunkeroni and
lstein
as code owners
August 5, 2026 00:25
JPPhoto
force-pushed
the
wan-memory-optimization
branch
2 times, most recently
from
August 5, 2026 16:21
2a6af17 to
ce2ccc1
Compare
JPPhoto
force-pushed
the
wan-memory-optimization
branch
from
August 5, 2026 17:49
ce2ccc1 to
a25ef93
Compare
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.
Summary
Adds an opt-in Wan memory optimization mode:
The option defaults to
false.When enabled, Invoke:
This applies to Wan image and video denoise, including dual-expert A14B models.
The main tradeoff is speed: aggressive weight streaming can make generation substantially slower and requires enough system RAM for offloaded weights. Spatially tiled VAE decode retains its existing path.
Related Issues / Discussions
Related design reference: #9460.
QA Instructions
Add this setting to
invokeai.yaml:Restart Invoke.
Run Wan image and video generation with representative configurations:
Confirm the log contains:
Confirm the model-cache log reports substantially reduced resident transformer weights and peak VRAM is lower.
Confirm generated videos have the expected dimensions, frame count, duration, and playback.
Repeat with
wan_memory_optimization: falseand confirm existing behavior is unchanged.Merge Plan
Checklist
What's Newcopy (if doing a release after this PR)