Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,4 +9,18 @@ demo = gr.Interface(
|
|
| 9 |
outputs=gr.Textbox(label="Greeting"),
|
| 10 |
)
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
demo.launch()
|
|
|
|
| 9 |
outputs=gr.Textbox(label="Greeting"),
|
| 10 |
)
|
| 11 |
|
| 12 |
+
from diffusers import StableDiffusionPipeline, EulerAncestralDiscreteScheduler
|
| 13 |
+
import torch
|
| 14 |
+
|
| 15 |
+
pipe = StableDiffusionPipeline.from_pretrained(
|
| 16 |
+
"stabilityai/stable-diffusion-2-1",
|
| 17 |
+
torch_dtype=torch.float16
|
| 18 |
+
)
|
| 19 |
+
|
| 20 |
+
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(
|
| 21 |
+
pipe.scheduler.config
|
| 22 |
+
)
|
| 23 |
+
|
| 24 |
+
pipe = pipe.to("cuda")
|
| 25 |
+
|
| 26 |
demo.launch()
|