Skip to content

Add Stable Cascade segmented checkpointing support - #2958

Merged
bghira merged 2 commits into
agent/segmented-checkpointing-sd3from
agent/segmented-checkpointing-stable-cascade
Aug 3, 2026
Merged

Add Stable Cascade segmented checkpointing support#2958
bghira merged 2 commits into
agent/segmented-checkpointing-sd3from
agent/segmented-checkpointing-stable-cascade

Conversation

@bghira

@bghira bghira commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

Splits the Stable Cascade segmented checkpointing support model integration out of #2925.

  • applies the model-family checkpointing hooks and support flags
  • adds this family to the relevant safety-check allow-lists
  • keeps the shared runtime/docs in the base PR so this diff stays model-specific

Stack

Base branch: agent/segmented-checkpointing-sd3

Validation

  • .venv/bin/python -m unittest tests.test_segmented_checkpointing_model_support -v
  • .venv/bin/python -m unittest tests.test_stable_cascade_modules -v
  • commit hooks: Black, isort, flake8, whitespace checks

@bghira
bghira requested a review from Copilot August 3, 2026 09:32
@bghira
bghira marked this pull request as ready for review August 3, 2026 09:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Stable Cascade (UNet) support for segmented/interval-based gradient checkpointing controls, aligning this model family with the broader segmented-checkpointing feature set introduced in the base stack branch.

Changes:

  • Adds Stable Cascade UNet hooks to apply interval + segment-stride checkpoint selection via should_checkpoint_block.
  • Extends safety-check allow-lists to permit interval/stride flags for stable_cascade.
  • Adds/extends unit tests covering Stable Cascade checkpoint interval/stride behavior and model-family capability declarations.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/test_stable_cascade_modules.py Adds behavioral unit test verifying which Stable Cascade blocks are checkpointed under interval/stride settings.
tests/test_segmented_checkpointing_model_support.py Registers Stable Cascade in the shared “model supports which controls” test matrix.
simpletuner/helpers/training/default_settings/safety_check.py Adds stable_cascade to the interval + segment-stride supported model allow-lists.
simpletuner/helpers/models/stable_cascade/unet.py Implements interval/stride-aware checkpoint dispatch in Stable Cascade UNet forward path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread simpletuner/helpers/models/stable_cascade/unet.py Outdated
@bghira
bghira force-pushed the agent/segmented-checkpointing-stable-cascade branch from e1c726b to da1e2aa Compare August 3, 2026 10:45
@bghira
bghira force-pushed the agent/segmented-checkpointing-stable-cascade branch from da1e2aa to 041d629 Compare August 3, 2026 15:30
@bghira
bghira force-pushed the agent/segmented-checkpointing-stable-cascade branch from 041d629 to e4733f3 Compare August 3, 2026 15:32
@bghira
bghira force-pushed the agent/segmented-checkpointing-stable-cascade branch from e4733f3 to 3743bfb Compare August 3, 2026 15:33
@bghira
bghira force-pushed the agent/segmented-checkpointing-stable-cascade branch from 3743bfb to 1e28e25 Compare August 3, 2026 15:35
@bghira
bghira merged commit 3504e55 into main Aug 3, 2026
@bghira
bghira deleted the agent/segmented-checkpointing-stable-cascade branch August 3, 2026 15:37
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.

2 participants