Skip to content

cpu_offload #1047

@dblunk88

Description

@dblunk88

Describe the bug

I tried CPU offloading and found a few issues:

  1. if safety is set to None, it will error out. An if-else in the enable_sequential_cpu_offload should fix that
  2. multi-GPU use (I think) is not supported since it just offloads to cuda. Could add in an optional device passthrough to tell it where to load off
  3. I generator is set via cuda, it will give a runtime error that it expected a cpu type, but cuda was found
  4. Community pipe mega still needs support
  5. File completion goes from 10 seconds to 40 minutes, which leads me to believe that instead of CPU offloading, it actually just uses the CPU

Reproduction

No response

Logs

No response

System Info

Name: diffusers
Version: 0.7.0.dev0

Name: accelerate
Version: 0.13.2

Name: torch
Version: 1.12.1+cu116

10 GPUs

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