mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-25 15:55:18 +00:00
Support properly loading images with mode I.
This commit is contained in:
parent
c6951548cf
commit
6a10640f0d
2
nodes.py
2
nodes.py
@ -1415,6 +1415,8 @@ class LoadImage:
|
|||||||
output_masks = []
|
output_masks = []
|
||||||
for i in ImageSequence.Iterator(img):
|
for i in ImageSequence.Iterator(img):
|
||||||
i = ImageOps.exif_transpose(i)
|
i = ImageOps.exif_transpose(i)
|
||||||
|
if i.mode == 'I':
|
||||||
|
i = i.point(lambda i: i * (1 / 255))
|
||||||
image = i.convert("RGB")
|
image = i.convert("RGB")
|
||||||
image = np.array(image).astype(np.float32) / 255.0
|
image = np.array(image).astype(np.float32) / 255.0
|
||||||
image = torch.from_numpy(image)[None,]
|
image = torch.from_numpy(image)[None,]
|
||||||
|
Loading…
Reference in New Issue
Block a user