Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -352,18 +352,9 @@ def generate_image(prompt, structure_image, style_image, depth_strength=15, cann
|
|
| 352 |
)
|
| 353 |
|
| 354 |
try:
|
| 355 |
-
|
| 356 |
-
saved_filename = saved_data["ui"]["images"][0]["filename"]
|
| 357 |
-
saved_subfolder = saved_data["ui"]["images"][0]["subfolder"]
|
| 358 |
-
output_dir = folder_paths.get_output_directory()
|
| 359 |
-
|
| 360 |
-
# Construct the full path
|
| 361 |
-
if saved_subfolder:
|
| 362 |
-
full_path = os.path.join(output_dir, saved_subfolder, saved_filename)
|
| 363 |
-
else:
|
| 364 |
-
full_path = os.path.join(output_dir, saved_filename)
|
| 365 |
|
| 366 |
-
return
|
| 367 |
except Exception as e:
|
| 368 |
print(f"Error getting saved image path: {e}")
|
| 369 |
# Fall back to the expected path
|
|
|
|
| 352 |
)
|
| 353 |
|
| 354 |
try:
|
| 355 |
+
saved_path = f"output/{saved_data['ui']['images'][0]['filename']}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 356 |
|
| 357 |
+
return saved_path
|
| 358 |
except Exception as e:
|
| 359 |
print(f"Error getting saved image path: {e}")
|
| 360 |
# Fall back to the expected path
|