Skip to content

docs: improve docstring scheduling folder - last batch - #14330

Open
delmalih wants to merge 2 commits into
huggingface:mainfrom
delmalih:improve-docstring-scheduling-last-batch
Open

docs: improve docstring scheduling folder - last batch#14330
delmalih wants to merge 2 commits into
huggingface:mainfrom
delmalih:improve-docstring-scheduling-last-batch

Conversation

@delmalih

Copy link
Copy Markdown
Contributor

What does this PR do?

This PR improves the docstrings and type hints in src/diffusers/schedulers/scheduling_ltx_euler_ancestral_rf.py, src/diffusers/schedulers/scheduling_utils.py and src/diffusers/schedulers/scheduling_vq_diffusion.py to follow the project conventions as described in #9567.
Fixes #9567

Context

This is part of a broader effort to improve documentation across all scheduler files in src/diffusers/schedulers/. See issue #9567 for details.

Testing

  • Code passes make style
  • Code passes make quality
  • Code passes make fix-copies
  • Existing tests still pass

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline?
  • Did you read our philosophy doc (important for complex PRs)?
  • Was this discussed/approved via a GitHub issue or the forum? issue.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests? (N/A - documentation only changes)

Who can review?

cc @stevhliu for review

@github-actions github-actions Bot added size/L PR with diff > 200 LOC fixes-issue schedulers labels Jul 29, 2026

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

Huge thanks for nearly single-handedly improving all these docstrings 👏 !

The subfolder location of a model file within a larger model repository on the Hub or locally.
return_unused_kwargs (`bool`, *optional*, defaults to `False`):
Whether kwargs that are not consumed by the Python class should be returned or not.
cache_dir (`str | os.PathLike`, *optional*):

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.

I wonder if removing all these args and replacing with a generic kwargs (even though it does avoid duplicating ConfigMixin.load_config), it'd make it more difficult for users to discover what they are? wdyt @sayakpaul ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point! I initially grouped them under kwargs to keep the documented arguments aligned with the explicit signature and avoid duplicating ConfigMixin.load_config. But I agree that keeping the forwarded loading options documented here is more helpful for discoverability. I’ll restore them while keeping the added type hints and Returns section.

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

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[community] Improving docstrings and type hints

3 participants