Skip to content

[docs] Fix docstring arguments that don't match the signatures - #14778

Merged
stevhliu merged 1 commit into
huggingface:mainfrom
revanth-045:docs/fix-docstring-arg-names
Sep 21, 2026
Merged

stevhliu merged 1 commit into
huggingface:mainfrom
revanth-045:docs/fix-docstring-arg-names

Conversation

@revanth-045

Copy link
Copy Markdown
Contributor

What does this PR do?

Four public docstrings describe parameters the functions don't accept (or a return type they don't produce), so the rendered API docs mislead callers:

Function Docstring says Signature has
TransformerSpatioTemporalModel.forward num_frames (int) (not a parameter — frames are inferred from image_only_indicator)
get_2d_rotary_pos_embed_lumina grid (np.ndarray) len_h, len_w (now documented)
AutoencoderKLHunyuanImageRefiner.tiled_decode return_dict; returns DecoderOutput or tuple (no return_dict; returns torch.Tensor)
AutoencoderKLHunyuanVideo15.tiled_decode return_dict; returns DecoderOutput or tuple (no return_dict; returns torch.Tensor)

Docstring-only; no behaviour changes. None of the touched blocks are # Copied from targets. ruff check, ruff format --check, and doc-builder style --check_only pass on the changed files.

Before submitting

🤖 Generated with Claude Code

- TransformerSpatioTemporalModel.forward: no num_frames parameter
- get_2d_rotary_pos_embed_lumina: parameters are len_h / len_w, not grid
- AutoencoderKLHunyuanImageRefiner / AutoencoderKLHunyuanVideo15.tiled_decode:
  no return_dict parameter; they return a plain tensor

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions github-actions Bot added models size/S PR with diff < 50 LOC labels Sep 15, 2026
@github-actions

github-actions Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Hi @revanth-045, 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. Fixes #1234) to the PR description so the issue is linked. See the contribution guide for more details. If this PR intentionally does not fix a tracked issue, a maintainer can add the no-issue-needed label to silence this reminder.

Please note that PRs without a linked issue are likely to be automatically closed 10 days after this notice.

Once the PR links an issue (or gets the no-issue-needed label), you can ignore this message — it stays here as a comment, but it no longer applies.

@sayakpaul
sayakpaul requested a review from stevhliu September 21, 2026 08:07

@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!

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.

@stevhliu
stevhliu merged commit 93d88c1 into huggingface:main Sep 21, 2026
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

models size/S PR with diff < 50 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants