Skip to content

Support mflux 0.22 (0.13.2) - #83

Merged
IonDen merged 4 commits into
mainfrom
mflux-0.22
Oct 8, 2026
Merged

IonDen merged 4 commits into
mainfrom
mflux-0.22

Conversation

@IonDen

@IonDen IonDen commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

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_t path 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 to mflux>=0.17.5,<0.25. A model whose config or transformer has zero_cond_t set is now refused by detection with IncompatibleModelError, before anything is patched; match_variant gives 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 QwenTransformer with 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 (skipping norm_out), the block walk, or that signal makes it fail. Another new test pins the signatures of the public names the upcoming mflux-teacache plugin 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 audit job 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.

@IonDen IonDen self-assigned this Oct 8, 2026
@IonDen IonDen added dependencies Pull requests that update a dependency file enhancement New feature or request labels Oct 8, 2026
IonDen added 4 commits October 8, 2026 15:33
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).
@IonDen
IonDen merged commit 376c49a into main Oct 8, 2026
14 checks passed
@IonDen
IonDen deleted the mflux-0.22 branch October 8, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant