Skip to content

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

Closed
@jinc7461

Description

@jinc7461

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions