Skip to content

"sequential model offloading" Error #2782

Description

@Feniksss

Describe the bug

Hi all!
Example code:
pipe = StableDiffusionPipeline.from_pretrained(
"runwayml/stable-diffusion-v1-5",
revision="fp16",
torch_dtype=torch.float16,
use_auth_token=access_token,
device_map="auto",
)

And we started getting an error

ValueError: It seems like you have activated sequential model offloading by calling enable_sequential_cpu_offload, but are now attempting to move the pipeline to GPU. This is not compatible with offloading. Please, move your pipeline .to('cpu') or consider removing the move altogether if you use sequential offloading.

The cause of error - device_map=auto
But I some confused - why didn't we get the error earlier? what has been changed?

Reproduction

pipe = StableDiffusionPipeline.from_pretrained(
"runwayml/stable-diffusion-v1-5",
revision="fp16",
torch_dtype=torch.float16,
use_auth_token=access_token,
device_map="auto",
)

Logs

No response

System Info

GKE T4 cluster
torch 1.13.1+cu117
diffusers 0.14.0

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