Fix Merge issues with date filename

This commit is contained in:
Silversith 2023-06-05 08:26:43 +02:00
parent 7302beb8e0
commit 5fab1c57bb
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import os
import time
from datetime import datetime
supported_ckpt_extensions = set(['.ckpt', '.pth', '.safetensors'])
supported_pt_extensions = set(['.ckpt', '.pt', '.bin', '.pth', '.safetensors'])
@ -202,6 +203,7 @@ def get_save_image_path(filename_prefix, output_dir, image_width=0, image_height
def compute_vars(input, image_width, image_height):
input = input.replace("%width%", str(image_width))
input = input.replace("%height%", str(image_height))
input = input.replace("%date%", datetime.now().strftime("%Y%m%d%H%M%S"))
return input
filename_prefix = compute_vars(filename_prefix, image_width, image_height)

View File

@ -1036,7 +1036,6 @@ class SaveImage:
def save_images(self, images, filename_prefix="ComfyUI", prompt=None, extra_pnginfo=None):
full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir, images[0].shape[1], images[0].shape[0])
input = input.replace("%date%", datetime.now().strftime("%Y%m%d%H%M%S"))
results = list()
for image in images:
i = 255. * image.cpu().numpy()