chore(deps): bump diffusers to 0.40.0 - #9550
Open
lstein wants to merge 1 commit into
Open
Conversation
Regenerates uv.lock. Beyond diffusers itself, the bump forces two transitive updates, both driven by diffusers 0.40's raised floor of huggingface-hub>=1.23.0 (0.39 required only >=0.34.0): diffusers 0.39.0 -> 0.40.0 huggingface-hub 1.21.0 -> 1.28.0 hf-xet 1.5.1 -> 1.6.0 Renames test_diffusers_039_compatibility.py and updates its version assertion to 0.40.0. The other contract assertions in that file pass unchanged. No source changes were needed. The upstream files InvokeAI vendors or monkeypatches (attention.py, attention_processor.py, unet_2d_condition.py, controlnet.py, embeddings.py, normalization.py, image_processor.py, and the SD/SDXL pipelines) are byte-identical in 0.40, so hidiffusion.py, util/hotfixes.py, custom_atttention.py and diffusers_pipeline.py are unaffected. Note for follow-up: torch_dtype= is now deprecated on pipeline loads (FutureWarning, removal targeted at 1.0.0) and will be emitted by model_loaders/stable_diffusion.py. It remains a silent alias on model loads. Not fixed here to keep the bump self-contained. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGWPxZg9rHrDz51b4BzsdY
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
Bumps the
diffuserspin from 0.39.0 to 0.40.0 and regeneratesuv.lock.Beyond diffusers itself, the bump forces two transitive updates, both driven by diffusers 0.40 raising its floor to
huggingface-hub>=1.23.0(0.39 required only>=0.34.0):No source changes were needed. Every upstream file this repo vendors or monkeypatches is byte-identical in 0.40 —
models/attention.py,attention_processor.py,unets/unet_2d_condition.py,unet_2d_blocks.py,controlnets/controlnet.py,embeddings.py,normalization.py,image_processor.py, and both the SD and SDXL pipelines — sobackend/hidiffusion/hidiffusion.py,backend/util/hotfixes.py,custom_atttention.pyanddiffusers_pipeline.pyare unaffected. The largest deletion in the release is the Flax backend, which this repo does not use.tests/backend/model_manager/load/test_diffusers_039_compatibility.pyis renamed to..._040_...with its version assertion updated. The other ten contract assertions in that file pass unchanged.Related Issues / Discussions
None.
QA Instructions
Full suite was run against both versions to separate pre-existing failures from bump-induced ones:
The single delta is the version-pin test itself, which fails under 0.39 and passes under 0.40 — exactly as intended. The remaining 8 failures are byte-identical across both runs and pre-existing on
main(test_model_manager_authorization,test_mistral_tokenizer_ladder×2,test_encoder_offload×2,test_pid_chunked_equivalence×3 — the last group emittingCUDA error: invalid device ordinal, environmental).Behavior changes in 0.40 that were traced to call sites and confirmed unreachable:
FlowMatchEulerDiscreteScheduler.set_timestepsno longer honors an explicitly passedtimesteps=; it now always recomputestimesteps = sigmas * num_train_timesteps. All 26set_timesteps(call sites passsigmas=ornum_inference_steps=, nevertimesteps=, so the changed branch is unreachable.ROPE_PER_DEVICE, but falls back to the old CUDA path for every device type exceptneuron. Numerically unchanged on cuda/cpu/mps/xpu/rocm.WanTransformer3DModel._keep_in_fp32_modulesgained"rope", whose buffers arepersistent=Falseand never appear in a state dict. The Wan loader also builds the model directly and callsload_state_dict, bypassingfrom_pretrainedentirely.unflatten(-1, (-1, head_dim))for tensor-parallel support; the reshape is identical attp_degree == 1.Since these were verified by reading upstream diffs rather than by generating images, a smoke test of the Krea-2 and Qwen-Image paths against a real model before merge would be worthwhile.
Merge Plan
Ordinary merge, but it moves
huggingface-hubby seven minor versions, so it is worth landing clear of a release cut. The hub API surface this repo touches (get_token,hf_hub_url,hf_hub_download,login/logout/whoami,HfApi.*,errors.*) was diffed across 1.21.0 → 1.28.0 with zero signature differences, and contributors will needuv syncafter pulling.Follow-up (deliberately not in this PR)
torch_dtype=is now deprecated on pipeline loads (FutureWarning, removal targeted at 1.0.0) and will be emitted bybackend/model_manager/load/model_loaders/stable_diffusion.py. It remains a silent alias on model loads. Passing bothdtypeandtorch_dtyperaisesValueError, which no call site does.Krea2AttnProcessornow performs the samerepeat_interleaveGQA expansion thatbackend/krea2/attention.pywas written to provide. The override still adds an explicitsdpa_kernelbackend preference so it is not dead, but its docstring rationale is stale.backend/wan/memory_optimization.pyvendors aWanTransformer3DModel.forwardreplacement that is now one line behind upstream (a.contiguous()added after the patch-embed transpose). Pre-existing, not introduced here.Checklist
What's Newcopy (if doing a release after this PR)🤖 Generated with Claude Code
https://claude.ai/code/session_01WGWPxZg9rHrDz51b4BzsdY