Repository navigation
Conversation
…ples
The deprecate('non_ema_revision!=None', '0.15.0', ...) call expired: the
deprecation helper now raises on any removal-past version, so the plain
--revision=main flow (parser defaults non_ema_revision to revision)
crashes with TypeError: deprecate() got an unexpected keyword argument
'message' before model loading. Drop the six expired blocks and their
unused imports. Verified: the text-to-image example trains end to end
with --revision=main on the tiny SD checkpoint after this change.
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
mingyi456
added a commit
to mingyi456/diffusers
that referenced
this pull request
Oct 24, 2026
…/mingyi456/diffusers into animatextconditioner-single-file * 'animatextconditioner-single-file' of https://github.com/mingyi456/diffusers: (50 commits) Remove expired non_ema_revision deprecation blocks from training examples (huggingface#15118) Remove duplicated converter and fix import order Update src/diffusers/loaders/single_file_utils.py add fibo-2 LoRA training and loading (huggingface#15084) [ci] fix compilation CI. (huggingface#15092) [LoRA] apply .alpha to Qwen-Image lora_A/lora_B LoRAs (huggingface#15016) Use HF Trusted Publisher token in update_metadata workflow (huggingface#15096) [ci] skip bf16 precision test on T4. (huggingface#15091) [LTX-2] Add `motion_speed` to condition the positional time base apart from the playback frame rate (huggingface#14967) [ci] fix misnamed test steps in push_tests.yml (huggingface#15094) [ci] use python 3.11 when using metadata. (huggingface#15093) Fix model imports when torchao is older than 0.15 (huggingface#15095) [tests] xfail some kandinsky6 tests (huggingface#14977) Add RFD4-Proteina (huggingface#15088) Add Bria fibo-2 (huggingface#14991) Fix PyArrow compatibility in CPU CI (huggingface#15082) [feat] add KVAE-Audio autoencoder (huggingface#14384) move unpack out of the flux, krea2 and ltx decoders into the core denoise groups (huggingface#14737) post-release 0.41.0 (huggingface#15062) FLUX.3: match the released BFL reference image sizing (huggingface#15073) ...
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 does this PR do?
Fixes #15115. Every training example that owns a
--non_ema_revisionargument still callsdeprecate("non_ema_revision!=None", "0.15.0", message=...), but the helper's removal-past-version guard (src/diffusers/utils/deprecation_utils.py) now raises on any version ≥ 0.15.0. Since the parser defaultsnon_ema_revisiontorevision, simply passing the ordinary--revision=mainreaches the block and crashes before model loading:This removes the six expired blocks (and their now-unused
deprecateimports) from:examples/text_to_image/train_text_to_image.pyexamples/instruct_pix2pix/train_instruct_pix2pix.pyexamples/instruct_pix2pix/train_instruct_pix2pix_sdxl.pyexamples/research_projects/instructpix2pix_lora/train_instruct_pix2pix_lora.pyexamples/research_projects/onnxruntime/text_to_image/train_text_to_image.pyexamples/research_projects/scheduled_huber_loss_training/text_to_image/train_text_to_image.pyNothing else changes: parsers, revision handling, and loading calls are untouched, so the deprecation itself (already past its removal version) is simply enforced rather than crashing the scripts that pin it.
Fixes #15115
Who can review?
Training examples: @sayakpaul @linoytsaban
Before submitting
self-reviewskill on the diff?Self-review notes
Self-reviewed the full diff against the rubric. Findings fixed during review: the
instructpix2pix_lorascript importeddeprecatealongside other names — the unused import is dropped too, keeping the import list honest. What I intentionally did not do: no behavioral guard replacing the removed block (the deprecation is long past its removal version; a warning there would be new behavior outside this issue's scope), and no changes to the SDXL/research scripts beyond the same block removal (their revision-loading paths are otherwise untouched and untested here).Verification
Live run of the issue's exact repro flow on this branch (tiny SD checkpoint, CPU, 2 steps,
--revision=main):On the unpatched tree the same command dies at startup with
TypeError: deprecate() got an unexpected keyword argument 'message'— the reported crash. All six edited scripts compile (py_compile).