Repository navigation
Support mflux 0.22 (0.13.2) - #83
Merged
Merged
Conversation
A weight-free test builds a small mflux QwenTransformer and requires a computed TeaCache step to match it bit for bit, for both prompts. apply_teacache refuses a Qwen transformer built with zero_cond_t (Qwen-Image-Edit-2511 on mflux 0.22), whose path the gated forward does not implement.
Record the 0.22.0 fingerprints, review mflux main at 52295bc, make 0.22.0 the newest checked release and allow mflux>=0.17.5,<0.25. The lock moves to mflux 0.22.0 and fsspec 2026.9.0 (CVE-2026-104851).
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.
mflux 0.22.0 came out on 2026-10-08. The CI job that installs the newest mflux in range failed its fingerprint check, because three Qwen-Image functions that TeaCache copies had changed. This PR makes 0.22.0 a checked release and ships it as 0.13.2.
The Qwen change is a new
zero_cond_tpath for Qwen-Image-Edit-2511: when the transformer is built with it and an edit passes reference images, those image tokens get the modulation of timestep 0. mflux builds the text-to-image Qwen-Image transformer without it, and TeaCache's copy passes none of the new arguments, so a computed TeaCache step does the same arithmetic as plain mflux. The Z-Image and FLUX.2 Klein functions that also differ from 0.21.0 are the ones already reviewed for 0.13.1 on mflux's main branch. Separately, 0.22 loads the output norm's bias for FLUX.1 and Qwen-Image when the checkpoint has one. TeaCache calls mflux's own norm module there, so it gets the bias too. Images loaded from the original Hugging Face weights can therefore differ from 0.21 at the same seed, with or without TeaCache; a model saved by an earlier mflux has no bias and renders as before. Neither that difference nor the skip counts on 0.22 were re-measured.The PR records the 0.22.0 fingerprints, tracks mflux main at 52295bc (the release plus a docs-only change), makes 0.22.0 the newest checked release so it no longer triggers
TeaCacheUntestedMfluxWarning, and widens the range tomflux>=0.17.5,<0.25. A model whose config or transformer haszero_cond_tset is now refused by detection withIncompatibleModelError, before anything is patched;match_variantgives the same answer. The edit pipelines were already refused by their class, so this covers the transformer itself.A new weight-free test builds a two-block mflux
QwenTransformerwith random weights and a non-zero norm bias, in bfloat16 and 4-bit, and requires TeaCache's gated forward to match it bit for bit for both the positive and the negative prompt, on the always-compute path and on a gate-decided compute. It also checks the gate's input signal against the modulated input mflux's own first block computes. Breaking the tail (skippingnorm_out), the block walk, or that signal makes it fail. Another new test pins the signatures of the public names the upcomingmflux-teacacheplugin will call (apply_teacache,match_variant,VariantInfo,check_step_window, the handle and stats fields, the warning classes), so a change to them fails here first.The development lock moves to mflux 0.22.0 and fsspec 2026.9.0; the
auditjob was red on fsspec 2026.4.0 (CVE-2026-104851, fixed in 2026.6.0).The gate, the default thresholds and the coefficients are unchanged, and there are no new speed numbers. On real weights, FLUX.1-dev (4-bit, original Hugging Face weights, mflux 0.22.0) was re-checked: at threshold 0 TeaCache's latents are bit-identical to plain mflux for text-to-image and for image-to-image at strengths 0.5 and 0.7, and
restore()leaves no trace. The other variants were not re-run on real weights. Locally, on Python 3.12 with mflux 0.22.0 and MLX 0.32.2, ruff, ruff format, mypy and the fast test lane pass; CI covers Python 3.10 to 3.13, the mflux floor, the newest mflux in range and mflux main.Part of #81.