Repository navigation
chore(deps): bump diffusers to the 0.41.0 release for Qwen-Image 2.1 - #326
Merged
Merged
Conversation
Signed-off-by: rockdu <kangrdu@gmail.com>
Rockdu
marked this pull request as ready for review
October 17, 2026 23:55
Signed-off-by: rockdu <kangrdu@gmail.com>
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.
What
diffusers==0.41.0(PyPI release) inrequirements.txt, replacing the git pinf53d5520(the MiniMax-H3 merge commit on diffusers main, 2026-08-05).enable_gqainstead of K/V repeated to all 48 heads.Why
QwenImage21Transformer2DModelfrom Add Qwen-Image 2.1 huggingface/diffusers#14804 (merged 2026-09-18), which the current pin predates, so the trainer cannot resolve the DiT class.huggingface-hub1.33.0 >= 1.32.0,safetensors0.8.0 >= 0.8.0); no other package moves with it.Krea2AttnProcessorto repeat K/V before SDPA, so every layer saves 4x the K/V for backward. On the first CI run of the bump alone, the Krea-2 async proxy (no gradient checkpointing) kept every metric identical to the standard but its train steps went from ~75 s to 101-170 s, and its finaldcp.savedied withNCCL Error 1: unhandled cuda error; every other e2e kept its step time and passed bitwise. Between the two images only diffusers moved (same base image digest, no NCCL/torch/CUDA package change, same miles code path).What changes for the existing families
Read from
git diff f53d5520 v0.41.0(198 commits), limited to the code miles trains through:attention_dispatch(_native_attention,_flash_attention,_wrapped_flash_attn_3)enable_gqa=Trueto SDPAget_parameter_dtype(module)instead ofmodule.weight.dtype_keep_in_fp32_modulesnarrowed (decoder no longer pinned to fp32), explicit input casts_run_decoder_stackltx-core, not diffusersEvery diffusers symbol miles imports (18, including the DiT classes resolved from each checkpoint's
_class_name) imports on 0.41.0.Validation
CPU: import check above.
GPU: this PR touches
requirements.txt, so CI builds apr-326image; labelledrun-ci-imageto run every suite on it.Bump alone: stage-c-3 (SD3 NFT, SD3 OCR GRPO, H3 t2va GRPO, H3 t2va SFT) and stage-c-5 (Wan2.2, Cosmos3, LTX-2.3, Qwen-Image) match their standards bitwise; Krea-2 async failed as above.
With the Krea-2 processor fix (run 39090578815): all 9 e2e match their standards bitwise, Krea-2 async included. Krea-2 async train step times:
latest(diffusersf53d5520)pr-326, bump onlydcp.saveNCCL errorpr-326, bump + processor fixOn CPU the patched processor hands SDPA
(q_heads, kv_heads) = (8, 2)withenable_gqa=True(0.41:(8, 8)), forward output bitwise equal.The rebuild also re-resolves unpinned transitive packages and the FA3
kernels.lock(latestwas built 2026-09-27). Any drift is checked against.claude/skills/install-miles-diffusion/snapshot/and A/B'd with only diffusers swapped before it is attributed to diffusers.Follow-up
.claude/skills/install-miles-diffusion/snapshot/withrefresh.shfrom the rebuilt image after merge (the snapshot is a capture of the image, not hand-edited).Files
requirements.txt: diffusers git pin ->diffusers==0.41.0.miles/backends/fsdp_utils/configs/krea2.py: diffusers 0.40'sKrea2AttnProcessor.__call__, installed after the model materializes (trainer only); drop it once diffusers hands SDPA grouped K/V again.Checklist
pre-commit run --all-filespasses — run on the changed files only (passed), not on all filespytest -xis green — not run locally (no GPU/sglang env); full suites run in CI on thepr-<num>imagepython3 train.py --helpstill parses — N/A, no flags changed