Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Sunset Python 3.8 & get rid of explicit typing exports where possible#12524

Merged
sayakpaul merged 75 commits into
mainfrom
remove-explicit-typing
Feb 13, 2026
Merged

Sunset Python 3.8 & get rid of explicit typing exports where possible#12524
sayakpaul merged 75 commits into
mainfrom
remove-explicit-typing

Conversation

@sayakpaul

@sayakpaul sayakpaul commented Oct 21, 2025

Copy link
Copy Markdown
Member

What does this PR do?

Python 3.8 has grown quite old, and I don't think any HF library has it as a minimum requirement.

Sunsetting this version also allows us to take advantage of the implicit typing support (List[float] -> list[float], for example).

The main changes to review are in:

  • src/diffusers/pipelines/pipeline_utils.py
  • src/diffusers/utils/typing_utils.py

@sayakpaul sayakpaul marked this pull request as draft October 22, 2025 00:42
@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.

Comment thread setup.py Outdated
@sayakpaul sayakpaul marked this pull request as ready for review October 27, 2025 12:53
@sayakpaul sayakpaul requested a review from DN6 October 27, 2025 12:53
@DN6 DN6 added the roadmap Add to current release roadmap label Jan 15, 2026
@github-actions

github-actions Bot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions Bot added the stale Issues that haven't received updates label Feb 8, 2026
Comment thread src/diffusers/pipelines/pipeline_utils.py
@sayakpaul sayakpaul removed the stale Issues that haven't received updates label Feb 11, 2026
return tensor


class AllGatherAnythingFunction(torch.autograd.Function):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Perhaps added by mistake?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's there in main:

class AllGatherAnythingFunction(torch.autograd.Function):

Comment thread src/diffusers/loaders/peft.py Outdated
Comment thread src/diffusers/models/controlnet.py Outdated
Comment thread src/diffusers/modular_pipelines/node_utils.py Outdated
@sayakpaul sayakpaul merged commit 2843b3d into main Feb 13, 2026
31 of 33 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Diffusers Roadmap 0.39 Feb 13, 2026
@sayakpaul sayakpaul deleted the remove-explicit-typing branch February 13, 2026 12:48
@yiyixuxu yiyixuxu requested a review from Copilot February 14, 2026 20:32
self._input_fields: Dict[str, Union[str, Tuple[str, str]]] = None
self._enabled = enabled
self._input_fields: dict[str, str | tuple[str, str]] = None
self._enabled = True

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
self._enabled = True
self._enabled = enabled

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

Labels

roadmap Add to current release roadmap

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants