cococola commited on
Commit
a710f56
1 Parent(s): 25b7f0b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
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")