Skip to main content

Load Images From Folder (KJ)

KJNodes/image
LoadImagesFromFolderKJ

Loads 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

NameTypeStatusConstraintsDefault
folderSTRINGrequired-""
widthINTrequiredmin: -1, step: 11024
heightINTrequiredmin: -1, step: 11024
keep_aspect_ratioENUM
3 options
  • crop
  • pad
  • stretch
required--
image_load_capINToptionalmin: 0, step: 10
start_indexINToptionalmin: 0, step: 10
include_subfoldersBOOLEANoptional-false

Outputs

IndexNameTypeIs ListConnection Reference
0imageIMAGENo["{node_id}", 0]
1maskMASKNo["{node_id}", 1]
2countINTNo["{node_id}", 2]
3image_pathSTRINGNo["{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?