Add Wan segmented checkpointing support - #2959
Merged
bghira merged 2 commits intoAug 3, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Wan-family (Wan + WanS2V) integration points for segmented gradient checkpointing, aligning these models with the shared segmented-checkpointing runtime introduced in the stacked base branch.
Changes:
- Added Wan and WanS2V to the segmented-checkpointing capability test suite.
- Extended Wan transformer implementation with segmented checkpointing support, FFN-only checkpointing plumbing, and optional attention activation offload scoping.
- Updated training safety-check allow-lists to recognize
wanandwan_s2vfor interval/stride controls (andwanfor attention activation offload).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/test_segmented_checkpointing_model_support.py | Adds Wan/WanS2V capability assertions for segmented checkpointing controls. |
| simpletuner/helpers/training/default_settings/safety_check.py | Allows Wan/WanS2V families through safety gates for segmented checkpointing interval/stride (and Wan for attention offload). |
| simpletuner/helpers/models/wan/transformer.py | Implements segmented checkpointing execution path and adds FFN checkpoint + attention offload scope support flags/controls. |
| simpletuner/helpers/models/wan_s2v/transformer.py | Wires interval/stride-aware block checkpoint selection and aligns some attention/rotary-embedding handling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| offload=False, | ||
| ffn=False, | ||
| attention_offload=False, | ||
| ) |
bghira
force-pushed
the
agent/segmented-checkpointing-wan
branch
from
August 3, 2026 10:33
2afe350 to
03b4e90
Compare
bghira
force-pushed
the
agent/segmented-checkpointing-wan
branch
from
August 3, 2026 10:45
03b4e90 to
b071e7f
Compare
bghira
force-pushed
the
agent/segmented-checkpointing-wan
branch
from
August 3, 2026 15:30
b071e7f to
5dd9e18
Compare
bghira
force-pushed
the
agent/segmented-checkpointing-wan
branch
from
August 3, 2026 15:32
5dd9e18 to
3d5d449
Compare
bghira
force-pushed
the
agent/segmented-checkpointing-wan
branch
from
August 3, 2026 15:33
3d5d449 to
b2d16aa
Compare
bghira
force-pushed
the
agent/segmented-checkpointing-wan
branch
from
August 3, 2026 15:35
b2d16aa to
4088ddc
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
Splits the Wan segmented checkpointing support model integration out of #2925.
Stack
Base branch:
agent/segmented-checkpointing-stable-cascadeValidation
.venv/bin/python -m unittest tests.test_segmented_checkpointing_model_support -v