Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -612,7 +612,11 @@ def infer_upscale(
|
|
612 |
print(f"Error in infer_upscale: {str(e)}")
|
613 |
return None, seed
|
614 |
|
615 |
-
|
|
|
|
|
|
|
|
|
616 |
with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, delete_cache=(60, 3600)) as app:
|
617 |
loras_state = gr.State(loras)
|
618 |
selected_indices = gr.State([])
|
|
|
612 |
print(f"Error in infer_upscale: {str(e)}")
|
613 |
return None, seed
|
614 |
|
615 |
+
def check_upscale_input(input_image, *args):
|
616 |
+
if input_image is None:
|
617 |
+
raise gr.Error("Please provide an input image for upscaling.")
|
618 |
+
return input_image, *args
|
619 |
+
|
620 |
with gr.Blocks(theme="Nymbo/Nymbo_Theme", css=css, delete_cache=(60, 3600)) as app:
|
621 |
loras_state = gr.State(loras)
|
622 |
selected_indices = gr.State([])
|