Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,14 @@
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
|
4 |
def greet(description,color,features,occasion,type):
|
|
|
1 |
import gradio as gr
|
2 |
+
import torch
|
3 |
+
from diffusers import StableDiffusionPipeline, DPMSolverMultistepScheduler
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
model_base = "runwayml/stable-diffusion-v1-5"
|
8 |
+
|
9 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_base, torch_dtype=torch.float16, use_safetensors=True, safety_checker=None,)
|
10 |
+
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
11 |
+
|
12 |
|
13 |
|
14 |
def greet(description,color,features,occasion,type):
|