Skip to content

Since last update of transformers I can't import diffusers modules #11343

Open
@ParisNeo

Description

@ParisNeo

Describe the bug

After updating pytorch, and transformers to latest version, diffusers stopped working:

My code: from diffusers import CogVideoXPipeline, StableVideoDiffusionPipeline, MochiPipeline

Failed to import diffusers.loaders.lora_pipeline because of the following error (look up to see its traceback):
cannot import name 'shard_checkpoint' from 'transformers.modeling_utils'

I tested both the github version and the pipy versoin

Reproduction

upgrade pytorch and transformers to v 4.51.3
try to import videogeneration pipelines:
from diffusers import CogVideoXPipeline, StableVideoDiffusionPipeline, MochiPipeline

I get theerror:

Failed to import diffusers.loaders.lora_pipeline because of the following error (look up to see its traceback):
cannot import name 'shard_checkpoint' from 'transformers.modeling_utils'

Logs

System Info

Windows

Who can help?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleIssues that haven't received updates

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions