Docs: 13 docstrings document parameters their functions don't have
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- documentation
Research direction
Start with the 13 listed functions under src/diffusers and compare each docstring entry with its function signature. Rename or remove only the mismatched entries, keeping the changes inside docstrings; the five deprecated pipeline entries are optional. Done when all listed parameter names match their signatures and the misplaced Returns note is corrected.
Written by the indexing model from the issue text.
Description
Describe the bug
Thirteen docstrings under src/diffusers document parameters that their functions don't have. Usually it's an old name left behind after a rename. Several are public API, so the wrong name shows up in the rendered docs and in IDE tooltips, and anyone who copies it gets a TypeError:
AmusedLoraLoaderMixin.save_lora_weightsdocumentsunet_lora_layers; the parameter istransformer_lora_layers.QuantizationConfigMixin.to_json_filedocumentsuse_diff, which it doesn't take (it always writesto_dict()).utils.peft_utils.check_peft_versiondocumentsversion; the parameter ismin_version.HunyuanImageRefinerPipeline.encode_promptdocumentsprompt_embeds_2andprompt_embeds_mask_2, which it doesn't take.
The full list (file:line function: documented name(s) missing from the signature):
guiders/guider_utils.py:202 _prepare_batch: input_fields
hooks/taylorseer_cache.py:315 _apply_taylorseer_cache_hook: name
loaders/lora_pipeline.py:2300 save_lora_weights: unet_lora_layers
modular_pipelines/modular_pipeline.py:2893 _dict_to_component_spec: specdict
pipelines/deprecated/alt_diffusion/pipeline_alt_diffusion.py:648 get_guidance_scale_embedding: timesteps
pipelines/deprecated/alt_diffusion/pipeline_alt_diffusion_img2img.py:720 get_guidance_scale_embedding: timesteps
pipelines/deprecated/i2vgen_xl/pipeline_i2vgen_xl.py:162 encode_prompt: do_classifier_free_guidance
pipelines/deprecated/shap_e/renderer.py:299 intersect: params
pipelines/deprecated/versatile_diffusion/pipeline_versatile_diffusion.py:302 dual_guided: negative_prompt
pipelines/hunyuan_image/pipeline_hunyuanimage_refiner.py:225 encode_prompt: prompt_embeds_2, prompt_embeds_mask_2
pipelines/stable_diffusion/convert_from_ckpt.py:1145 download_from_original_stable_diffusion_ckpt: is_img2img, return (the last is a Returns note placed under Args)
quantizers/quantization_config.py:97 to_json_file: use_diff
utils/peft_utils.py:381 check_peft_version: version
I found these by parsing every function with ast and comparing its Args: names with the signature. Functions with *args/**kwargs are skipped, so there are no false positives from forwarded arguments.
Proposed fix
A single docs-only PR that renames or removes the 13 entries, staying inside the docstrings. The five under pipelines/deprecated/ can be left out if you'd rather not touch deprecated code. Following the contributing guide, I'm checking here first: may I open that PR?
Reproduction
For example, check_peft_version(version="0.6.0") raises TypeError: check_peft_version() got an unexpected keyword argument 'version', as its docstring suggests that name.
System Info
main at the current HEAD; docstrings only.
- Dominant language
- Python
- Stars
- 35k
- Forks
- 7.5k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 58
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from huggingface/diffusers
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
huggingface/diffusers#15436 · 1 comment ·
Maintainers usually reply within 1 day
-
InpaintProcessor crashes when padding_mask_crop is set and a dimension is omittedPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
huggingface/diffusers#15433 ·
Maintainers usually reply within 1 day
-
LTXEulerAncestralRFScheduler skips signal scaling with s_noise=0Possibly taken @hparik11 claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
huggingface/diffusers#15423 · 2 comments ·
Maintainers usually reply within 1 day
-
`ZImageImg2ImgPipeline` / `ZImageInpaintPipeline`: explicit height/width different from the input image raises RuntimeErrorPossibly taken @chessing234 claimed this 11 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
huggingface/diffusers#15337 · 3 comments ·
Maintainers usually reply within 1 day
-
Multi-vector textual inversion uses only the first vector when the token has uppercase letters (transformers v5)Possibly taken @houyunsun claimed this 13 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
huggingface/diffusers#15313 ·
Maintainers usually reply within 1 day
All issues in huggingface/diffusers
Similar issues
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
MakazhanAlpamys/Soup#3589 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/clickhouse-connect#1266 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
biosustain/growthcurves_app#89 ·
Maintainers usually reply within 1 day
-
`LogProxyConsumer._on_relation_departed` raises `APIError` when the promtail service does not existOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
canonical/loki-k8s-operator#695 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day