Skip to content

fix: enable segmented execution for FLUX.3 - #2224

Merged
leejet merged 1 commit into
masterfrom
fix/flux3-graph-cuts
Oct 26, 2026
Merged

leejet merged 1 commit into
masterfrom
fix/flux3-graph-cuts

Conversation

@leejet

@leejet leejet commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add graph-cut markers at FLUX.3 mode-block, joint, and single-block boundaries so offloaded weights can be streamed when the full graph exceeds GPU memory.

Related Issue / Discussion

Fixes #2219.

Additional Information

N/A

Checklist

Summary by CodeRabbit

  • Model Execution
    • Updated execution boundaries during model processing. The model’s calculations and processing conditions remain unchanged, so this update does not alter the model’s intended outputs or behavior.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2449be05-7059-4cc6-82c2-e530364d27b8
Commits

Reviewing files that changed from the base of the PR and between e41fbcf and f388ef1.

Files selected for processing: 1
  • src/model/diffusion/flux3.hpp

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

Walkthrough

FLUX.3 forward now marks intermediate per-mode outputs, joint tensors, and single-stream outputs as graph cuts. The model computations and loop conditions remain unchanged.

Changes: FLUX.3 graph-cut markers

Layer / File(s) Summary
Mark intermediate forward outputs
src/model/diffusion/flux3.hpp
forward marks each non-final per-mode block output, each mode’s appended joint tensor, and each single-stream block output as a graph cut.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: noctrex

Merge Risk: Minimal · up to f388e

No concrete merge-blocking issue was found in the graph-cut changes.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: enabling segmented execution for FLUX.3.
Description check Passed The description includes all required sections. It explains the graph-cut changes and purpose, references issue #2219, provides additional information, and completes the checklist.
Linked Issues check Passed Issue #2219 requires graph cuts for FLUX.3 segmented execution. The diff adds cuts after each non-final mode block, after each mode is appended to joint, and after every single block. These changes …
Out of Scope Changes check Passed The pull request changes only src/model/diffusion/flux3.hpp. The changes add the graph-cut markers described by issue #2219. No unrelated implementation or behavior is present in the reviewed diff.
Full details: Linked Issues check

Explanation

Issue #2219 requires graph cuts for FLUX.3 segmented execution. The diff adds cuts after each non-final mode block, after each mode is appended to joint, and after every single block. These changes match the issue's proposed boundaries and target the Q8_0 offload failure. Issue-reported runtime results are not independently verified, but the required code change is present. The issue does not specify an automated test requirement.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@leejet
leejet merged commit be48649 into master Oct 26, 2026
11 checks passed
@leejet
leejet deleted the fix/flux3-graph-cuts branch October 26, 2026 16:48
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.

[Bug] FLUX.3 Image Klein has no graph-cut markers, so its Q8_0 cannot be streamed on a 6 GB card

1 participant