Skip to content

Add Boogu Image segmented checkpointing support - #2935

Merged
bghira merged 2 commits into
agent/segmented-checkpointing-auraflowfrom
agent/segmented-checkpointing-boogu-image
Aug 3, 2026
Merged

Add Boogu Image segmented checkpointing support#2935
bghira merged 2 commits into
agent/segmented-checkpointing-auraflowfrom
agent/segmented-checkpointing-boogu-image

Conversation

@bghira

@bghira bghira commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

Splits the Boogu Image 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-auraflow

Validation

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

@bghira
bghira force-pushed the agent/segmented-checkpointing-boogu-image branch from da6d8e8 to ae6544a Compare August 3, 2026 08:50
@bghira
bghira requested a review from Copilot August 3, 2026 08:51
@bghira
bghira marked this pull request as ready for review August 3, 2026 08:52

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 segmented gradient-checkpointing support for the Boogu Image transformer family by wiring interval/segment-stride knobs into the model and enabling the corresponding safety-check allow-lists, with targeted unit tests to validate the new controls and an autograd safety regression.

Changes:

  • Add gradient_checkpointing_interval / gradient_checkpointing_segment_stride state + setters to BooguImageTransformer2DModel, and use should_checkpoint_block() to decide per-layer checkpointing.
  • Allow-list boogu_image for interval + segmented stride in safety_check.
  • Add unit tests covering checkpointing-control surface area and a regression test ensuring img_patch_embed_and_refine() is safe with custom autograd outputs.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
tests/test_segmented_checkpointing_model_support.py Adds a Boogu Image capability test to ensure interval/stride controls are exposed.
tests/test_boogu_image_model.py Adds a regression test ensuring patch-embed/refine remains autograd-safe after layout writes.
simpletuner/helpers/training/default_settings/safety_check.py Adds boogu_image to checkpointing interval + segment-stride allow-lists.
simpletuner/helpers/models/boogu_image/transformer.py Implements interval/stride checkpointing decisions and adds cloning around embedder outputs.

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

Comment thread simpletuner/helpers/models/boogu_image/transformer.py Outdated
Comment thread simpletuner/helpers/models/boogu_image/transformer.py Outdated
@bghira
bghira force-pushed the agent/segmented-checkpointing-boogu-image branch from ae6544a to 6417e20 Compare August 3, 2026 09:02
@bghira
bghira force-pushed the agent/segmented-checkpointing-boogu-image branch from 4131112 to 265863e Compare August 3, 2026 10:45
@bghira
bghira force-pushed the agent/segmented-checkpointing-boogu-image branch from 265863e to 98c820c Compare August 3, 2026 15:30
@bghira
bghira force-pushed the agent/segmented-checkpointing-boogu-image branch from 98c820c to cec1c1a Compare August 3, 2026 15:32
@bghira
bghira merged commit 7dfe469 into main Aug 3, 2026
2 checks passed
@bghira
bghira deleted the agent/segmented-checkpointing-boogu-image branch August 3, 2026 15:38
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