Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,15 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
gr.Interface.load("models/andite/pastel-mix").launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
gr.Interface.load("models/andite/pastel-mix").launch()
|
4 |
+
|
5 |
+
from diffusers import StableDiffusionPipeline
|
6 |
+
import torch
|
7 |
+
|
8 |
+
model_id = "andite/pastel-mix"
|
9 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
10 |
+
pipe = pipe.to("cuda")
|
11 |
+
|
12 |
+
prompt = "hatsune_miku"
|
13 |
+
image = pipe(prompt).images[0]
|
14 |
+
|
15 |
+
image.save("./hatsune_miku.png")
|