Repository navigation
Studio: pin FLUX.3 Image Klein (Fast FP8) to the top of the Images picker - #14184
Conversation
|
@codex review |
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: f59f7fb9ab
ℹ️ 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".
| aliases: ["unsloth/flux-3-image-klein-FP8"], | ||
| pinToTop: true, | ||
| artifacts: [ | ||
| bf16Pipeline("black-forest-labs/flux-3-image-klein", 21, { |
There was a problem hiding this comment.
Use an exact resident size for the pinned FLUX.3 row
On a 24 GB dense-quant GPU with “Fit on device” enabled, the rounded 21 makes residentSizeGb calculate 6.44 + (21 - 5548681984*2/2^30) = 17.10 GB, exceeding the 16.8 GB allowance; orderRecommendedRows therefore drops the new Fast FP8 row and leaves the pinned Slow GGUF row first. The backend component table totals this model at 20.2 GB (11.1 + 8.9 + 0.2), which falls below the same cutoff, so preserve a sufficiently precise resident size and add a 24 GB fit regression to keep the headline row visible on common 24 GB cards.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in d3f27fd. The fit rule divides by 1024^3, so the dense rows are now in GiB (18.92 / 18.9 resident, 6.0 / 6.0 and 5.98 / 5.41 GiB prequant DiTs, all read from the Hub). That puts the dense-quant resident at about 14.6 GiB, under the 16.8 allowance on a 24 GB card. The catalog check now asserts both FLUX.3 dense rows fit a 24 GB card with int8 / fp8 and do not without them; with the old 21 it reads 17.1 and fails.
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! 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". |
…eset the startup budget to the build (#14168) ## Summary Main is over the startup bundle budget, so `Frontend build + bundle sanity` fails on every PR based on it: ``` over the startup budget: transfer 2005.9 KB > 2003.5 KB, raw 6665.4 KB > 6659.1 KB (main at 2fee36f) ``` This PR takes two steps. It moves #14137's prompt upsampler client out of the startup chunks, which is real growth with a lazy home. It then resets both limits to the measured build. Main has gone over this budget repeatedly, and the root of that is a shortfall in how the limits were raised, which this corrects. ## Cause **#14137 (FLUX.3 prompt upsampling).** The Images page is lazy (`ImagesPage = lazy(...)` in `__root.tsx`), but `features/images/api.ts` is not. Startup modules import it for other calls (`loaded-models-api.ts`, `loaded-models-sources.ts`, `use-media-companion-bytes.ts`). #14137 put the four upsampler calls there, with value imports from `lib/prompt-enhance.ts`, so that module joined the startup chunks. Only `prompt-enhance-panel.tsx`, inside the lazy Images page, calls them. **The limits themselves.** Each raise since #14073 was sized from its own PR's delta and added to the previous limit. That previous limit already sat below the build, starting at #14073: - `475a02ac` measures 2,047,700 B transfer against the 2,047,608 B limit #14073 set. - By `2fee36ff` the gap is 6,500 B raw and 2,409 B transfer. The raises since (#14072, #14075, #14110, #14108, #14113) each added their delta, so the shortfall carried forward. CI agrees with my machine to the byte: the first run of this PR read 1999.7 KB transfer on both. ## Change - **New `features/images/prompt-upsampler-api.ts`:** holds `getPromptUpsamplerStatus`, `startPromptUpsamplerDownload`, `cancelPromptUpsamplerDownload` and `previewEnhancedPrompt`, moved unchanged, with the same `parseJson` error handling. - **`api.ts`:** now imports only the `PromptEnhancement` type from `lib/prompt-enhance` (erased at build). - **`prompt-enhance-panel.tsx`:** imports the calls from the new module. - **No behavior change** in the app. - **`check-bundle-budget.ts`:** both limits are reset to the measured build plus the usual margin (160 B raw, 189 B transfer), with an entry in the BUDGET comment block explaining why the reset is absolute rather than by delta. - `rawBytes`: 6,819,206 (main after #14113) -> 6,825,885. - `transferBytes`: 2,051,727 -> 2,054,261. ## Testing One machine and build, Node 24, exact byte totals from the budget script, 95 chunks throughout: | tree | raw B | transfer B | |---|---|---| | main `2fee36ff` | 6,825,378 | 2,053,999 | | main `2fee36ff` + the move | 6,821,006 | 2,052,708 | | main `78e5eefa4d` (adds #14113) + the move | 6,821,334 | 2,052,857 | | + #14183 | 6,821,410 | 2,052,614 | | + #14172 (one tooltip design) | 6,825,307 | 2,053,990 | | this PR (main `b227654927`, adds #14184, + the move) | 6,825,725 | 2,054,072 | - **The move saves:** 4,372 B raw and 1,291 B transfer. - **#14113 adds:** 328 B raw and 149 B transfer on this build. - **Landed while main was over, with no raise:** #14183 (+76 B raw, -243 B transfer), #14172 (+3,897 B raw, +1,376 B transfer, the shared tooltip is in the eager shell) and #14184 (+418 B raw, +82 B transfer). This is the treadmill the absolute reset stops: while main is red on this check, growth lands unaccounted. - **With the new limits:** `within budget (0.2 KB transfer, 0.2 KB raw to spare)`. - **`npm run typecheck`:** clean. - **`bundle-budget-cli.test.ts`, `bundle-budget-closure.test.ts`, `image-prompt-enhance.test.ts` and `loaded-models-platform-matrix.test.ts`:** 74 passed. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…t the top of the Images picker (#14197) ## Summary Follow-up to #14184. The FLUX.3 Image Klein GGUF row now sits directly under FLUX.3 Image Klein (Fast FP8) at the top of the Images picker, instead of after the Qwen-Image 2.1 and 2.1 Turbo Fast FP8 rows. Top of the list on a GPU host, before and after: | Before | After | |---|---| | FLUX.3 Image Klein (Fast FP8) | FLUX.3 Image Klein (Fast FP8) | | Qwen-Image 2.1 (Fast FP8) | flux-3-image-klein-GGUF (Slow) | | Qwen-Image 2.1 Turbo (Fast FP8) | Qwen-Image 2.1 (Fast FP8) | | flux-3-image-klein-GGUF (Slow) | Qwen-Image 2.1 Turbo (Fast FP8) | | Qwen-Image-2.1-GGUF (Slow) | Qwen-Image-2.1-GGUF (Slow) | | Qwen-Image-2.1-Turbo-GGUF (Slow) | Qwen-Image-2.1-Turbo-GGUF (Slow) | ## Changes - `model-catalog.ts`: a new `pinRowsTogether` group flag. With `pinToTop`, it keeps all of that group's rows together, ahead of the next pinned group, instead of interleaving lead rows first. Only FLUX.3 Image Klein sets it; Qwen-Image 2.1 and 2.1 Turbo keep the existing interleaved order. - `recommended-fit.ts`: `orderRecommendedRows` takes `pinnedTogether`. A together family sorts its rows by their position inside the family, under the family's pin index; other pinned families keep the old key. - `pickers.tsx`: passes the flagged pinned groups as `pinnedTogether`. - `tests/recommended-catalog-seeds.test.ts`: covers the shipped order (FLUX.3 Fast FP8, FLUX.3 GGUF, then the Qwen rows), the interleaved order without the flag, a device where only the GGUFs fit (FLUX.3 GGUF still first), and that the flag alone does not lift an unpinned family. ## Testing - `tests/recommended-catalog-seeds.test.ts`: 24 / 24 pass. - `npm run catalog:check`: all assertions pass. - `tsc --noEmit -p .` is clean. - Two isolated Studio installs (merge base vs this branch) on a B200 reporting the int8 / fp8 dense quant: the picker keeps its 39 rows, and `flux-3-image-klein-GGUF (Slow)` moves from fourth to second, directly under `FLUX.3 Image Klein (Fast FP8)`. Everything else keeps its order.  *Images picker Recommended list. Left: main. Right: this PR, with the FLUX.3 Image Klein GGUF row right under its Fast FP8 row.*
…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).
Summary
FLUX.3 Image Klein now sits at the top of the Images model picker, above Qwen-Image 2.1, the same way Qwen-Image 2.1 and its Turbo are pinned today. On a GPU host the first row reads FLUX.3 Image Klein (Fast FP8), followed by the Qwen-Image 2.1 and 2.1 Turbo Fast FP8 rows, then the GGUF rows of the same three families.
Until now both FLUX.3 groups held only their GGUF artifact, so the picker could only offer the slow native engine row for them, even though the backend already ships the hosted INT8 / FP8 denoisers (
unsloth/flux-3-image-klein-FP8,unsloth/flux-3-image-klein-base-FP8) and routes the gated BFL ids to those repos.Changes
model-catalog.ts_GATED_MIRROR_PAIRS) and loads the prequant checkpoint named byprequantRepo.pinToTopand placed before Qwen-Image 2.1, so its pin index is 0. The Base group is not pinned and keeps sorting with the other models.model-catalog.check.ts: both FLUX.3 rows join the prequant table (size, params and dense-quant eligibility checks), plus checks that the FP8 and GGUF repo ids resolve to the right group, that the rows read "(Fast FP8)" / "(Slow)", that FLUX.3 is the first pinned group, and that both dense rows fit a 24 GB card with the dense quant and do not without it.tests/recommended-catalog-seeds.test.ts: the pinned-order test now expects FLUX.3 first. Unpinned, the vendor-hosted pipelines still trail; on a device the pipelines do not fit, the FLUX.3 GGUF row leads.Testing
npm run catalog:check: all assertions pass.tests/recommended-catalog-seeds.test.ts: 24 / 24 pass.Full frontend suite: 10730 pass. The 181 failing files all fail to import a package missing from this environment (
ERR_MODULE_NOT_FOUND), the same as on main.tsc --noEmit -p .is clean.Two isolated Studio installs (merge base vs this branch) on a B200 that reports the int8 / fp8 dense quant: the Images picker grows from 37 to 39 rows, and its first rows change from
Qwen-Image 2.1 (Fast FP8),Qwen-Image 2.1 Turbo (Fast FP8)toFLUX.3 Image Klein (Fast FP8),Qwen-Image 2.1 (Fast FP8),Qwen-Image 2.1 Turbo (Fast FP8), followed by the GGUF rows of the same three families.End to end on the PR build (B200): loading the new row (
black-forest-labs/flux-3-image-klein, pipeline, automatic precision) seeds the hosted INT8 denoiser fromunsloth/flux-3-image-klein-FP8(fingerprint 228 of 228 verified) and the INT8 ConvRot text encoder. Load took 41 s and a 1024x1024 txt2img took 38 s including the first compile.Images picker Recommended list. Left: main. Right: this PR, with FLUX.3 Image Klein (Fast FP8) as the first row, above Qwen-Image 2.1 (Fast FP8).