Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,10 @@
|
|
| 1 |
-
from diffusers import
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
| 5 |
|
| 6 |
-
|
| 7 |
-
image
|
|
|
|
| 1 |
+
from diffusers import AutoPipelineForText2Image
|
| 2 |
+
import torch
|
| 3 |
|
| 4 |
+
pipeline = AutoPipelineForText2Image.from_pretrained(
|
| 5 |
+
"runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16, use_safetensors=True
|
| 6 |
+
).to("cuda")
|
| 7 |
+
prompt = "peasant and dragon combat, wood cutting style, viking era, bevel with rune"
|
| 8 |
|
| 9 |
+
image = pipeline(prompt, num_inference_steps=25).images[0]
|
| 10 |
+
image
|