Skip to content

Commit e28c705

Browse files
committed
Ignore all frames except the first one for MPO format.
1 parent 6ca3d5c commit e28c705

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nodes.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,8 +1663,6 @@ def load_image(self, image):
16631663
output_masks = []
16641664
w, h = None, None
16651665

1666-
excluded_formats = ['MPO']
1667-
16681666
for i in ImageSequence.Iterator(img):
16691667
i = node_helpers.pillow(ImageOps.exif_transpose, i)
16701668

@@ -1692,7 +1690,10 @@ def load_image(self, image):
16921690
output_images.append(image)
16931691
output_masks.append(mask.unsqueeze(0))
16941692

1695-
if len(output_images) > 1 and img.format not in excluded_formats:
1693+
if img.format == "MPO":
1694+
break # ignore all frames except the first one for MPO format
1695+
1696+
if len(output_images) > 1:
16961697
output_image = torch.cat(output_images, dim=0)
16971698
output_mask = torch.cat(output_masks, dim=0)
16981699
else:
@@ -1863,7 +1864,6 @@ def INPUT_TYPES(s):
18631864
FUNCTION = "batch"
18641865

18651866
CATEGORY = "image"
1866-
DEPRECATED = True
18671867

18681868
def batch(self, image1, image2):
18691869
if image1.shape[-1] != image2.shape[-1]:

0 commit comments

Comments
 (0)