Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -62,11 +62,11 @@ with gr.Blocks(css="style.css") as demo:
|
|
62 |
num_inversion_steps=4, inversion_max_step=0.6, rnri_iterations=2, rnri_alpha=0.1, rnri_lr=0.2):
|
63 |
|
64 |
if device == 'cuda':
|
|
|
|
|
|
|
65 |
torch.cuda.empty_cache()
|
66 |
|
67 |
-
if image_editor is not None:
|
68 |
-
image_editor = image_editor.to('cpu')
|
69 |
-
|
70 |
if input_image is None or not description_prompt:
|
71 |
return None, "Please set all inputs."
|
72 |
|
|
|
62 |
num_inversion_steps=4, inversion_max_step=0.6, rnri_iterations=2, rnri_alpha=0.1, rnri_lr=0.2):
|
63 |
|
64 |
if device == 'cuda':
|
65 |
+
if image_editor is not None:
|
66 |
+
image_editor = image_editor.to('cpu')
|
67 |
+
|
68 |
torch.cuda.empty_cache()
|
69 |
|
|
|
|
|
|
|
70 |
if input_image is None or not description_prompt:
|
71 |
return None, "Please set all inputs."
|
72 |
|