Add `.to("cuda")` to the example snippet for float16 compatibility
#18
by
anton-l
HF staff
- opened
README.md
CHANGED
@@ -48,6 +48,7 @@ pipe = StableDiffusionInpaintPipeline.from_pretrained(
|
|
48 |
"stabilityai/stable-diffusion-2-inpainting",
|
49 |
torch_dtype=torch.float16,
|
50 |
)
|
|
|
51 |
prompt = "Face of a yellow cat, high resolution, sitting on a park bench"
|
52 |
#image and mask_image should be PIL images.
|
53 |
#The mask structure is white for inpainting and black for keeping as is
|
|
|
48 |
"stabilityai/stable-diffusion-2-inpainting",
|
49 |
torch_dtype=torch.float16,
|
50 |
)
|
51 |
+
pipe.to("cuda")
|
52 |
prompt = "Face of a yellow cat, high resolution, sitting on a park bench"
|
53 |
#image and mask_image should be PIL images.
|
54 |
#The mask structure is white for inpainting and black for keeping as is
|