mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-22 12:57:02 +08:00
Retain user specified subfolder, default to current date subfolder otherwise
This commit is contained in:
parent
010a22513a
commit
2b2adb9462
@ -245,7 +245,10 @@ def get_save_image_path(filename_prefix, output_dir, image_width=0, image_height
|
|||||||
current_date = time.strftime("%Y-%m-%d")
|
current_date = time.strftime("%Y-%m-%d")
|
||||||
filename_prefix = compute_vars(filename_prefix, image_width, image_height)
|
filename_prefix = compute_vars(filename_prefix, image_width, image_height)
|
||||||
|
|
||||||
subfolder = current_date
|
if filename_prefix:
|
||||||
|
subfolder = os.path.dirname(os.path.normpath(filename_prefix))
|
||||||
|
else:
|
||||||
|
subfolder = current_date
|
||||||
filename = os.path.basename(os.path.normpath(filename_prefix))
|
filename = os.path.basename(os.path.normpath(filename_prefix))
|
||||||
|
|
||||||
full_output_folder = os.path.join(output_dir, subfolder)
|
full_output_folder = os.path.join(output_dir, subfolder)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user