"test/onnx/parse/depthtospace_test.cpp" did not exist on "d2532d0eee52c8e12d05990ce6a7c8bec6480df7"
Commit 6a10640f authored by comfyanonymous's avatar comfyanonymous
Browse files

Support properly loading images with mode I.

parent c6951548
......@@ -1415,6 +1415,8 @@ class LoadImage:
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,]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment