Skip to content

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

Open
Sreekant13 wants to merge 1 commit into
huggingface:mainfrom
Sreekant13:docs/fix-typos-errors-docstrings
Open

Fix duplicated words and a misspelling in messages and docstrings#14287
Sreekant13 wants to merge 1 commit into
huggingface:mainfrom
Sreekant13:docs/fix-typos-errors-docstrings

Conversation

@Sreekant13

Copy link
Copy Markdown

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.

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

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.

1 participant