2.3 KiB
2.3 KiB
LoadImageCombined
Overview
LoadImageCombined unifies single-image selection and batch iteration within one node. In single mode it behaves like ComfyUI’s standard loader; in batch mode it iterates through a directory listing on each execution, keeping track of the last-delivered file to maintain sequence order.
Inputs
mode(STRING, default"Single"):"Single"loads a user-selected file;"Batch"scans a directory and auto-advances each run.input_dir(STRING, default empty): Directory to scan in batch mode. Relative paths resolve againstComfyUI/input.output_dir(STRING, default empty): Convenience string passed through for downstream savers/loggers.pattern(STRING, default"*"): Glob pattern (e.g.,*.png) applied in batch mode.strip_trailing_numbers(BOOLEAN, defaultFalse): WhenTrue, removes trailing(1),(2), etc., from filenames when computing thefilename_no_extoutput.repeat_last(BOOLEAN, defaultFalse): Keeps returning the last image instead of advancing on subsequent runs.image(STRING): File selector used in single mode. Only relevant whenmode == "Single".
Outputs
IMAGE: RGB tensor loaded from disk (alpha channels are dropped).filename_no_ext(STRING): Base filename without extension (and optionally without trailing number suffix).output_dir(STRING): Passthrough of the input field.width(INT),height(INT): Dimensions of the loaded image.
Processing Notes
- Directory listings are case-insensitive and filtered to common image extensions (
png,jpg,jpeg,webp,tif,tiff,bmp). - Batch iteration state is held in-memory per directory/pattern combination and resets when the listing changes (new/removed files) or when
repeat_lastis enabled. - All images are converted to RGB using Pillow, with Exif orientation applied.
Tips
- Chain this node with
PortraitUtils_PairedImageLoaderor comparison nodes to quickly inspect before/after renders. - Use
repeat_lastwhen you need to re-run the same batch frame after adjusting downstream parameters. - Combine with
FilenameAppendSuffixto build descriptive output paths based onfilename_no_ext.*** End Patch
