Skip to content

sequential cpu offload causes > 3x slowdown #2266

@keturn

Description

@keturn

Using StableDiffusionPipeline.enable_sequential_cpu_offload causes massive slowdown. e.g. from 6 it/s to 2.

Reproduction

Standard pipeline:

pipe = diffusers.StableDiffusionPipeline.from_pretrained(
    "runwayml/stable-diffusion-v1-5",
    revision="fp16", torch_dtype=torch.float16,
)
pipe.enable_sequential_cpu_offload()
x = pipe("a jockey riding a dragon on mars")

System Info

  • diffusers version: 0.12.1
  • Platform: Linux-5.15.0-58-generic-x86_64-with-glibc2.35
  • Python version: 3.10.6
  • PyTorch version (GPU?): 1.13.1+cu117 (True)
  • Huggingface_hub version: 0.12.0
  • Transformers version: 0.16.0
  • Accelerate version: not installed env lied, it is 0.16.0
  • xFormers version: 0.0.16
  • Using GPU in script?: RTX 3060

Metadata

Metadata

Assignees

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