Skip to content

Commit

Permalink
Support properly loading images with mode I.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Jan 8, 2024
1 parent c695154 commit 6a10640
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1415,6 +1415,8 @@ def load_image(self, image):
output_masks = []
for i in ImageSequence.Iterator(img):
i = ImageOps.exif_transpose(i)
if i.mode == 'I':
i = i.point(lambda i: i * (1 / 255))
image = i.convert("RGB")
image = np.array(image).astype(np.float32) / 255.0
image = torch.from_numpy(image)[None,]
Expand Down

0 comments on commit 6a10640

Please sign in to comment.