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.

Sort images on LoadImageMask node.

comfyanonymous71354c7c579b
diff --git a/nodes.py b/nodes.py
index ec65ca3a3..f53531cc9 100644
--- a/nodes.py
+++ b/nodes.py
@@ -670,7 +670,7 @@ class LoadImageMask:
@classmethod
def INPUT_TYPES(s):
return {"required":
- {"image": (os.listdir(s.input_dir), ),
+ {"image": (sorted(os.listdir(s.input_dir)), ),
"channel": (["alpha", "red", "green", "blue"], ),}
}