Spaces:
Runtime error
Runtime error
fix a bug
Browse files
Rodin.py
CHANGED
@@ -147,7 +147,11 @@ class Generator:
|
|
147 |
return prompt, processed_image
|
148 |
log("INFO", "Preprocessing image...")
|
149 |
success = False
|
|
|
150 |
while not success:
|
|
|
|
|
|
|
151 |
image_file = load_image(image_path)
|
152 |
log("INFO", "Image loaded, processing...")
|
153 |
if prompt and task_uuid:
|
|
|
147 |
return prompt, processed_image
|
148 |
log("INFO", "Preprocessing image...")
|
149 |
success = False
|
150 |
+
try_times = 0
|
151 |
while not success:
|
152 |
+
if try_times > 3:
|
153 |
+
raise gr.Error("Failed to preprocess image")
|
154 |
+
try_times += 1
|
155 |
image_file = load_image(image_path)
|
156 |
log("INFO", "Image loaded, processing...")
|
157 |
if prompt and task_uuid:
|