mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-11 06:40:48 +08:00
Fix Merge issues with date filename
This commit is contained in:
parent
7302beb8e0
commit
5fab1c57bb
@ -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)
|
||||
|
||||
1
nodes.py
1
nodes.py
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user