mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-22 04:10:15 +08:00
Fix Merge issues with date filename
This commit is contained in:
parent
7302beb8e0
commit
5fab1c57bb
@ -1,5 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
supported_ckpt_extensions = set(['.ckpt', '.pth', '.safetensors'])
|
supported_ckpt_extensions = set(['.ckpt', '.pth', '.safetensors'])
|
||||||
supported_pt_extensions = set(['.ckpt', '.pt', '.bin', '.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):
|
def compute_vars(input, image_width, image_height):
|
||||||
input = input.replace("%width%", str(image_width))
|
input = input.replace("%width%", str(image_width))
|
||||||
input = input.replace("%height%", str(image_height))
|
input = input.replace("%height%", str(image_height))
|
||||||
|
input = input.replace("%date%", datetime.now().strftime("%Y%m%d%H%M%S"))
|
||||||
return input
|
return input
|
||||||
|
|
||||||
filename_prefix = compute_vars(filename_prefix, image_width, image_height)
|
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):
|
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])
|
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()
|
results = list()
|
||||||
for image in images:
|
for image in images:
|
||||||
i = 255. * image.cpu().numpy()
|
i = 255. * image.cpu().numpy()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user