ultimaxxl commited on
Commit
a68ad53
·
verified ·
1 Parent(s): 45b3afb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -10
app.py CHANGED
@@ -352,17 +352,16 @@ def generate_image(prompt, structure_image, style_image, depth_strength=15, cann
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
- 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: