diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

inpainting doesn't work with CPU

Open krrishdholakia opened this issue 3 years ago • 5 comments

Describe the bug

Screen Shot 2022-08-30 at 3 59 50 PM Using the inpainting example but trying to run it on the cpu instead of gpu (since i'm trying to push to hf space).

Hitting this runtime error: RuntimeError: Input type (torch.FloatTensor) and weight type (torch.HalfTensor) should be the same or input should be a MKLDNN tensor and weight is a dense tensor

Reproduction

Try and run pipeline in cpu

Logs

No response

System Info

using google colab

krrishdholakia avatar Aug 30 '22 23:08 krrishdholakia

cc: @patil-suraj

krrishdholakia avatar Aug 30 '22 23:08 krrishdholakia

https://colab.research.google.com/github/patil-suraj/Notebooks/blob/master/in_painting_with_stable_diffusion_using_diffusers.ipynb

krrishdholakia avatar Aug 30 '22 23:08 krrishdholakia

tried using the updated pipeline - StableDiffusionInpaintPipeline Screen Shot 2022-08-30 at 5 59 48 PM

but it doesn't seem to have been uploaded yet

krrishdholakia avatar Aug 31 '22 01:08 krrishdholakia

@krrishdholakia does it still not work on CPU? cc'ing our in-painting authors here: @patil-suraj and @anton-l

patrickvonplaten avatar Sep 13 '22 15:09 patrickvonplaten

@patil-suraj could you take a look here?

patrickvonplaten avatar Oct 10 '22 13:10 patrickvonplaten

Hey @krrishdholakia , sorry to come to this only now. The pipeline should work on CPU, I suspect that you are setting the torch_dtype=torch.float16 , which won't on CPU as it does as fp16 is not supported on CPU, please pass torch_dtype=torch.float32 to make sure it works on CPU.

patil-suraj avatar Oct 26 '22 15:10 patil-suraj

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.

github-actions[bot] avatar Nov 20 '22 15:11 github-actions[bot]