Skip to content

Conversation

DefTruth
Copy link
Contributor

@DefTruth DefTruth commented Sep 5, 2025

I'm the maintainer of cache-dit. cache-dit relies on type annotations to match the forward pattern of blocks more precisely. However, I found that there are a large number of type annotation errors in diffusers. For instance, HiDream, HunyuanVideo, cogvideox, auraflow, cogview, lumina, etc. This PR has fixed all related errors.

PTAL ~ @a-r-r-o-w @sayakpaul

for example, fix hidream type hint:

torch.Tensor -> Union[torch.Tensor, Tuple[torch.Tensor, torch.Tensor]]

@DefTruth
Copy link
Contributor Author

DefTruth commented Sep 5, 2025

@sayakpaul

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

Thanks so much! Left some comments.

@DefTruth
Copy link
Contributor Author

@sayakpaul PTAL~

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

Thanks!

@sayakpaul sayakpaul requested a review from DN6 September 15, 2025 05:58
@sayakpaul
Copy link
Member

@bot /style

Copy link
Contributor

Style fix is beginning .... View the workflow run here.

@HuggingFaceDocBuilderDev

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.

@yiyixuxu
Copy link
Collaborator

@bot /style

Copy link
Contributor

Style fix is beginning .... View the workflow run here.

@yiyixuxu
Copy link
Collaborator

can you run make style? somehow style bot cannot fix the formats here

@DefTruth
Copy link
Contributor Author

can you run make style? somehow style bot cannot fix the formats here

@yiyixuxu done, PTAL~

@yiyixuxu yiyixuxu merged commit efb7a29 into huggingface:main Sep 17, 2025
9 of 10 checks passed
@DefTruth DefTruth deleted the fix-many-type-hint-errors branch September 18, 2025 03:49
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.

4 participants