Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
from diffusers import StableDiffusionPipeline
|
|
|
2 |
|
3 |
model_id = "runwayml/stable-diffusion-v1-5"
|
4 |
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
@@ -7,3 +8,4 @@ prompt = "a photo of an astronaut riding a horse on mars"
|
|
7 |
image = pipe(prompt).images[0]
|
8 |
|
9 |
image.save("astronaut_rides_horse.png")
|
|
|
|
1 |
from diffusers import StableDiffusionPipeline
|
2 |
+
import torch
|
3 |
|
4 |
model_id = "runwayml/stable-diffusion-v1-5"
|
5 |
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
|
|
8 |
image = pipe(prompt).images[0]
|
9 |
|
10 |
image.save("astronaut_rides_horse.png")
|
11 |
+
|