Skip to content

Studio: let FLUX.3 Klein edit through the Edit workflow - #15263

Merged
danielhanchen merged 3 commits into
mainfrom
studio-flux3-edit-workflow
Oct 25, 2026
Merged

danielhanchen merged 3 commits into
mainfrom
studio-flux3-edit-workflow

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Fixes #15241

Problem

With FLUX.3 Image Klein loaded, Images > Edit is greyed out. Black Forest Labs ship the model for editing: the model card describes it as "text-to-image generation and image editing", and BFL's own ComfyUI templates (black-forest-labs/flux-3-image-klein-comfy) include i2i and mi2i edit workflows next to t2i. Studio only offered that call under Reference. Reference also renders at the page's size, not the source's, so editing a 16:9 photo with the page at 1:1 gave a square result with the scene extended (noted as a known limit in #14312).

What changes

FLUX.3 Klein (distilled and base) now lists Edit, which runs the same reference call as before: Image 1 is the source, extra images follow in order, and the output size defaults to "Match Image 1".

  • Backend. A new family flag, reference_edit, is set on both FLUX.3 families. The diffusers engine and the native sd.cpp engine add edit to the workflows for those families and accept workflow = "edit", which takes the reference path. The status reports unified_edit: true, so the page shows its existing Edit form (Image 1, Add image 2, Output size). localized_edit_modes stays empty, and localized_edit is still refused for anything but Qwen-Image-2.1.
  • Frontend. The "Ask for a transparent background" button now depends on localized edit modes being available, so it stays on Qwen-Image-2.1 and does not appear for FLUX.3 (RGB VAE). A Localize mode picked on Qwen-Image-2.1 is ignored once a model without that mode is loaded, so it cannot reach a request the backend refuses. "Edit image" from the gallery or Library now opens Edit for FLUX.3 instead of Reference.

Not changed

  • Reference for FLUX.3 runs exactly as before, and so does the Enhance prompt step: the upsampler already picks its i2i prompt whenever images are attached.
  • FLUX.2 klein, Qwen-Image-2.1, Qwen-Image-Edit, Kontext and every other family keep their workflow lists and conditioning fields. The native transparency notes are now gated on unified_edit directly, which matches what they did before.
  • Inpaint, Transform, Extend and Upscale stay disabled for FLUX.3.

Tests

  • test_sd_cpp_flux3.py: the native status lists txt2img, reference, edit, a native edit passes both images to sd.cpp, and localized_edit is refused.
  • test_diffusion_unified_edit.py: _family_workflows and the conditioning fields for both FLUX.3 families, FLUX.2 klein unchanged, and an edit on the diffusers engine hands the pipeline the same images and size as Reference.
  • test_diffusion_flux3.py: both family records carry reference_edit.

Before / after

Fresh Studio installs at the merge base (2c81e9f) and at this branch (50cc980, code-identical to the current head), each with unsloth/flux-3-image-klein-GGUF UD-Q4_K_XL loaded. This host has no GPU, so both loads ran on the native sd.cpp engine.

Before After
Workflows in the status txt2img, reference txt2img, reference, edit
Sidebar Images > Edit disabled enabled, opens the Edit form (Image 1, Output size "Match Image 1"; no Localize, no transparent-background button)
POST /api/inference/images/generate with workflow = "edit" 400: "Image editing is not available for 'flux.3-klein' on the native sd.cpp engine with this build and its assets." 200, one 384x256 image, workflow: edit

Images page with FLUX.3 Klein loaded, before and after

The edit from the last row ("make the yellow circle red", 4 steps, Enhance off):

Source image and the FLUX.3 Klein edit result

@danielhanchen danielhanchen self-assigned this Oct 25, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T23:13:05.920964Z aa4a344 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 50cc980670

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 25, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 25, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: aa4a344fb6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 277bd03 into main Oct 25, 2026
13 of 49 checks passed
@danielhanchen
danielhanchen deleted the studio-flux3-edit-workflow branch October 25, 2026 23:21
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] [macOS] [Desktop] Image edit unavailable with unsloth/flux-3-image-klein-GGUF

1 participant