Commit
•
8efdbe4
1
Parent(s):
781cb3e
Add `.to("cuda")` to the example snippet for float16 compatibility (#18)
Browse files- Add `.to("cuda")` to the example snippet for float16 compatibility (349f095973d462f0b75827cf4bc1ffe305860e74)
Co-authored-by: Anton Lozhkov <[email protected]>
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
|