Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -261,8 +261,12 @@ def generate(
|
|
261 |
finally:
|
262 |
if use_upscaler:
|
263 |
del upscaler_pipe
|
264 |
-
|
265 |
-
|
|
|
|
|
|
|
|
|
266 |
utils.free_memory()
|
267 |
|
268 |
|
@@ -420,7 +424,7 @@ with gr.Blocks(css="style.css", theme="NoCrypt/[email protected]") as demo:
|
|
420 |
examples=config.examples,
|
421 |
inputs=prompt,
|
422 |
outputs=[result, gr_metadata],
|
423 |
-
fn=lambda *args, **kwargs: generate(*args, use_upscaler=True, **kwargs),
|
424 |
cache_examples=CACHE_EXAMPLES,
|
425 |
)
|
426 |
use_upscaler.change(
|
|
|
261 |
finally:
|
262 |
if use_upscaler:
|
263 |
del upscaler_pipe
|
264 |
+
|
265 |
+
if isImg2Img:
|
266 |
+
img_pipe.scheduler = img_backup_scheduler
|
267 |
+
else:
|
268 |
+
pipe.scheduler = backup_scheduler
|
269 |
+
|
270 |
utils.free_memory()
|
271 |
|
272 |
|
|
|
424 |
examples=config.examples,
|
425 |
inputs=prompt,
|
426 |
outputs=[result, gr_metadata],
|
427 |
+
#fn=lambda *args, **kwargs: generate(*args, use_upscaler=True, **kwargs),
|
428 |
cache_examples=CACHE_EXAMPLES,
|
429 |
)
|
430 |
use_upscaler.change(
|