Skip to content

"NameError: name 'init_empty_weights' is not defined" when accelerate is not installed #4077

Description

@cstueckrath

https://github.com/huggingface/diffusers/blame/92a57a8e84a98a4da87b6a0621615eed4a23edc4/src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py#L1344

init_empty_weights() is imported from accelerate if is_accelerate_available() returns true. However if that's not the case there is no fallback.
We had to pin diffusers to 0.18.1 in nod-ai/AMD-SHARK-Studio#1648

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleIssues 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