mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-08-18 10:56:41 +08:00
Update nodes.py
added numpy array possibility in method save_images.
This commit is contained in:
parent
e08ecfbd8a
commit
f84a6a7bb8
5
nodes.py
5
nodes.py
@ -1586,7 +1586,10 @@ class SaveImage:
|
||||
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])
|
||||
results = list()
|
||||
for (batch_number, image) in enumerate(images):
|
||||
i = 255. * image.cpu().numpy()
|
||||
if hasattr(image, "cpu"): # torch tensor
|
||||
i = 255. * image.cpu().numpy()
|
||||
else:
|
||||
i = 255. * image
|
||||
img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8))
|
||||
metadata = None
|
||||
if not args.disable_metadata:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user