Skip to content

[docs] Fix docstring parameters that functions don't take - #15466

Open
ishtiaq-ahmed-dev wants to merge 1 commit into
huggingface:mainfrom
ishtiaq-ahmed-dev:fix-docstring-params-15363-v2
Open

ishtiaq-ahmed-dev wants to merge 1 commit into
huggingface:mainfrom
ishtiaq-ahmed-dev:fix-docstring-params-15363-v2

Conversation

@ishtiaq-ahmed-dev

@ishtiaq-ahmed-dev ishtiaq-ahmed-dev commented Dec 3, 2026 •

Copy link
Copy Markdown

What does this PR do?

Fixes #15363 (opened after @stevhliu's go-ahead in the issue).

Fixes the 13 docstrings listed in the issue that document parameter names their functions don't have. Docstrings only, no code changes.

Renamed to the real parameter:

  • AmusedLoraLoaderMixin.save_lora_weights: unet_lora_layers → transformer_lora_layers
  • check_peft_version: version → min_version
  • _dict_to_component_spec: specdict → spec_dict
  • AltDiffusionPipeline / AltDiffusionImg2ImgPipeline.get_guidance_scale_embedding: timesteps → w (description and return shape now refer to w)
  • BaseGuidance._prepare_batch: input_fields (not a parameter) replaced by entries for the real data and identifier arguments, based on what the method does with them

Removed (no such parameter):

  • QuantizationConfigMixin.to_json_file: use_diff
  • HunyuanImageRefinerPipeline.encode_prompt: prompt_embeds_2, prompt_embeds_mask_2
  • I2VGenXLPipeline.encode_prompt: do_classifier_free_guidance
  • VersatileDiffusionPipeline.dual_guided: negative_prompt
  • BoundingBoxVolume.intersect: params
  • _apply_taylorseer_cache_hook: name
  • download_from_original_stable_diffusion_ckpt: is_img2img, and the return: line that sat under Args: is now a Returns: section

Checks: none of the edited functions has a # Copied from marker, and no other function is copied from them. ruff check and ruff format --check pass on the changed files, and re-running the signature check reports none of the 13 entries.

Note: #15425 by @M-Colley also targets this issue and was opened before the go-ahead. The two are nearly identical; the main difference is _prepare_batch, where this PR documents that data values can be tensors (used as-is) or tuples (indexed with tuple_index). Please go with whichever you prefer.

Before submitting

Who can review?

@stevhliu

@stevhliu stevhliu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: 13 docstrings document parameters their functions don't have

2 participants