Load Images From Folder (KJ)
KJNodes/image
LoadImagesFromFolderKJLoads images from a folder into a batch, images are resized and loaded into a batch.
Example
JSON Example
{
"class_type": "LoadImagesFromFolderKJ",
"inputs": {
"folder": "",
"width": 1024,
"height": 1024,
"keep_aspect_ratio": "crop"
}
}This example shows required inputs only. Connection values like ["node_id", 0] should reference actual node IDs from your workflow.
Inputs
| Name | Type | Status | Constraints | Default |
|---|---|---|---|---|
folder | STRING | required | - | "" |
width | INT | required | min: -1, step: 1 | 1024 |
height | INT | required | min: -1, step: 1 | 1024 |
keep_aspect_ratio | ENUM3 options
| required | - | - |
image_load_cap | INT | optional | min: 0, step: 1 | 0 |
start_index | INT | optional | min: 0, step: 1 | 0 |
include_subfolders | BOOLEAN | optional | - | false |
Outputs
| Index | Name | Type | Is List | Connection Reference |
|---|---|---|---|---|
0 | image | IMAGE | No | ["{node_id}", 0] |
1 | mask | MASK | No | ["{node_id}", 1] |
2 | count | INT | No | ["{node_id}", 2] |
3 | image_path | STRING | No | ["{node_id}", 3] |
How to connect to these outputs
To connect another node's input to an output from this node, use the connection reference format:
["node_id", output_index]Where node_id is the ID of this LoadImagesFromFolderKJ node in your workflow, and output_index is the index from the table above.
Example
If this node has ID "5" in your workflow:
image (IMAGE):["5", 0]mask (MASK):["5", 1]count (INT):["5", 2]
Was this page helpful?