Migrate qwenimage pipeline docstrings from torch_dtype to dtype - #14311
Migrate qwenimage pipeline docstrings from torch_dtype to dtype#14311iMountTai wants to merge 2 commits into
Conversation
|
Hi @iMountTai, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. |
ErenAta16
left a comment
There was a problem hiding this comment.
qwenimage/ comes out clean — grep -rn "torch_dtype" src/diffusers/pipelines/qwenimage/ returns nothing with this applied. The rest of the tree hasn't moved, though:
| location | remaining torch_dtype=torch. |
|---|---|
src/diffusers/pipelines/ (other families) |
358 occurrences across 240 files |
docs/ |
1075 |
A few of the neighbours, so it's clear this isn't a long tail of oddities:
src/diffusers/pipelines/flux2/pipeline_flux2.py:50
src/diffusers/pipelines/hunyuandit/pipeline_hunyuandit.py:52
src/diffusers/pipelines/helios/pipeline_helios.py:57,58
Both spellings still work — DiffusionPipeline.from_pretrained pops each and resolves them at pipeline_utils.py:785-787:
torch_dtype = kwargs.pop("torch_dtype", None)
dtype = kwargs.pop("dtype", None)
torch_dtype = dtype if dtype is not None else torch_dtypeso nothing breaks either way, and torch_dtype doesn't emit a deprecation warning from diffusers itself. The only place the tree treats it as legacy is pipeline_loading_utils.py:856, and that's about transformers ≥ 4.56 warning on its own side.
So this reads as the first slice of a rename that the docstrings will otherwise stay split on — half the examples using one spelling and half the other is worse for a reader than either spelling consistently. Worth saying in the PR whether more families are coming, or whether a single mechanical pass over src/diffusers/pipelines/ and docs/ is the intent.
Counted on diffusers @ 9f6fc2c with the PR applied.
PR huggingface#14205 deprecated torch_dtype in favor of dtype. Update all qwenimage pipeline docstring examples to use dtype= instead of torch_dtype=, following the new convention. Co-Authored-By: Claude <noreply@anthropic.com>
Mechanical replacement of torch_dtype= with dtype= across src/diffusers/pipelines/ docstring examples, following the deprecation in PR huggingface#14205. Co-Authored-By: Claude <noreply@anthropic.com>
2d48f92 to
b62745b
Compare
What does this PR do?
Follow-up to #14205, which deprecated
torch_dtypein favor ofdtype(following transformers). This PR updates allqwenimagepipeline docstring examples to usedtype=instead of the deprecatedtorch_dtype=, so the documentation no longer demonstrates the deprecated usage.Pure docstring change — no behavior change. Verified that both pipeline
from_pretrainedand modelfrom_pretrainedacceptdtype=.Before submitting
self-reviewskill on the diff?Who can review?
@yiyixuxu @dg845