Skip to content

Conversation

@delmalih
Copy link

@delmalih delmalih commented Nov 10, 2025

What does this PR do?

This PR improves the docstrings and type hints in src/diffusers/schedulers/scheduling_ddim.py to follow the project conventions as described in #9567.

Changes made:

First commit: Initial improvements

  • Added complete type hints for all function parameters and return types
  • Enhanced docstrings to follow project conventions
  • Added missing parameter descriptions

Second commit: Further enhancements

  • Updated parameter types and descriptions for improved clarity
  • Refined method docstrings explanations to better align with project standards
  • Added optional annotations for parameters where applicable

Summary of improvements:

  • ✅ Complete type hint coverage across all functions
  • ✅ Consistent docstring formatting with Args and Returns sections
  • ✅ Clear and comprehensive parameter descriptions
  • ✅ Proper use of optional type annotations
  • ✅ Full alignment with project documentation standards

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
  • 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 @yiyixuxu @stevhliu @a-r-r-o-w for review

- Add complete type hints for all function parameters
- Enhance docstrings to follow project conventions
- Add missing parameter descriptions

Fixes huggingface#9567
- Update parameter types and descriptions for clarity
- Improve explanations in method docstrings to align with project standards
- Add optional annotations for parameters where applicable
- Update parameter types to use Literal for specific string options
- Enhance docstring descriptions for clarity and consistency
- Ensure all parameters have appropriate type annotations and defaults
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant