Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -352,17 +352,16 @@ def generate_image(prompt, structure_image, style_image, depth_strength=15, cann
|
|
| 352 |
)
|
| 353 |
|
| 354 |
try:
|
| 355 |
-
#
|
| 356 |
-
|
| 357 |
-
|
| 358 |
-
|
| 359 |
|
| 360 |
-
#
|
| 361 |
-
|
| 362 |
-
|
| 363 |
-
|
| 364 |
-
|
| 365 |
-
full_path = f"output/{saved_data['ui']['images'][0]['filename']}"
|
| 366 |
|
| 367 |
return full_path
|
| 368 |
except Exception as e:
|
|
|
|
| 352 |
)
|
| 353 |
|
| 354 |
try:
|
| 355 |
+
# Get the saved file path
|
| 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 full_path
|
| 367 |
except Exception as e:
|