update the readme to fix the image-to-image example
Browse files- add `import torch`
- include `pipe.to("cuda")`
README.md
CHANGED
@@ -95,8 +95,10 @@ below.
|
|
95 |
```py
|
96 |
from diffusers import AutoPipelineForImage2Image
|
97 |
from diffusers.utils import load_image
|
|
|
98 |
|
99 |
pipe = AutoPipelineForImage2Image.from_pretrained("stabilityai/sdxl-turbo", torch_dtype=torch.float16, variant="fp16")
|
|
|
100 |
|
101 |
init_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png").resize((512, 512))
|
102 |
|
|
|
95 |
```py
|
96 |
from diffusers import AutoPipelineForImage2Image
|
97 |
from diffusers.utils import load_image
|
98 |
+
import torch
|
99 |
|
100 |
pipe = AutoPipelineForImage2Image.from_pretrained("stabilityai/sdxl-turbo", torch_dtype=torch.float16, variant="fp16")
|
101 |
+
pipe.to("cuda")
|
102 |
|
103 |
init_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png").resize((512, 512))
|
104 |
|