ohayonguy
commited on
Commit
•
cee2118
1
Parent(s):
38e388c
trying to fix problem with kdiffusion
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import os
|
2 |
if os.getenv('SPACES_ZERO_GPU') == "true":
|
3 |
os.environ['SPACES_ZERO_GPU'] = "1"
|
|
|
4 |
import spaces
|
5 |
import cv2
|
6 |
import gradio as gr
|
@@ -170,13 +171,13 @@ demo = gr.Interface(
|
|
170 |
gr.Image(type="filepath", label="Input"),
|
171 |
gr.Radio(['Yes', 'No'], type="value", value='aligned', label='Is the input an aligned face image?'),
|
172 |
gr.Number(label="Rescaling factor (the rescaling factor of the final image)", value=2),
|
173 |
-
gr.Number(label="Number of flow steps
|
174 |
], [
|
175 |
-
gr.Image(type="numpy", label="Output
|
176 |
gr.File(label="Download the output image")
|
177 |
],
|
178 |
-
)
|
179 |
|
180 |
-
|
181 |
-
|
182 |
-
|
|
|
1 |
import os
|
2 |
if os.getenv('SPACES_ZERO_GPU') == "true":
|
3 |
os.environ['SPACES_ZERO_GPU'] = "1"
|
4 |
+
os.environ['K_DIFFUSION_USE_COMPILE'] = "0"
|
5 |
import spaces
|
6 |
import cv2
|
7 |
import gradio as gr
|
|
|
171 |
gr.Image(type="filepath", label="Input"),
|
172 |
gr.Radio(['Yes', 'No'], type="value", value='aligned', label='Is the input an aligned face image?'),
|
173 |
gr.Number(label="Rescaling factor (the rescaling factor of the final image)", value=2),
|
174 |
+
gr.Number(label="Number of flow steps. A higher value should result in better image quality, but this comes at the expense of runtime.", value=25),
|
175 |
], [
|
176 |
+
gr.Image(type="numpy", label="Output"),
|
177 |
gr.File(label="Download the output image")
|
178 |
],
|
179 |
+
)
|
180 |
|
181 |
+
|
182 |
+
demo.queue()
|
183 |
+
demo.launch(state_session_capacity=15)
|