Nodes/ComfyUI-XENodes/Load Image From Folder
ComfyUI Node

Load Image From Folder

Loads a single image from a directory or direct file path without resizing, ideal for queues and vision LLMs.

By xeinherjer-dev·Created 5 months ago·Updated 2 days ago· 2
Load Image From Folder
    • IMAGE
    • MASK
    • filename
    • filepath
    • index
    • total_images
    path
    index0
    sort_byname
    reversefalse
    subfoldersfalse
    Categoryxenodes/image

    Inputs (5)

    NameTypeDefaultDescription
    pathSTRINGPath to a directory containing images, or a direct image file path.
    indexINT00–18446744073709550000Image index. Supports auto-incrementing / randomizing via control_after_generate for batch queue runs.
    sort_byCOMBOnameSorting method for files in the directory.
    reverseoptBOOLEANfalseReverse the sort order.
    subfoldersoptBOOLEANfalseInclude images in subdirectories recursively.

    Outputs (6)

    NameTypeDescription
    IMAGEIMAGELoaded image tensor [1, H, W, 3] without resizing.
    MASKMASKAlpha mask if present, otherwise zeros.
    filenameSTRINGFilename of the loaded image.
    filepathSTRINGFull filepath of the loaded image.
    indexINTCurrent index within the image list.
    total_imagesINTTotal count of images found.