Repository navigation
Studio INT8 attention: leave FLUX.1 and FLUX.2 out of Auto (route on request only) - #19235
Merged
Merged
Conversation
…nder Auto Studio defaults on L4 (1024 px, 8 prompts, fresh process per arm) moved the image well above the 0.02 LPIPS default-path bar against the kernel off, whose own repeat is bit-identical: FLUX.1 schnell mean 0.107 / max 0.204, FLUX.2 klein 4B mean 0.037 / max 0.081. Take both out of AUTO_DITS, SPEED_UNSET_DITS and AUTO_CUDA_ONLY; a request by name still routes them on the attention-sink path.
Member
Author
|
@codex review |
Codex Review Summary: ✅ CompletedThis 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. Keep it up! 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". |
[skip ci]
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.
Summary
Studio's automatic INT8 attention (on by default since #18085) routes FLUX.1 and FLUX.2 denoisers. Re-gated with the accuracy rule Studio uses for automatic kernels, INT8 moves FLUX.1 schnell and FLUX.2 klein 4B significantly further from an fp32-attention reference than a bf16 kernel swap does, on both L4 and A100-40, for a 6-7% speed gain on L4 and under 2% on A100. This takes
FluxTransformer2DModelandFlux2Transformer2DModelout of Auto. Picking INT8 attention explicitly still routes them.Change
diffusion_int8_attention_dispatch.py: FLUX.1 and FLUX.2 removed fromAUTO_DITS,SPEED_UNSET_DITSandAUTO_CUDA_ONLY. FLUX.3, Krea 2, MOSS-Image, HunyuanVideo-1.5, Qwen-Image-2.1, Wan and Z-Image keep Auto.Evidence
Colab, Studio main
a4135f0fa6, 30 prompts with fixed seeds, 1024 px, Studio defaults (4 steps, int8 weights, compiled), a fresh process per arm, one VM per family and card.Rule, fixed before running: keep Auto for a family only if the upper bound of the paired bootstrap 95% CI of (AUTO minus OFF, LPIPS against the reference) is at or below the floor.
Every lower bound is above its floor, so all four cells fail the rule. On klein 4B INT8 is about 1.5-1.65x further from the reference than bf16. On schnell (4 distilled steps) any attention change can move the layout; INT8 moves it more than the bf16 kernels do (for example added furniture and a different ceiling on one interior prompt).
Tests: the INT8 attention dispatch, families, auto, toggle and speed-route suites, 259 passed, 90 skipped (GPU-only). The family tests now assert FLUX.1 / FLUX.2 stay off under Auto and still route when INT8 is requested.
Not covered