Spaces:
Runtime error
Runtime error
deal with triger when removing the input image
Browse files
app.py
CHANGED
@@ -60,6 +60,12 @@ with gr.Blocks(css="style.css") as demo:
|
|
60 |
@spaces.GPU
|
61 |
def set_pipe(image_editor, input_image, description_prompt, edit_guidance_scale, num_inference_steps=4,
|
62 |
num_inversion_steps=4, inversion_max_step=0.6, rnri_iterations=2, rnri_alpha=0.1, rnri_lr=0.2):
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
if image_editor is not None:
|
64 |
image_editor = image_editor.to('cpu')
|
65 |
|
|
|
60 |
@spaces.GPU
|
61 |
def set_pipe(image_editor, input_image, description_prompt, edit_guidance_scale, num_inference_steps=4,
|
62 |
num_inversion_steps=4, inversion_max_step=0.6, rnri_iterations=2, rnri_alpha=0.1, rnri_lr=0.2):
|
63 |
+
if input_image is None or not description_prompt:
|
64 |
+
return None, "Please set all inputs."
|
65 |
+
|
66 |
+
print('### description_prompt ', description_prompt)
|
67 |
+
print('### input_image.size ', input_image.size)
|
68 |
+
|
69 |
if image_editor is not None:
|
70 |
image_editor = image_editor.to('cpu')
|
71 |
|