Repository navigation
Studio: FLUX.3 Image Klein (distilled and base), with INT8 / FP8 / GGUF support - #13933
Conversation
Diffusers ships FLUX.3 only as Modular Diffusers blocks and the repos carry modular_model_index.json instead of model_index.json. diffusion_flux3 builds the components per subfolder and puts a DiffusionPipeline face over the modular blocks, so placement, offload, the step callback, cancel and the scheduler swap work the same as for every other family. - flux.3-klein (16 steps, no CFG) and flux.3-klein-base (50 steps, CFG 3.5) families with up to 10 reference images through the reference workflow - download plan reads only transformer/, text_encoder/, vae/ and the modular index (never the root BFL single file or variants/) - the memory plan prices only component-depth weight files - class gate: 0.42.0 minimum (unreleased); listing probes the module file since main and the PR branch report 0.41.0.dev0 - prompt upsampler repo (-pup) is not matched as an image model - defaults, labels, bf16 size table, fixtures
FLUX.3 Image Klein support is open upstream as huggingface/diffusers#15046 (branch flux3-image in huggingface/diffusers, current main plus additive FLUX.3 files). Re-enable diffusers-main.txt at that branch head with its archive digest, the same route Qwen-Image-2.1 used before 0.41.0. A host that cannot fetch it keeps the 0.41.0 release and only FLUX.3 is refused. The pin tests now exercise release mode on a commented-out copy instead of the shipped file, so they hold in either state.
… BFL seeds - each reference image is scaled to 1 megapixel (Lanczos, aspect kept), as ComfyUI's ReferenceMultiLatent ["resize", 1] in the FLUX.3 templates does; diffusers alone only downsizes above 16 megapixels - a seeded, sized request starts from the BFL reference's noise layout, so a Studio seed renders what the BFL CLI renders for it - base defaults to ComfyUI's CFG template (25 steps, CFG 3.5); distilled stays at 16 steps (edit template and BFL; the t2i template's er_sde is not a sampler this backend runs)
…ed memory - FamilyProfile.quant_exclude_tokens: name tokens left dense for every transformer-quant scheme (default empty, other families unchanged). FLUX.3 keeps modulations, timestep embedders, norm_out, the text-stream per-mode blocks and the text projection in bf16. Without it mxfp8 and nvfp4 crash at the first step (stride-0 modulation inputs) and int8 / fp8 lose the most quality. - regional compile and CUDA graphs on for FLUX.3 (measured: no graph breaks, no recompiles across sizes). - single file and GGUF denoisers assemble around the base's modular companions; the block graph follows the loaded denoiser. A GGUF FLUX.3 reports uint8 as transformer.dtype (only fp32-kept QK norms are float), which the denoise block casts the latents to, so the compute dtype is pinned with an empty buffer. - the other variant's checkpoint and BFL's own fp8r / nvfp4 packages are refused up front (the nvfp4 one would decode silently wrong through the ComfyUI NVFP4 loader). - measured activation rows for the distilled checkpoint, and references charged at their measured ~0.7 GiB per megapixel instead of nothing.
…s nvfp4 torchao's MX and NVFP4 activation quantisers assert a contiguous input, so a stride-0 broadcast (an adaLN fed temb.expand(B, S, D)) crashes at the first denoise step. The shared post-quantisation hook now registers a pre-hook on MX / NVFP4 Linears that makes the activation contiguous (a no-op for contiguous inputs), and the scheme smoke probe also runs a stride-0 broadcast, so a missing guard fails the probe instead of the render. Measured on B200: without the guard the probe fails mxfp8 and nvfp4, with it all four schemes pass. FLUX.3 Klein denies nvfp4 (every keep-set measured 0.09-0.12 LPIPS), and references are charged at 0.11 of the flat per-megapixel estimate (about 900 MiB per 1 MP reference with an int8 / fp8 denoiser).
Diffusers main moved to requires-python >= 3.11 (huggingface/diffusers#15030), so the FLUX.3 build cannot install on Python 3.10. Raise the installer's and the startup repair's main-build floor to 3.11 so 3.10 keeps the 0.41.0 release without a clone that can never succeed, and give a 3.10 user a FLUX.3 refusal that names the Python requirement instead of a reinstall.
… assembles the modular pipeline flux.3-klein lists unsloth/flux-3-image-klein-FP8 for int8 and fp8, mirroring flux.2-klein. A GGUF pick with a transformer quant builds through _assemble_pipe, which called from_pretrained on a modular pipeline class and returned a pipe with no transformer; it now assembles FLUX.3 through load_flux3_pipeline.
…eme smoke probe as it was The picker offers unsloth/flux-3-image-klein-GGUF next to the FLUX.2 klein rows. The smoke probe goes back to its zero-row input only; the stride-0 broadcast probe is left for a separate change. The contiguous-input guard on MX / NVFP4 Linears stays, since mxfp8 FLUX.3 needs it to render.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cdb8654487
ℹ️ 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".
| if negative_prompt is not None and not self.is_distilled: | ||
| kwargs["negative_prompt"] = negative_prompt |
There was a problem hiding this comment.
Pair each split prompt with its negative prompt
When FLUX.3 Base receives a mixed-prompt batch with a negative prompt, DiffusionBackend.generate broadcasts the negative into a list matching the batch, while this wrapper splits the positive prompts into separate scalar calls but forwards the entire negative list to every call. The modular CFG encoder therefore receives one positive prompt and multiple negatives, causing a batch-size mismatch or conditioning each output with the wrong batch; select the corresponding negative for each split call.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 816b535. When the call is split, the wrapper now passes negative_prompt[i] to call i. A single-entry list applies to every call, and any other length raises a ValueError naming the count. generate now also sends FLUX.3 one image per call, so it no longer builds a negative list for it. Test: test_split_calls_pair_each_prompt_with_its_own_negative.
| # FLUX.3 is a Modular Diffusers layout: its manifest is modular_model_index.json. | ||
| index_name = FLUX3_INDEX if is_flux3_family(fam) else "model_index.json" | ||
| if not local_pipeline_components_are_complete(local_root, index_name): |
There was a problem hiding this comment.
Accept modular indexes for local FLUX.3 companion bases
This modular-index exception applies only when the selected model itself is a pipeline. A GGUF or single-file FLUX.3 load using a local base_repo reaches the earlier _assert_local_base_is_pipeline call with its default allow_modular=False, so a valid local copy containing modular_model_index.json but no model_index.json is rejected before loading. Pass the FLUX.3 modular allowance to the companion-base validation as well.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 816b535. The companion base check now accepts modular_model_index.json for FLUX.3, so a local base with only the modular index validates for GGUF and single-file loads. Test: test_a_local_modular_base_is_accepted_for_a_gguf_denoiser.
| { match: "flux-3-image-klein-base", steps: 25, guidance: 3.5 }, | ||
| { match: "flux3-klein-base", steps: 25, guidance: 3.5 }, | ||
| { match: "flux-3-image-klein", steps: 16, guidance: 1 }, | ||
| { match: "flux3-klein", steps: 16, guidance: 1 }, |
There was a problem hiding this comment.
Cover the registered flux3-image aliases in UI defaults
The backend registers and assigns recipes to flux3-image-klein and flux3-image-klein-base, but neither spelling matches these frontend entries: separator folding does not turn flux3-image-* into either flux-3-image-* or flux3-klein-*. Selecting a finetune with one of those supported aliases therefore seeds the Create form with the generic 9-step, guidance-0 recipe instead of 16/1 or 25/3.5; add the missing aliases so the frontend and backend resolve the same supported names.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 816b535. Added flux3-image-klein-base (25 steps, CFG 3.5) and flux3-image-klein (16 steps, CFG 1) to the UI defaults, so every alias the backend registers resolves the same way. Covered in image-generation-defaults.test.ts.
…lar local base, aliases - generate runs each FLUX.3 image as its own chunk, so every image gets its own encode / denoise / decode phase and text-encoder release; renders are pixel identical. - The pipeline face pairs a per-image negative prompt list with each split call instead of passing the whole list to every call. - A GGUF / single-file FLUX.3 load accepts a local base with only modular_model_index.json. - text_encoder_files / vae_file are refused for FLUX.3 up front; the supplied-component loader needs a model_index.json and was not used. - The UI defaults cover the flux3-image-klein aliases the backend registers. [skip ci]
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 816b5357a2
ℹ️ 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".
| from diffusers import DiffusionPipeline | ||
| _PIPELINE_CLASS = type( | ||
| "Flux3KleinPipeline", (_Flux3KleinPipelineMixin, DiffusionPipeline), {} | ||
| ) |
There was a problem hiding this comment.
Add LoRA handling to the FLUX.3 pipeline face
When a FLUX.3 request uses a LoRA—either on a bf16/eager load or while baking an int8/fp8 transformer—the shared LoRA gate accepts it and later calls pipe.load_lora_weights() and pipe.set_adapters(), but this generated class inherits only DiffusionPipeline, not a LoRA loader mixin, and the new mixin defines none of those methods. Consequently every otherwise-supported FLUX.3 LoRA request fails with a missing-method error; inherit an appropriate loader implementation or explicitly reject LoRAs for these families before loading.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in ca6fe7e. The pinned diffusers build ships Flux3LoraLoaderMixin, so the FLUX.3 pipeline class now inherits it when it is available, and load_lora_weights, set_adapters and unload_lora_weights work on the same transformer the modular blocks run. On real weights a rank-4 adapter changes the render, weight 0 and removing it give the base render bit for bit, and baking it into an int8 load works too. Test: test_the_face_carries_the_flux3_lora_loader.
| canonicalId: "black-forest-labs/flux-3-image-klein", | ||
| displayName: "FLUX.3 Image Klein", | ||
| description: "Text-to-image and image editing", | ||
| scope: "image", | ||
| artifacts: [gguf("unsloth/flux-3-image-klein-GGUF")], |
There was a problem hiding this comment.
Hide the unpublished FLUX.3 GGUF artifact
The commit explicitly records unsloth/flux-3-image-klein-GGUF as not published yet, but this row makes that repository the model's only curated artifact. Any user selecting the new FLUX.3 entry therefore reaches the Hub with a nonexistent repository and the load fails before generation; keep the row out of the picker until the repository is published, or point it at an artifact that already exists.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in ca6fe7e. The FLUX.3 GGUF picker row is removed until unsloth/flux-3-image-klein-GGUF is uploaded, and model-catalog.check.ts asserts it is not offered. The hosted FP8 prequant registration stays: while that repo is missing, int8 and auto loads log prequant_repo_unavailable and quantise on the fly (checked on real weights), so no load fails.
… row until it is published The FLUX.3 pipeline face now inherits Flux3LoraLoaderMixin (transformer-only) when the installed Diffusers has it, so Studio's load_lora_weights / set_adapters / unload_lora_weights calls work, eager and baked into an int8 build. The unsloth/flux-3-image-klein-GGUF picker row is removed until the repo is uploaded. [skip ci]
… the folders FLUX.3 loads - The route preflight and begin_load read the pick's tensor names (the file on disk, a GGUF header range read, or the safetensors header) and refuse a distilled / base mismatch or a BFL quantized package before the resident pipeline is unloaded. The loader's own check stays as the backstop. - Local FLUX.3 validation checks <root>/text_encoder, /transformer and /vae, the folders load_flux3_pipeline reads, instead of a modular spec's source repo, so a manifest pointing elsewhere is refused before loading. [skip ci]
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5f71ab9f88
ℹ️ 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".
| { match: "flux3-klein-base", steps: 25, guidance: 3.5 }, | ||
| { match: "flux-3-image-klein", steps: 16, guidance: 1 }, | ||
| { match: "flux3-image-klein", steps: 16, guidance: 1 }, | ||
| { match: "flux3-klein", steps: 16, guidance: 1 }, |
There was a problem hiding this comment.
Add canonical FLUX.3 family keys to generation defaults
The follow-up adds the registered aliases, but both defaults tables still omit the canonical override values flux.3-klein and flux.3-klein-base. For an opaque/local model whose name has no recognizable alias, defaultsKeyFor deliberately falls back to the explicit canonical family, and separator folding produces flux-3-klein[-base], which does not match any of these flux3-* rows; the Create form therefore seeds 9 steps/guidance 0 instead of 16/1 or 25/3.5. The backend _GENERATION_DEFAULTS has the same omission, so its resident recipe cannot correct the UI.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 3ab0f43. flux.3-klein (16 steps, guidance 1) and flux.3-klein-base (25, 3.5) are now in both the UI and backend defaults tables. For an opaque path, the backend's resident recipe now falls back to the FLUX.3 family name, so an opaque path loaded with either family gets its recipe in both places.
…pipelines, canonical keys, modular status - A FLUX.3 GGUF / single file assembles from the staged companion dir when the prefetch resolved one, like every other assembly. - A full FLUX.3 pipeline whose manifest names the other variant is refused before eviction (local folder, cached or fetched manifest), with a loader backstop on the resolved block graph for every FLUX.3 assembly. - flux.3-klein / flux.3-klein-base get their recipes in both defaults tables, and the resident recipe falls back to the FLUX.3 family for an opaque path. - The image status lists FLUX.3 in modular_families, so the family override admits an opaque modular folder.
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
|
…w list Since 2026-10-16 the official FLUX.3 Klein manifests (distilled 2a70d1707a, base 6d332ea733) list prompt_upsampler / prompt_upsampler_processor from the separate ~19 GB flux-3-image-klein-pup repo. FLUX.3 image loads never read them, but local validation required them as folders of the repo, so a local or cached copy of the current revision was refused, and the media locality check wanted the pup repo cached. FLUX3_COMPONENT_FOLDERS now names exactly the components the loader reads (text_encoder, tokenizer, transformer, vae); fixed-folder validation checks those and skips any other manifest entry, and the locality check judges a FLUX.3 manifest the same way. The download plan already fetches only the three component folders, and the loader builds the modular pipeline from its own components without reading the manifest's sources. [skip ci]
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9af13ada12
ℹ️ 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".
| ("flux.3-klein-base", 25, 3.5), | ||
| ("flux-3-image-klein-base", 25, 3.5), | ||
| ("flux3-image-klein-base", 25, 3.5), | ||
| ("flux3-klein-base", 25, 3.5), |
There was a problem hiding this comment.
Set the FLUX.3 base default to 50 steps
When a user selects flux.3-klein-base, these aliases seed only 25 inference steps, but the official FLUX.3 launch documentation specifies 50 steps for the undistilled base checkpoint (Hugging Face FLUX.3 documentation). This halves the intended denoising schedule and can materially degrade default generations; update these backend aliases and the matching rows in studio/frontend/src/features/images/image-generation-defaults.ts to 50.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Keeping 25. Studio follows the ComfyUI templates for defaults, and the official base templates in black-forest-labs/flux-3-image-klein-comfy (workflows/image_flux3_klein_t2i.json and workflows/image_flux3_klein_image_edit.json) are set to 25 steps at CFG 3.5, euler / simple. The t2i template passes cfg 3.5, steps 25 into its sampler subgraph and carries a note to try 50 steps for better quality. The steps slider is still there for anyone who wants 50.
| if fixed_component_folders is not None and name not in fixed_component_folders: | ||
| continue | ||
| declared = True |
There was a problem hiding this comment.
Require every fixed FLUX.3 component folder
When a local FLUX.3 manifest omits one of the fixed entries, such as vae or text_encoder, this loop checks only the mapped entries that remain and returns true as soon as any one valid component sets declared. load_flux3_pipeline nevertheless opens all three fixed folders unconditionally, so an incomplete or hand-edited local pipeline passes preflight, evicts the resident model, and then fails during loading. Validate every required fixed folder independently of whether its manifest key is present.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 16d6a46. Fixed-folder validation now checks every folder load_flux3_pipeline opens (text_encoder with its processor, transformer, vae, with the transformer skipped for a GGUF or single file), whether or not the manifest lists it, so a manifest that drops an entry cannot let a missing folder through. Covered by test_every_fixed_folder_is_required_even_when_the_manifest_omits_it.
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Follows #13933 (FLUX.3 Image Klein, merged). Adds the native sd.cpp route for FLUX.3 Klein and Klein Base, so a host with no usable GPU runs our FLUX.3 GGUFs through sd-cli / sd-server instead of diffusers. It also means FLUX.3 GGUFs load there without the unreleased diffusers classes. Three commits: 1. **FLUX.3 Klein and Klein Base on the native sd.cpp engine.** Asset mapping and arch gate. 2. **Pin the sd.cpp prebuilt to `master-968-8cd731e-ubdb47d1`.** The mirror's release built from the upstream master-968 sync, the first upstream release with FLUX.3 Image Klein, published with every CPU, Apple, Vulkan and CUDA asset. 3. **Reference edits and a checkpoint check.** `DiffusionFamily.sd_cpp_reference` marks the FLUX.3 families, so the native engine accepts their `reference` workflow (sd.cpp conditions FLUX.3 on references through the VAE) and status lists it. After the assets are fetched, `_run_load` runs `assert_flux3_checkpoint_matches_family` on the denoiser, so a Klein GGUF picked under Klein Base (or the reverse) is refused before sd-cli starts. ### What sd-cli is handed | | flux.3-klein | flux.3-klein-base | |---|---|---| | Denoiser | `unsloth/flux-3-image-klein-GGUF` (the pick) | `unsloth/flux-3-image-klein-base-GGUF` (the pick) | | VAE | `unsloth/flux-3-image-klein-FP8` `vae/diffusion_pytorch_model.safetensors` | `unsloth/flux-3-image-klein-base-FP8` `vae/diffusion_pytorch_model.safetensors` | | Text encoder (`--llm`) | `unsloth/Qwen3-VL-4B-Instruct-GGUF` `Qwen3-VL-4B-Instruct-Q8_0.gguf` | same | | Sampler | euler, no flow shift, no `--vae-format` | same | | Arch marker | `Flux.3 Image Klein` | same | - **Denoisers.** sd.cpp reads our GGUFs as published. They carry BFL tensor names, and sd.cpp detects FLUX.3 from `emb_in.image` + `txt_mode_blocks`. No metadata fix is needed. - **VAE.** Both VAE files are the FLUX.2 VAE, byte-identical to `unsloth/FLUX.2-VAE` (sha256 `d64f3a68...`). Each comes from its family's own FP8 repo. That repo is in `prequant_repos`, so it stays loadable and does not become a companion-only repo. - **No vision projector.** sd.cpp feeds FLUX.3 references through the VAE (`image_cond` stream), not through the VLM. A reference edit with no mmproj renders correctly. - **Flow shift.** sd.cpp's scheduler already applies FLUX.3's 6.93 shift. Passing one would override it. - **Arch marker.** `Flux.3 Image Klein` is the model version name. It is present in every sd-cli and sd-server that can run FLUX.3 and absent from the current pin. A host keeping an older build gets diffusers instead of a load that fails at the first step. - **Companion repo.** `unsloth/Qwen3-VL-4B-Instruct-GGUF` joins the companion-only set. Like the Qwen3-VL-8B encoder of Qwen-Image-2.1, it only drops out of the non-GGUF cached listing. ### Why Q8_0 for the encoder The setup: sd.cpp (synced build), CUDA, 4 prompts at 1024 with the same seeds. Distilled ran 16 steps at CFG 1, base 25 steps at CFG 3.5. The reference is our BF16 GGUF denoiser with the BF16 Qwen3-VL-4B GGUF. Studio's diffusers renders cannot be the reference: sd.cpp draws its own noise, so pixels never line up across engines. The diffusers `transformer/` folder in the FP8 repo cannot be the reference either: it uses diffusers names, which sd.cpp does not map for FLUX.3. LPIPS-alex, mean / max over 4 prompts: | DiT | TE | Klein | Klein Base | |---|---|---|---| | Q8_0 | Q8_0 | 0.031 / 0.115 | 0.008 / 0.010 | | Q8_0 | Q4_K_M | 0.080 / 0.187 | 0.082 / 0.148 | | UD-Q4_K_XL | Q8_0 | 0.068 / 0.180 | 0.110 / 0.172 | | UD-Q4_K_XL | Q4_K_M | 0.090 / 0.213 | 0.109 / 0.209 | Q8_0 is never worse than Q4_K_M. It costs 1.8 GB more (4.28 GB against 2.50 GB), and the TE quant is the largest error source in this pair. Every render is coherent; the larger distances come from pose and layout shifts, which are typical for a distilled model. Speed at 1024 on one B200: distilled about 9 to 11 s/img, base 16 to 19 s/img. On CPU (32 threads, prebuilt-style build, host shared with other jobs): distilled UD-Q4_K_XL + Q4_K_M encoder 345 s, Q8_0 + Q8_0 517 s; base UD-Q4_K_XL + Q4_K_M encoder 1388 s. CPU output matches CUDA for the same files (LPIPS 0.0008 to 0.006). ### End to end Studio's own `SdCppDiffusionBackend` loaded `unsloth/flux-3-image-klein-GGUF` UD-Q4_K_XL on a CPU-only process. It used `SD_CLI_PATH` / `SD_SERVER_PATH` pointing at the synced CPU build, and the assets came from this mapping. It reported `engine=sd_cpp`, `native_mode=server`, `family=flux.3-klein`, then rendered a 512x512, 4-step image (coherent) in 72 s including load. ### Tests `tests/test_sd_cpp_flux3.py` has 12 CPU tests covering asset mapping, planned assets, companion classification, the arch gate, the no-GPU router with and without a capable build, the reference workflow gate and the checkpoint check. The first 9 fail without commit 1, the last 3 without commit 3. The pin commit updates the pin assertions and raises the upstream-fallback floor to master-968. With both commits, the families, family-data freeze, FLUX.3, engine router, sd.cpp backend/args/install/Vulkan routing, Qwen-Image-2.1 native edit and TE prequant test files pass: 766 passed, 3 skipped. After merging the current #13933 head, the sd.cpp and FLUX.3 test files pass again: 524 passed, 3 skipped. Full backend suite, every test file, against the parent commit at the time (`ac89bb0d44`): 74,633 passed on this branch against 74,623 on the parent. Both sides have 195 failed and 27 errors, and the failing test IDs are identical, so all of them are pre-existing and none involve sd.cpp or FLUX.3. Most are chat-generation supervisor and llama admission tests. ### Before merging - The prebuilt pin is `master-968-8cd731e-ubdb47d1`. The installer resolves it for CPU, CUDA 13 and Vulkan on Linux x64, and the CPU build installs and runs. - The published release carries the same 13 assets as the previous pin `master-951-f89d9b1-uafac7a7` (macOS arm64 and x86_64, Linux x86_64 CPU / CUDA 12 / CUDA 13 / Vulkan, Linux aarch64, Windows CPU / CUDA 12 / CUDA 13 / Vulkan, plus the manifest and sha256 files). Only the patch-set id in the names changes. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
… sidecar (#14137) Follows #13933 (FLUX.3 Image Klein, merged). ## Why FLUX.3 Image Klein is trained on long, explicit captions. Sent a short prompt as typed, it often draws broken bodies on unusual poses (backflips, handstands, tangled arms) and generic scenes. BFL ships a prompt upsampler for exactly this (`black-forest-labs/flux-3-image-klein-pup`, a Qwen3.5-9B fine-tune, Apache-2.0), and its model card says FLUX.3 "is not meant to run without a prompt upsampler in front of it". ComfyUI's official FLUX.3 templates run it by default. Studio currently drops that step and encodes the prompt as typed. Same 16 prompts, same seeds and reference noise, 32 images per arm: | Arm | Broken bodies | |---|---| | distilled, prompt as typed | 3 (backflip on both seeds, one handstand) | | distilled, upsampled caption | 0 | | base (50 steps), prompt as typed | 4 (headless handstand, tangled arms, two odd violin grips) | | base (50 steps), upsampled caption | 1 (odd violin angle) | As typed, "a gymnast doing a backflip" mostly renders a back-bend or walkover; upsampled, it renders a tucked backflip. Ordinary scenes (groups, walking, dinner) were already fine and stay fine. ## What this adds **Backend** (`core/inference/flux3_prompt_upsampler.py`) - The upsampler runs as a llama.cpp `llama-server` sidecar, modelled on the dictation (mtmd STT) sidecar: started on demand on an ephemeral loopback port, five minute keep-alive, unloaded early when VRAM is tight, and stopped at every training start, llama.cpp update, image unload and GPU handover to chat or video. Stop during a cold start cancels the server start. On a multi-account host it never starts beside another account's run. CUDA, ROCm, Metal and CPU all work through the same binary Studio already installs. - Weights come only from `unsloth/flux-3-image-klein-pup-GGUF` (Q4_K_M plus `mmproj-F16.gguf` for edits, 6.5 GB). `UNSLOTH_FLUX3_UPSAMPLER_GGUF` / `_MMPROJ` point at local files instead. - Prompts and sampling follow the ComfyUI FLUX.3 templates: BFL's `t2i` / `i2i` system prompts verbatim (sha256 pinned in a test, identical to diffusers' `SYSTEM_PROMPTS`), greedy decoding, thinking off, 3584 max tokens, presence penalty 1.5 for text-to-image and 0 for edits, repeat penalty 1.05 for distilled and 1.0 for base. Edits send the reference images (prepared as diffusers' `prepare_reference`) and the edit scaffold. - When the server supports `penalize_prompt` (unslothai/llama.cpp#283), the penalties cover only generated tokens over the whole caption, which is what ComfyUI and BFL's reference do. Against an exact-semantics reference on 8 prompts this moves word similarity from 0.49 to 0.69 (the cross-runtime floor is about 0.7 to 0.8). Older servers keep their default window. - `DiffusionGenerateRequest.enhance_prompt` (default: on for FLUX.3 Klein, ignored elsewhere). Records keep `prompt` as typed and add `enhanced_prompt` (the caption encoded) and `prompt_enhancement` (`applied` / `off` / `unavailable` / `failed`). Generation never fails because of the upsampler: a missing download, missing binary or server error falls back to the prompt as typed, and a multi-GB download is never started implicitly. - Routes: `GET /api/inference/images/prompt-upsampler/status`, `POST .../download`, `POST .../cancel`, `POST .../preview`. `/images/status` gains `supports_prompt_upsampler` and `prompt_upsampler_default`; generate-progress reports an `enhance` phase. - Captions are cached per (prompt, variant, references), so a batch upsamples each distinct prompt once and a repeat costs nothing. - Fix in the shared sidecar download progress: huggingface_hub 1.18+ writes `<etag>.<8 hex>.incomplete`, which the byte counter missed, so the bar sat at 0% until the end. This also fixes the dictation model download bar. **Frontend** (Images page) - "Enhance prompt" toggle under the prompt for FLUX.3 families only, on by default, remembered per family. - Download notice with size, progress and cancel when the upsampler is missing. - Preview: shows the caption with Copy and "Use as prompt" (puts the caption in the prompt and turns the toggle off, so it can be edited). - The Recipe popover shows the enhanced prompt and offers "Restore with the enhanced prompt", which reproduces the image exactly. ## Evidence End to end on a fresh install from this branch (B200, `unsloth/flux-3-image-klein-FP8`): | Check | Result | |---|---| | status before download | `downloaded: false`; generate falls back, `prompt_enhancement: "unavailable"` | | download through the route | 6,547,275,232 bytes in 44 s into the HF cache | | preview | 231-word caption, 12.2 s cold (includes llama-server start), 4.8 s for a new prompt warm | | generate | 1.0 to 1.5 s warm without enhancement, about 8 s with a new caption, 1.2 s with a cached one | | restore (caption as prompt, enhance off, same seed) | max abs pixel difference 0 | | edit (reference workflow, "make it night time") | caption describes the actual source image | | VRAM | about 23 GB combined peak (DiT 13 to 16 GB, sidecar 6.2 GB text-only, 7.5 GB with the vision projector) | | non-FLUX.3 family (Z-Image Turbo) | no toggle; `enhance_prompt: true` passes through untouched | GGUF fidelity (llama.cpp `b11696-mix-7baeb9a`): the BF16 GGUF matches transformers' chat template token for token and only diverges at near-tie tokens (probability gaps 0.0015 to 0.041). Captions from Q4_K_M and Q8_0 rendered the hard poses with no anatomy difference from the BF16 captions. Tests: `tests/test_flux3_prompt_upsampler.py` 73 passed; with the training VRAM, multi-model serving, managed engine, STT, GPU selection, GPU arbiter and diffusion route suites 777 passed. Frontend `tests/image-*.test.ts` 144 passed, `tsc` clean. ## Not covered - Clicking Download in the UI (the download was driven through the route), cancel mid-download, the base variant end to end, edits with several reference images, and the unload-when-tight path (the card never ran tight). - macOS, Windows and AMD were not run; the sidecar uses the same llama-server binary and launch helpers as dictation. - Exact ComfyUI caption parity needs the `penalize_prompt` pin in the llama.cpp prebuilt; until then captions are valid but not word-for-word ComfyUI's. ## UI Images composer with `unsloth/flux-3-image-klein-FP8` loaded, before (`studio-flux3-klein`, this PR's base) and after, with Preview clicked. After this PR there is an Enhance prompt switch (on by default for FLUX.3) and Preview opens the caption the upsampler wrote (237 words here) with Copy and Use as prompt. `GET /api/inference/images/prompt-upsampler/status` returns 404 before and 200 after.  --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…kend fetches (#14316) ## Problem The scheduled `Model catalog network check` failed on main (run 39381974211, fb372c1): ``` black-forest-labs/flux-3-image-klein-base: the Hub reports gated="auto" but the catalog entry has no `gated: true`, so an anonymous download 401s black-forest-labs/flux-3-image-klein: the Hub reports gated="auto" but the catalog entry has no `gated: true`, so an anonymous download 401s ``` Both repos are gated on the Hub, but users never download them. The FLUX.3 Klein bf16 rows deliberately keep the BFL ids (#13933, #14184), and the backend fetches those ids from the open `unsloth/flux-3-image-klein-FP8` and `unsloth/flux-3-image-klein-base-FP8` repos, which carry the upstream diffusers folders byte-identical (`_GATED_MIRROR_PAIRS` in `diffusion_families.py`). This is the first scheduled run of the check since the rows were added: the last one completed on 2026-10-01, and the 2026-10-19 run was cancelled. Adding `gated: true` would be wrong. The router skips a gated, not-downloaded artifact on a bare group click, so the working bf16 row would stop being offered. The catalog is right and the check was judging the wrong repo. ## Fix - `ModelArtifact.fetchedFrom`: the open repo the backend downloads a vendor id from. Set on the two FLUX.3 Klein bf16 rows. - The network check judges gating and declared files on `fetchedFrom` when it is set, otherwise on the repo id as before. - `tests/model-catalog-fetched-from.test.ts` (frontend unit tests, every PR) reads `_GATED_MIRROR_PAIRS` and `_VIDEO_GATED_MIRROR_PAIRS` from `diffusion_families.py` and requires every `fetchedFrom` to be one of those pairs, with no `gated: true` on the row. A catalog claim of a mirror the backend does not use therefore fails on the PR, not at download time. No UI change: the field is read only by the check and the test. ## Testing - `npm run catalog:check:network` against the live Hub: passes (`every declared repo, file and gated flag agrees with the Hub`). On main it fails with the two errors above. - Pointing the base row's `fetchedFrom` at the wrong mirror makes both new tests fail. - `npm run catalog:check` and the full frontend suite (12886 tests, 0 failed) pass. `npm run build` passes, and the startup bundle stays within budget (0.1 KB raw to spare).
Problem
FLUX.3 Image Klein (black-forest-labs/flux-3-image-klein and -base) cannot be loaded in Studio. Diffusers ships it only as Modular Diffusers blocks (
Flux3DistilledAutoBlocks,Flux3AutoBlocks), the repos carrymodular_model_index.jsoninstead ofmodel_index.json, and the support is not in any Diffusers release yet (huggingface/diffusers#15046).Change
core/inference/diffusion_flux3.py: loads the transformer, the Qwen3-VL-4B text encoder and processor, and the FLUX.2 VAE per subfolder, and puts aDiffusionPipelineface over the modular blocks. Placement, model and group offload, the step callback (progress, cancel), the decode phase hook and the scheduler swap all work through the same component objects the blocks run.flux.3-klein(distilled, 16 steps, CFG 1, Euler) andflux.3-klein-base(50 steps, CFG 3.5, negative prompt). Defaults follow ComfyUI's current FLUX.3 templates (workflow templates 0.11.87): the base text to image and edit templates run 50 steps at CFG 3.5 (euler / simple), raised from the launch templates' 25, which is also the BFL reference setting (diffusers' FLUX.3 defaults: 50 steps, guidance 3.5); both distilled templates run 16 steps at CFG 1. On hand-heavy prompts (6 prompts, short and long, 2 seeds, same reference noise) 50 steps fixed a malformed handshake the 25-step render had and otherwise left the image nearly unchanged. Both take up to 10 images through the existing reference workflow. The-pupprompt upsampler repo is not matched as an image model.ReferenceMultiLatent ["resize", 1]does in the FLUX.3 templates. Diffusers alone only downsizes above 16 megapixels.transformer/,text_encoder/andvae/are fetched, for full pipelines and as the companions of a GGUF or single file (which take onlytransformer/config.jsonfromtransformer/); the root BFL single file,ae.safetensors,variants/and the prompt upsampler repo are not. The plan also reports a pick of the other variant before anything is staged.prompt_upsampler/prompt_upsampler_processor, from the separate ~19 GBblack-forest-labs/flux-3-image-klein-puprepo) to both official manifests on 2026-10-16. Image loads ignore it: validation and the locality check require only the components FLUX.3 loads (text encoder and its processor, transformer, VAE). Checked on the current revision through the real load path for a bf16 pipeline, a GGUF with staged companions and the INT8 prequant: renders are pixel-identical to before and the pup repo is never downloaded.<component>/<file>weights. The cachedvariants/fp8randvariants/nvfp4packages were inflating the plan from 19.8 GB to 31.7 GB.0.41.0.dev0, which reads the same as the 0.41.0 release without FLUX.3, so the picker checks for the FLUX.3 module file in the installed package instead (no import).FamilyProfile.quant_exclude_tokensleaves named layers dense for every transformer-quant scheme (int8, fp8, mxfp8, nvfp4). It is empty by default, so other families are unchanged. FLUX.3 keeps the per-token modulations, timestep embedders,norm_out, the text-stream per-mode blocks and the 20480-wide text projection in bf16, which leaves 228 of 273 Linears quantised. Without it, mxfp8 and nvfp4 crash at the first step: the modulation inputs are a stride-0expand, and those kernels need contiguous inputs. int8 and fp8 also lose more quality without it.temb.expand(B, S, D)otherwise crashes at the first step; for contiguous inputs the hook does nothing. This is a cross-family change. FLUX.2 klein 4B with mxfp8 (106 MX Linears, compiled with CUDA graphs, the only way Studio runs a quantised denoiser), checked in one process: 2 prompts at 1024x1024 rendered without the hook, then again with it, givetorch.equaldecoded images, and so does the denoiser output on a captured step. Two renders without the hook are alsotorch.equalin that process. Across separate processes the same renders differ by up to 2 of 255 with or without the hook (before vs after this commit, and between two runs of the same commit), so that comparison cannot show a difference either way. The hook returns the arguments unchanged for any contiguous input. The scheme smoke probe is unchanged from main, so no family'sautochoice moves.autoresolves to int8 on sm80 and newer, as it does for the other families.uint8astransformer.dtype, because its only float tensors are the fp32-kept QK norms. The denoise block casts the latents to that dtype, so the loader pins the compute dtype with an empty buffer. A checkpoint or pipeline of the other variant (distilled vs base) is refused with the family to use, before the loaded model is unloaded. BFL's ownvariants/fp8randvariants/nvfp4packages are refused too: the nvfp4 one has the same tensor sizes as a ComfyUI NVFP4 file with a different scale layout, so it would decode silently wrong.Flux3LoraLoaderMixin(transformer only). Checked on real weights with a random rank-4 adapter on 215 attention and feed-forward Linears: bf16 eager, the adapter changes the render, weight 0 and removing it give the base render bit for bit; int8 with the adapter baked in at load changes the render too.flux.3-kleinlistsunsloth/flux-3-image-klein-FP8for int8 and fp8 (filesflux-3-image-klein-INT8.safetensors/-FP8.safetensors), the same layout asflux.2-klein.flux.3-klein-baselistsunsloth/flux-3-image-klein-base-FP8the same way: its INT8 file is BFL's own ComfyUIint8_convrotdenoiser from black-forest-labs/flux-3-image-klein-comfy, mirrored byte for byte and read through the ComfyUI quant loader, and its FP8 file is ours. Checked on real weights through the API load (50 steps, CFG 3.5, 2 prompts): the seeded INT8 renders match BFL's single file loaded directly (LPIPS 0.0001 and 0.004), the seeded FP8 renders match our FP8 file loaded by path (LPIPS 0.0001 and 0.0000). Without access to the repo the load logsprequant_repo_unavailableand quantises on the fly.black-forest-labs/flux-3-image-kleinand-baseare gated, so a GGUF or FP8 pick (which carries only the denoiser) fetched its text encoder and VAE through the gate. The upstream Diffusers folders Studio loads (modular_model_index.json,text_encoder/,transformer/,vae/) are now copied byte for byte (21 files each, sha256 checked against the pinned upstream revision) intounsloth/flux-3-image-klein-FP8andunsloth/flux-3-image-klein-base-FP8beside the pre-quantized files, and both are in the gated mirror table, so no separate mirror repo is needed. Companion listings and the manifest check read those repos too, so no request reaches the gated upstream. The picker and status still show the BFL id.text_encoder/shards are identical), asflux-3-image-klein[-base]-text_encoder-INT8-ConvRot.safetensors(5.25 GB, int8 ConvRot weight-only, built byscripts/build_te_int8_convrot_checkpoint.py) and...-text_encoder-FP8.safetensors(5.61 GB on disk, 4.83 GB resident: layerwise fp8, bit-identical to the runtime cast), the same pattern as Qwen-Image-2.1. An int8 request that cannot load the int8 file falls back to the fp8 file, then to the dense encoder with the runtime fp8 cast, as on Qwen-Image-2.1. Unset requests get the int8 ConvRot encoder (te_quant_auto = "int8"), as BFL's ComfyUI templates loadqwen3vl_4b_int8_convrot(4 of 5 workflows in black-forest-labs/flux-3-image-klein-comfy);nonestill pins the bf16 encoder. Checked through Studio's load path: an unset request loads the int8 file on both families and renders pixel-identical to the explicit int8 render. Real weights, bf16 DiT, 19 cases against the bf16 encoder on one B200 (A/A repeat bit-identical): int8 LPIPS-alex 0.017 mean / 0.098 max, SSIM 0.974 at 16 steps; 0.023 / 0.121, SSIM 0.973 for the base at 25 steps, CFG 3.5. fp8 scores 0.038 / 0.220 and 0.035 / 0.132. The encoder goes from 8.27 to 4.89 GiB resident and from 18.4 to 1.8 s to load (warm page cache). Peak memory drops from 21.2 to 17.8 GiB. INT8 DiT with the int8 encoder: 0.033 / 0.134 (distilled) and 0.034 / 0.142 (base), 13.9 GiB peak. BFL'sqwen3vl_4b_int8_convrothas the same int8 projections byte for byte but also quantisesembed_tokens, which Studio's loader cannot read. Repacked with that table dequantised, it scored 0.018 / 0.150 and 0.027 / 0.113, a tie within per-image spread, so the hosted file is our own build. Planner estimate for the encoder: 8487 MiB for bf16, 5517 MiB for fp8 or int8. Studio's own load of the mirrored files (int8 distilled and base, fp8 distilled) renders bit for bit what the harness renders._assemble_pipe, which calledfrom_pretrainedon the modular pipeline class and returned a pipeline with no transformer. It now assembles FLUX.3 through the same per-component loader.flow_mapfrom the family instead of the companion config (it crashed on meta tensors); BFL's own ComfyUIint8_convrotandnvfp4files (black-forest-labs/flux-3-image-klein-comfy) now go to the ComfyUI quant loader instead of being refused asvariants/packages, with the fused q/k/v split for FLUX.3; and the family, not the file name, picks the base vs distilled recipe (BFL's base ComfyUI files have no "base" in their names, so they were seeded 16 steps / CFG 1).diffusers-main.txtis re-enabled at Diffusers main d42ebf9c (archive digest included), which carries the FLUX.3 merge (Flux3 image huggingface/diffusers#15046) and the prompt upsampler block ( FLUX.3 prompt upsampler block huggingface/diffusers#15058), the same route Qwen-Image-2.1 used before 0.41.0. Studio never loads the upsampler, soflux3_blocks()drops that step from both FLUX.3 block graphs; a render at d42ebf9c matches the merge commit pixel for pixel. A host that cannot fetch the pin keeps 0.41.0 and only FLUX.3 is refused. The pin tests check release mode on a commented-out copy, so they pass with the pin on or off.Results
Real weights, distilled, 16 steps, B200 shared lease. The 11 cases are the BFL example prompts and seeds (8 text to image at 832x1248 to 1248x832, 3 edits with 1 or 2 references), scored with LPIPS (alex) and SSIM.
Text to image cases against the BFL reference: LPIPS 0.0008 to 0.0018, except riso_lido at 0.026 (the most chaotic prompt, which also moves between two runs of the reference on different hosts). The one edit that differs is edit_figurine: its 896x1120 input is just under 1 megapixel, so the ComfyUI sizing scales it up to 912x1136 where the reference keeps it as is. Same composition, different detail (LPIPS 0.08).
Tiny random models, distilled and base, text to image and edit, resident, model offload and group offload: bitwise identical to the Diffusers pipeline given the same inputs.
Speed features, the same 11 cases, against Studio bf16 eager:
Every case except riso_lido is at or below 0.048 for all three schemes. For scale, compiled vs eager bf16 measured 0.0035 in the separate quantisation survey.
Dependency check for the pinned build (
uv pip compile, the installer's requirement line):A dry run of the installer's install against an existing Python 3.12 stack swaps only the diffusers package.
Edits at 1024x1024, 16 steps, with 1 and 4 references (B200, 160 GB free):
The 16 GB cap is simulated: the allocator fraction and
mem_get_infoare both capped at 16 GiB. All three loads render all three requests.GGUF and pre-quantised files, real weights, loaded through Studio's load API (
begin_load) from local copies of the hosted files. The same 11 cases, 16 steps, against Studio bf16 eager:A 3-case spot check (fox, man_dog, edit_coffee) also ran Q4_K_M: LPIPS 0.033 mean against 0.021 for UD-Q4_K_XL.
uint8compute dtype problem described above, and render with the pin._assemble_pipechange the same load came back with no transformer.Tiny Q8_0 GGUFs with BFL tensor names load for both variants and render text to image and edit. Pairing the base GGUF with the distilled family is refused.
Timing at 1024x1024, resident bf16, no compile: 1.3 to 2.5 s per text to image, 2.8 to 3.9 s per edit.
Tests
studio/backend/tests/test_diffusion_flux3.py: 84 CPU tests covering the download plan scope and variant verdict, the prompt upsampler entries in the current official manifests, the modular manifest in the gated-base probe, shard restore and staging, the pre-eviction variant check (single files and pipelines), the local folder validation, the FLUX.3 LoRA loader, per-image generation chunks, per-image negative prompts, a local modular base for GGUF loads, the refusal of separate encoder / VAE files, the hosted artifact rows and filenames, the operator mirror, the quantized GGUF pick assembly, the nvfp4 deny, the contiguous-input guard, the per-scheme keep-list (and that other families are unchanged), the variant and BFL-package refusals, the GGUF compute dtype pin, memory rows, detection, the-pupexclusion, modular index detection, defaults, size table, the unreleased gate and module-file probe, the modular download plan, plan sizing, reference sizing, the reference noise layout, and the pipeline face (prompt and generator splitting, step callback, interrupt).model-catalog.check.ts: passes with the new GGUF row.tests/sh/test_clean_machine_notools_pinned_git.sh: 44 passed.Not covered
A dense bf16 cold load (
transformer_quant=none). Cold anonymous loads (fresh cache, no token) of a GGUF UD-Q4_K_XL pick, a base FP8 pick and a bf16 pipeline pick (which auto-selects int8) each requested onlyunsloth/flux-3-image-klein[-base]-FP8/-GGUFand rendered at 1024x1024; the GGUF pick downloads 9.53 GB with the int8 encoder.fp8r and nvfp4 variant files: they use Diffusers' new BFL quantizer format, which no Studio prequant path loads yet.
Upstream: Diffusers reports
uint8as the dtype of a GGUF FLUX.3 transformer, and a plain ModularPipeline fails the same way. Studio pins the compute dtype; the upstream fix is still to be filed.A script that exits while Studio's deferred background compile is still running dies at interpreter shutdown (exit 245 or 250). This reproduced on a bf16 FLUX.3 run after all renders had finished, and the same way on FLUX.2 klein 4B (bf16, 3 renders, exit 245), so it is not in the FLUX.3 code. Calling
unload()first exits cleanly. The background compile is shared by every family and is not changed here. I did not check whether a Studio server shut down mid-compile hits the same thing.Follow-up: a smoke probe that also feeds a stride-0 activation, so a scheme missing the contiguous guard fails the probe instead of the first render. Left out of this PR.
MLX, Windows and AMD paths for FLUX.3 were not run. The native sd.cpp route is Studio: FLUX.3 Image Klein on the native sd.cpp engine #14144, stacked on this PR.
Hosted repos (public, ungated):
unsloth/flux-3-image-klein-FP8,unsloth/flux-3-image-klein-base-FP8,unsloth/flux-3-image-klein-GGUFandunsloth/flux-3-image-klein-base-GGUF. The two GGUF repos are picker rows (shown under their repo names);model-catalog.check.ts --networkchecks every declared file against the Hub. If a FP8 repo cannot be reached, an int8 or auto load logsprequant_repo_unavailableand quantises on the fly (checked on real weights, same output as the file).GGUF CUDA graphs on K-quants (falls back to eager).
nvfp4 quality (excluded from
auto) and step caching.Python 3.10 hosts cannot run FLUX.3 until a Diffusers release carries it (the refusal says so).
Timings: the runs above were on shared GPUs, so they are accuracy checks, not benchmarks.
A real 16 GB card (the cap was simulated in-process).
Measured memory rows for the base checkpoint (it uses the flat estimate).
Trained FLUX.3 LoRAs (and their key formats); only a random adapter was tried.
Separate text encoder / VAE files beside a FLUX.3 GGUF or single file: refused with a clear message for now (the supplied-component loader reads a model_index.json, which FLUX.3 does not ship).
Prompt upsampler integration: Studio: FLUX.3 prompt upsampling (Enhance prompt) through a llama.cpp sidecar #14137, stacked on this PR.
ComfyUI seeds do not reproduce (ComfyUI draws its own noise layout); BFL seeds do.
The single reference path differs from the BFL reference by design (1 megapixel resize instead of pad to 4 megapixels), following ComfyUI.
Text encoder length cap: 8192 tokens (Diffusers) against 4096 in the BFL reference; only prompts past 4096 tokens differ.
Another GPU generation
On a Colab RTX PRO 6000 Blackwell (sm120, torch 2.14.1+cu130), Studio's own
DiffusionBackendfrom this branch loadedunsloth/flux-3-image-klein-FP8with every setting left at its default and rendered 1024x1024 images. It picked an int8 transformer (int8 GEMM engaged), the hosted int8 ConvRot text encoder, compile with CUDA graphs and no offload, and the load took 84 s. The merge base does not detect the repo as FLUX.3 at all.UI
Images model picker searched for "FLUX", before (merge base 7382805) and after (42e4b8a). After this PR,
flux-3-image-klein-GGUF (Slow)(5.5B) andflux-3-image-klein-base-GGUF (Slow)are curated rows in the FLUX group, right after FLUX.2-klein-9B. Before, both only show up as bare, unsized Hub search hits further down.