Commit
·
19fc41b
1
Parent(s):
6cf1aef
Update README.md
Browse files
README.md
CHANGED
|
@@ -66,12 +66,12 @@ model_id = "CompVis/stable-diffusion-v1-2"
|
|
| 66 |
device = "cuda"
|
| 67 |
|
| 68 |
|
| 69 |
-
pipe = StableDiffusionPipeline.from_pretrained(model_id
|
| 70 |
pipe = pipe.to(device)
|
| 71 |
|
| 72 |
prompt = "a photo of an astronaut riding a horse on mars"
|
| 73 |
with autocast("cuda"):
|
| 74 |
-
image = pipe(prompt
|
| 75 |
|
| 76 |
image.save("astronaut_rides_horse.png")
|
| 77 |
```
|
|
|
|
| 66 |
device = "cuda"
|
| 67 |
|
| 68 |
|
| 69 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id)
|
| 70 |
pipe = pipe.to(device)
|
| 71 |
|
| 72 |
prompt = "a photo of an astronaut riding a horse on mars"
|
| 73 |
with autocast("cuda"):
|
| 74 |
+
image = pipe(prompt)["sample"][0]
|
| 75 |
|
| 76 |
image.save("astronaut_rides_horse.png")
|
| 77 |
```
|