Add batch_size meta data

This commit is contained in:
nkchocoai
2024-02-16 23:06:20 +09:00
parent 415d5627f2
commit d2b375fff6
2 changed files with 7 additions and 1 deletions
+3
View File
@@ -0,0 +1,3 @@
## TODO
- batch_size >= 2の場合、Seedが変わるだけか調査
- EmptyLatentImageFromPresetsへの対応
+4 -1
View File
@@ -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)