diff --git a/README.md b/README.md new file mode 100644 index 0000000..d8b5b63 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +## TODO +- batch_size >= 2の場合、Seedが変わるだけか調査 +- EmptyLatentImageFromPresetsへの対応 \ No newline at end of file diff --git a/py/nodes/node.py b/py/nodes/node.py index 4b75073..27b452d 100644 --- a/py/nodes/node.py +++ b/py/nodes/node.py @@ -50,7 +50,7 @@ class SaveImageWithMetaData(BaseNode): ) results = list() print("Save Image With Metadata") - for image in images: + for index, image in enumerate(images): i = 255.0 * image.cpu().numpy() img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8)) @@ -58,6 +58,9 @@ class SaveImageWithMetaData(BaseNode): print("[get_inputs]") print(inputs) pnginfo_dict = Capture.gen_pnginfo_dict(inputs) + if len(images) >= 2: + pnginfo_dict["Batch index"] = index + pnginfo_dict["Batch size"] = len(images) print("[PNGInfo Dict]") print(pnginfo_dict)