add enable sequential cpu offloading to other stable diffusion pipelines#1085
add enable sequential cpu offloading to other stable diffusion pipelines#1085patrickvonplaten merged 17 commits intohuggingface:mainfrom
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
|
@patrickvonplaten the tests that are not passing seem to be related to the Same happened with #1010 btw. Edit: nevermind you fixed it lightning fast. |
…load is enabled with fp16 Co-authored-by: Pedro Gengo <pedro.gabriel.lourenco@hotmail.com>
|
@patrickvonplaten I've added @pedrogengo to d6fcb91 because he found the bug that this commit solves and helped me find the solution. |
|
@piEsposito After line 402 of inpaint pipeline file you should add:
To make sure that all tensors are on the same device. Unfortunately, I could not comment direct on the file. |
Co-authored-by: Pedro Gengo <pedro.gabriel.lourenco@hotmail.com>
|
@patrickvonplaten thank you for the kindness of addreessing your review. |
|
Thanks a lot the PR :-) |
* make some paths windows friendly (huggingface#1066) * add csv output to builder script and reduce number of models tested
…nes (huggingface#1085) * add enable sequential cpu offloading to other stable diffusion pipelines * trigger ci * fix styling * interpolate before converting to device to avoid breking when cpu_offload is enabled with fp16 Co-authored-by: Pedro Gengo <pedro.gabriel.lourenco@hotmail.com> * style again I need to stop forgething this thing * fix inpainting bug that could cause device misalignment Co-authored-by: Pedro Gengo <pedro.gabriel.lourenco@hotmail.com> * Apply suggestions from code review Co-authored-by: Pedro Gengo <pedro.gabriel.lourenco@hotmail.com> Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Follow up of #1024
Adds
enable_sequential_cpu_offloadmethod toStableDiffusionInpaintPipelineandStableDiffusionImg2ImgPipelinealongs with proper tests.Also renames the test on
StableDiffusionPipeline.enable_sequential_cpu_offloadtotest_stable_diffusion_pipeline_with_sequential_cpu_offloadingfor clarity.@patrickvonplaten here I'm just adding the
enable_sequential_cpu_offloadmethod to the img2img and inpainting pipelines for Stable Diffusion.