diff --git a/folder_paths.py b/folder_paths.py index 8267598b0..d13019c7c 100644 --- a/folder_paths.py +++ b/folder_paths.py @@ -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") 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)) full_output_folder = os.path.join(output_dir, subfolder)