CPU offloading currently done in a hacky way.
Describe the bug
It seems like accelerate doesn't yet support cpu offloading of modules that have single parameters such as:
https://github.com/huggingface/diffusers/blob/29021090614641d2509155ca0021497896228999/src/diffusers/pipelines/stable_diffusion/safety_checker.py#L44
which forces one to do the following: https://github.com/huggingface/diffusers/blob/2c6bc0f13ba2ba609ac141022b4b56b677d74943/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L238 in the stable diffusion pipeline.
Need to investigate more before posting an issue on accelerate codebase.
Reproduction
No response
Logs
No response
System Info
"main"
I won't find time to fix this anytime soon I believe. Also don't think it's a big problem.
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
This was actually fixed - cpu offloading is clean now :heart: