Spaces:
Sleeping
Sleeping
Create app.py
Browse filesfalling leaves pix
app.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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)
|
| 6 |
+
pipe = pipe.to("cuda")
|
| 7 |
+
|
| 8 |
+
prompt = "wallpaper falling leaves"
|
| 9 |
+
image = pipe(prompt).images[0]
|
| 10 |
+
|
| 11 |
+
image.save("falling_leaves.png")
|