Add Z-Image segmented checkpointing support - #2960
Merged
bghira merged 2 commits intoAug 3, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Z-Image model-family integration for segmented gradient checkpointing controls introduced in the stacked base PR, including runtime hooks/flags, safety-check allow-listing, and a targeted support test to ensure the model exposes the required checkpointing control surface.
Changes:
- Add Z-Image checkpointing hooks/flags for interval + segment stride, FFN-only checkpointing scope, and attention activation offload in the Z-Image transformer.
- Allow-list
z_imagefor segmented checkpointing and attention activation offload in safety checks. - Extend the segmented-checkpointing model-support test suite to cover
ZImageTransformer2DModel.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/test_segmented_checkpointing_model_support.py | Adds a model-support test asserting Z-Image exposes the expected checkpointing control surface. |
| simpletuner/helpers/training/default_settings/safety_check.py | Allow-lists z_image for segmented checkpointing and attention activation offload safety validation. |
| simpletuner/helpers/models/z_image/transformer.py | Implements interval/stride segmented checkpointing path and attention/FFN boundary hooks for Z-Image. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bghira
force-pushed
the
agent/segmented-checkpointing-z-image
branch
from
August 3, 2026 10:45
d826739 to
f493302
Compare
bghira
force-pushed
the
agent/segmented-checkpointing-z-image
branch
from
August 3, 2026 15:30
f493302 to
a3e96c3
Compare
bghira
force-pushed
the
agent/segmented-checkpointing-z-image
branch
from
August 3, 2026 15:32
a3e96c3 to
8d55441
Compare
bghira
force-pushed
the
agent/segmented-checkpointing-z-image
branch
from
August 3, 2026 15:33
8d55441 to
743aaab
Compare
bghira
force-pushed
the
agent/segmented-checkpointing-z-image
branch
from
August 3, 2026 15:35
743aaab to
b51487d
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 Z-Image segmented checkpointing support model integration out of #2925.
Stack
Base branch:
agent/segmented-checkpointing-wanValidation
.venv/bin/python -m unittest tests.test_segmented_checkpointing_model_support -v