Add Qwen Image segmented checkpointing support - #2954
Merged
bghira merged 1 commit intoAug 3, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Qwen Image’s transformer to the segmented gradient checkpointing support surface so it can participate in the shared checkpoint-interval/segment-stride runtime introduced in the base PR stack.
Changes:
- Adds a Qwen Image coverage test ensuring the model exposes the expected segmented checkpointing control hooks.
- Extends safety-check allow-lists so
qwen_imagecan use--gradient_checkpointing_intervaland--gradient_checkpointing_segment_stride. - Updates
QwenImageTransformer2DModelto store/apply interval + segment stride and to useshould_checkpoint_block(...)during the block loop (including recognizingunsloth*backends).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/test_segmented_checkpointing_model_support.py | Adds a Qwen Image capability coverage test for interval + segment stride hooks. |
| simpletuner/helpers/training/default_settings/safety_check.py | Allows qwen_image to use interval and segment-stride checkpointing flags. |
| simpletuner/helpers/models/qwen_image/transformer.py | Implements interval/segment-stride checkpoint decision logic and backend handling for Qwen Image blocks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bghira
force-pushed
the
agent/segmented-checkpointing-qwen-image
branch
from
August 3, 2026 10:45
036fec2 to
a0115dc
Compare
bghira
force-pushed
the
agent/segmented-checkpointing-qwen-image
branch
from
August 3, 2026 15:30
a0115dc to
595d2d6
Compare
bghira
force-pushed
the
agent/segmented-checkpointing-qwen-image
branch
from
August 3, 2026 15:32
595d2d6 to
c4c55db
Compare
bghira
force-pushed
the
agent/segmented-checkpointing-qwen-image
branch
from
August 3, 2026 15:33
c4c55db to
5a32f39
Compare
bghira
force-pushed
the
agent/segmented-checkpointing-qwen-image
branch
from
August 3, 2026 15:35
5a32f39 to
7cd94e4
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 Qwen Image segmented checkpointing support model integration out of #2925.
Stack
Base branch:
agent/segmented-checkpointing-pixartValidation
.venv/bin/python -m unittest tests.test_segmented_checkpointing_model_support -v