Skip to content

Fix duplicated words and a misspelling in messages and docstrings - #14287

Merged
stevhliu merged 1 commit into
huggingface:mainfrom
Sreekant13:docs/fix-typos-errors-docstrings
Aug 24, 2026
Merged

stevhliu merged 1 commit into
huggingface:mainfrom
Sreekant13:docs/fix-typos-errors-docstrings

Conversation

@Sreekant13

Copy link
Copy Markdown
Contributor

What does this PR do?

Removes accidental repeated words and fixes one misspelling. Text only, no behavior change.

Eight of these are in user-facing ValueError messages raised by the modular pipelines, which currently read "must have have batch size ...":

  • modular_pipelines/anima/before_denoise.py
  • modular_pipelines/helios/before_denoise.py
  • modular_pipelines/wan/before_denoise.py
  • modular_pipelines/z_image/before_denoise.py
  • modular_pipelines/qwenimage/inputs.py
  • modular_pipelines/qwenimage/before_denoise.py
  • modular_pipelines/stable_diffusion_3/inputs.py
  • modular_pipelines/flux/before_denoise.py

The remaining three are docstrings:

  • models/unets/unet_spatio_temporal_condition.py: "Dimension to to encode" becomes "Dimension to encode"
  • pipelines/flux/pipeline_flux_kontext_inpaint.py: "image batch to be be inpainted" becomes "to be inpainted"
  • pipelines/ltx2/pipeline_ltx2_condition.py: "arbitary" becomes "arbitrary"

No linked issue; this is a small text-only cleanup.

Before submitting

  • Did you use an AI agent (Claude Code, Codex, Cursor, etc.) to help with this PR? If so:
    • Did you read the Coding with AI agents guide?
    • Did you run the self-review skill on the diff?
    • Did you share the final self-review notes in the PR description or a comment?
  • Did you read the contributor guideline?
  • Did you read our philosophy doc? (important for complex PRs) (N/A: trivial text-only change)
  • Was this discussed/approved via a GitHub issue or the forum? (N/A: typo fix)
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings. (The docstrings themselves are what this PR corrects.)
  • Did you write any new necessary tests? (N/A: no behavior change)
  • Are you the author (or part of the team) of the model/pipeline (only applicable for model/pipeline related PRs)? (N/A)

Self-review notes

Claude Code was used to locate the typos and prepare the diff; I reviewed and verified every change myself before submitting.

Blocking issues: none. The diff is 11 files, 11 insertions, 11 deletions, each removing one repeated word or correcting one spelling. No code paths, control flow, or public signatures are touched, and no dead code is introduced.

Findings intentionally not fixed:

  1. pipelines/visualcloze/pipeline_visualcloze_combined.py and pipeline_visualcloze_generation.py contain "Images are missing in in-context examples." That looks like a repeated word but is correct English ("in" followed by "in-context"), so it is left alone.
  2. dataframe-style near misses such as "cast to to avoid" were checked for and only genuine repeats were changed.

Verification: all 11 changed files byte-compile, and a repeat scan of src/ for these patterns returns no remaining matches. The branch is based on current main (ed58810).

Who can review?

@stevhliu @sayakpaul (docs and general text), since this is a documentation and message wording change.

@github-actions

Copy link
Copy Markdown
Contributor

Hi @Sreekant13, 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.

@sayakpaul
sayakpaul requested a review from stevhliu July 26, 2026 10:32

@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 for the fixes!

@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

Copy link
Copy Markdown
Member

@bot style

@stevhliu

Copy link
Copy Markdown
Member

sorry looks like the styling bot is not working at the moment, would you mind fixing the failing CI checks?

@Sreekant13
Sreekant13 force-pushed the docs/fix-typos-errors-docstrings branch 2 times, most recently from e05915d to 4ab62e8 Compare August 15, 2026 08:20
@Sreekant13

Copy link
Copy Markdown
Contributor Author

Sorry for the delay, I was in between interviews. The check_code_quality failure was ruff format: removing the duplicated word shortened those raise ValueError(...) lines enough that they now fit on one line, so the formatter wanted to collapse the wrapped form. I have run ruff format and rebased onto main, so this should be green once the workflows are approved. Thanks for the review and approval @stevhliu.

@stevhliu

Copy link
Copy Markdown
Member

hmm, looks like its still failing. can you try running make quality again?

@github-actions

Copy link
Copy Markdown
Contributor

Hi @Sreekant13, a follow-up on the reminder above: this PR still does not link an issue it fixes.

Please note that PRs without a linked issue are likely to be automatically closed 10 days after this notice. Adding a closing keyword (e.g. Fixes #1234) to the PR description, or a maintainer adding the no-issue-needed label, will prevent that.

Remove accidental repeated words in eight "must have have batch size"
error messages raised by the modular pipelines, and in two docstrings
("Dimension to to encode", "image batch to be be inpainted"). Also fix
"arbitary" to "arbitrary" in the LTX2 pipeline docstring.

Text only, no behavior change.
@Sreekant13
Sreekant13 force-pushed the docs/fix-typos-errors-docstrings branch from 4ab62e8 to b242072 Compare August 23, 2026 02:30
@Sreekant13

Copy link
Copy Markdown
Contributor Author

Thanks for your patience @stevhliu. Two things were wrong on my side: I had been running a newer ruff than the pinned 0.9.10, and I had missed the doc-builder style step of make quality. That last one was the actual failure, shortening "to be be inpainted" meant the docstring paragraph needed reflowing. Fixed and pushed; make quality is clean locally now.

Also, the bot has flagged this for auto-closure since there is no linked issue. As it is just a typo fix, would you be able to add the no-issue-needed label? Happy to open an issue instead if you prefer.

@stevhliu
stevhliu merged commit efabd60 into huggingface:main Aug 24, 2026
19 checks passed
@Sreekant13

Copy link
Copy Markdown
Contributor Author

Thanks for merging this @stevhliu, and thanks for your patience with the CI. For the record, in case it helps anyone hitting the same wall: my failure was running a newer ruff than the pinned 0.9.10, and then only running part of make quality. The step that was actually failing was doc-builder style, because removing a duplicated word shortened a docstring line and freed a reflow.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants