Repository navigation
Model catalog network check: judge FLUX.3 Klein by the mirror the backend fetches - #14316
Merged
Merged
Conversation
…kend fetches The bf16 rows keep the gated black-forest-labs ids, which the backend fetches from the open unsloth FP8 repos (_GATED_MIRROR_PAIRS). The nightly check read the vendor gate and failed. A new fetchedFrom field names the mirror, the network check judges it, and a unit test keeps each fetchedFrom inside the backend's gated mirror table.
Member
Author
|
@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: Didn't find any major issues. 🚀 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". |
This was referenced Oct 20, 2026
Merged
danielhanchen
added a commit
that referenced
this pull request
Oct 20, 2026
… tables by any spelling (#14318) ## Problem `(Python 3.13, a-k)` fails on every PR since #14310 merged (for example #14316 and #14317, both on base fb372c1): ``` studio/backend/tests/test_diffusion_segment_quant.py: in test_skeleton_buffers_match_from_pretrained assert dense.keys() == built.keys() and any("rope" in name for name in dense) ``` #14310 showed the same failure on its own run before merging. Reproduced locally with transformers 5.18 (CI resolves 5.17.0); the 4.57 floor has no `Sam3Model`, so the test skips there. There are two layers: 1. With transformers 5.x the RoPE buffers are named `rotary_emb.inv_freq`, `rotary_emb.original_inv_freq` and `position_ids`; none contains `rope`. 2. Behind that check, the dtype comparison fails as well: `from_pretrained(dtype = bfloat16)` casts the ViT's `position_ids` to bf16 on 5.18, while `_build_skeleton` builds them in float32 on purpose. They are not just a different dtype: layer 1 (global attention) has different values in bf16, and swapping the skeleton's buffers into the dense model changes the vision encoder output. That is exactly the 0.04 shift the test's docstring describes, so the skeleton is right and a bf16 load is not a valid reference. ## Fix Test only: - The reference is `from_pretrained(dtype = float32)`, the exact tables the skeleton is meant to reproduce on every transformers version. - The RoPE presence check matches `rope`, `rotary` or `position_ids`. ## Testing - `test_diffusion_segment_quant.py` with transformers 5.18: 37 passed, 3 skipped. On main the skeleton test fails as in CI. - Building the skeleton without `_default_dtype(torch.float32)` (the regression the test exists for) makes it fail on `position_ids`. - `test_diffusion_segment.py` with `test_diffusion_segment_quant.py`: 109 passed, 3 skipped. ## Not covered here The dense bf16 path (`Sam3Model.from_pretrained(..., dtype = dtype)` in `diffusion_segment.py`) gets the rounded `position_ids` on 5.18, so on that release its masks differ from the pre-quantized path's. That is a product question for the segmenter, separate from this CI fix.
danielhanchen
added a commit
that referenced
this pull request
Oct 20, 2026
) ## Problem `Frontend build + bundle sanity` is red for every PR based on current main. Main itself builds over the startup budget: ``` eager startup JS: 6684.2 KB raw, 2012.7 KB transfer, 96 chunks over the startup budget: raw 6684.2 KB > 6683.8 KB ``` ## Measurement Exact totals, one machine and build, Node 24, 96 chunks throughout: | Commit | Raw (B) | Transfer (B) | |---|---|---| | 22a0bea (last in-budget main) | 6,844,101 | 2,060,889 | | 6a19cb2 (before #14312) | 6,844,101 | 2,060,887 | | b32d544 (#14312, FLUX.3 workflows, controls and LoRAs) | 6,844,527 | 2,061,025 | | d3a8257 (main, after #14228) | 6,844,622 | 2,061,040 | #14312 adds 426 B raw / 138 B transfer, and #14228 adds 95 B raw / 15 B transfer. Both are ordinary feature growth on chunks the startup set already loads; the chunk count is unchanged. ## Change `BUDGET` in `studio/frontend/scripts/check-bundle-budget.ts` is raised to the main build plus the same 160 B raw / 189 B transfer margin as earlier raises: `rawBytes` 6,844,782 and `transferBytes` 2,061,229. A comment entry records the numbers above. ## Testing - `npm ci && npm run build && npx tsx scripts/check-bundle-budget.ts` on this branch: `within budget (0.2 KB transfer, 0.2 KB raw to spare)`. On main, the over-budget output above. - #14316 (catalog `fetchedFrom`) builds to the identical byte count on top of main, so it fits under this budget as well.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The scheduled
Model catalog network checkfailed on main (run 39381974211, fb372c1):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-FP8andunsloth/flux-3-image-klein-base-FP8repos, which carry the upstream diffusers folders byte-identical (_GATED_MIRROR_PAIRSindiffusion_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: truewould 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.fetchedFromwhen 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_PAIRSand_VIDEO_GATED_MIRROR_PAIRSfromdiffusion_families.pyand requires everyfetchedFromto be one of those pairs, with nogated: trueon 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:networkagainst the live Hub: passes (every declared repo, file and gated flag agrees with the Hub). On main it fails with the two errors above.fetchedFromat the wrong mirror makes both new tests fail.npm run catalog:checkand the full frontend suite (12886 tests, 0 failed) pass.npm run buildpasses, and the startup bundle stays within budget (0.1 KB raw to spare).