Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Support properly loading images with mode I.

comfyanonymous6a10640f0dd0
diff --git a/nodes.py b/nodes.py
index 82244cf76..1ea0669b1 100644
--- a/nodes.py
+++ b/nodes.py
@@ -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,]