Skip to content

Running diffusers with torch-DDP leads to warning on stride mismatch #11083

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jinc7461 opened this issue Mar 17, 2025 · 1 comment · Fixed by #11098
Closed

Running diffusers with torch-DDP leads to warning on stride mismatch #11083

jinc7461 opened this issue Mar 17, 2025 · 1 comment · Fixed by #11098
Labels
bug Something isn't working

Comments

@jinc7461
Copy link
Contributor

Describe the bug

This issue has already been reported at #3809 Through an analysis of the mismatched network parameters, it was found that modifying line 369 in diffusers/models/resnet.py from:

input_tensor = self.conv_shortcut(input_tensor)

to

input_tensor = self.conv_shortcut(input_tensor.contiguous())

resolves the problem.

Reproduction

This issue has already been reported at #3809.

Logs

System Info

Diffusers: diffusers==0.31.0
Torch: torch==2.6.0
Python: Python 3.10.15

Who can help?

@DN6 @yiyixuxu @sayakpaul

@jinc7461 jinc7461 added the bug Something isn't working label Mar 17, 2025
@hlky
Copy link
Contributor

hlky commented Mar 17, 2025

Hi @jinc7461. Thanks for raising this and providing the fix, would you like to open a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants