Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -192,18 +192,11 @@ def generate(ckpt_name, total_mask, original_image, add_color_image, add_edge_im
|
|
| 192 |
|
| 193 |
return final_image_base64
|
| 194 |
|
| 195 |
-
def _generate_duration(x, ckpt_name, negative_prompt, fine_edge, grow_size, edge_strength, color_strength, inpaint_strength, seed, steps, cfg, sampler_name, scheduler):
|
| 196 |
-
try:
|
| 197 |
-
s = int(steps or 20)
|
| 198 |
-
except Exception:
|
| 199 |
-
s = 20
|
| 200 |
-
return max(60, 3 * s)
|
| 201 |
-
|
| 202 |
|
| 203 |
from MagicQuill.comfy import model_management as _mm
|
| 204 |
|
| 205 |
|
| 206 |
-
@spaces.GPU(duration=
|
| 207 |
def generate_image_handler(x, ckpt_name, negative_prompt, fine_edge, grow_size, edge_strength, color_strength, inpaint_strength, seed, steps, cfg, sampler_name, scheduler):
|
| 208 |
_mm.unload_all_models()
|
| 209 |
if seed == -1:
|
|
|
|
| 192 |
|
| 193 |
return final_image_base64
|
| 194 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
|
| 196 |
from MagicQuill.comfy import model_management as _mm
|
| 197 |
|
| 198 |
|
| 199 |
+
@spaces.GPU(duration=20)
|
| 200 |
def generate_image_handler(x, ckpt_name, negative_prompt, fine_edge, grow_size, edge_strength, color_strength, inpaint_strength, seed, steps, cfg, sampler_name, scheduler):
|
| 201 |
_mm.unload_all_models()
|
| 202 |
if seed == -1:
|