Skip to content

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

Open
revanth-045 wants to merge 1 commit into
huggingface:mainfrom
revanth-045:docs/fix-docstring-arg-names
Open

revanth-045 wants to merge 1 commit into
huggingface:mainfrom
revanth-045:docs/fix-docstring-arg-names

Conversation

@revanth-045

Copy link
Copy Markdown

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

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.

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.

1 participant