vikasp commited on
Commit
90c16b1
1 Parent(s): 2c4b5b9

update the readme to fix the image-to-image example

Browse files

- add `import torch`
- include `pipe.to("cuda")`

Files changed (1) hide show
  1. README.md +2 -0
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