Merge branch 'main' of https://huggingface.co/runwayml/stable-diffusion-v1-5 into main
Browse files
README.md
CHANGED
@@ -32,11 +32,12 @@ You can use this both with the [🧨Diffusers library](https://github.com/huggin
|
|
32 |
```py
|
33 |
from diffusers import StableDiffusionPipeline
|
34 |
|
|
|
35 |
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16")
|
36 |
pipe = pipe.to(device)
|
37 |
|
38 |
prompt = "a photo of an astronaut riding a horse on mars"
|
39 |
-
image = pipe(prompt
|
40 |
|
41 |
image.save("astronaut_rides_horse.png")
|
42 |
```
|
|
|
32 |
```py
|
33 |
from diffusers import StableDiffusionPipeline
|
34 |
|
35 |
+
model_id = "runwayml/stable-diffusion-v1-5"
|
36 |
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16")
|
37 |
pipe = pipe.to(device)
|
38 |
|
39 |
prompt = "a photo of an astronaut riding a horse on mars"
|
40 |
+
image = pipe(prompt).images[0]
|
41 |
|
42 |
image.save("astronaut_rides_horse.png")
|
43 |
```
|