Nodes/ComfyUI Ino Nodes/Ino Images From Folder To Reference Latent
ComfyUI Node

Ino Images From Folder To Reference Latent

Point it at a folder of refs and get reference conditioning — no manual loading

By nobandegani·Created about a year ago·Updated 2 months ago· 6
Ino Images From Folder To Reference Latent
  • vae
  • positive
  • negative
  • success
  • message
  • rel_path
  • abs_path
  • images
  • latents
  • positive
  • negative
  • number of images
enabledtrue
parent_folder
folder
load_cap0
skip_from_first0
upscale_methodlanczos
megapixels1.00
resolution_steps1

This is the batch-friendly big sibling of Ino Images To Reference Latent. Instead of dragging image nodes into the graph one at a time, you tell it a folder path, it loads every image in there (PNG/JPG/JPEG/WebP, sorted by name), scales them to a target resolution, and turns the lot into reference latents applied to your conditioning. If you're building an automated pipeline that chews through reference sheets, this saves you from a graph with forty Load Image nodes in it.

The trade-off is that it's designed for "process everything in this folder" automation, not for a single curated ref. You get skip and cap controls so you can process a slice of the folder, but the workflow is fundamentally folder-driven.

How it works

The mechanism is the same reference-latent trick as the non-folder variant, with a preprocessing pass bolted on. It resolves your parent_folder + folder into a real path, loads the images, then scales each one with ComfyUI's ImageScaleToTotalPixels (that's what upscale_method + megapixels + resolution_steps control) before VAE-encoding and applying ReferenceLatent to the conditioning. The pre-scale step is the part worth caring about - it normalizes a folder full of wildly different sizes into a consistent resolution so the reference conditioning behaves predictably.

One nice defensive detail in the code: if the folder is empty (or the node is disabled), it still returns a harmless 512×512 empty latent and the untouched conditioning, so your graph doesn't blow up mid-batch. That's the kind of thing that only matters at 3am on batch 60, and you'll be glad it's there.

Inputs and outputs that matter

  • parent_folder (combo) - input, output, or temp. The Ino file nodes all use this to keep you from escaping ComfyUI's sandboxed folders.
  • folder - relative path under parent_folder.
  • load_cap - max images to load; 0 means no cap.
  • skip_from_first - how many to skip from the start.
  • megapixels - target scale, default 1.0 (i.e. ~1MP); resolution_steps rounds it to a multiple for cleaner latents.
  • vae, positive, negative - same roles as the single-batch node.

Outputs are the full Ino file-node signature (success, message, rel_path, abs_path) plus images (list), latents (list), the modified positive/negative, and a number of images int you can wire into a log or a counter.

Installing it

ComfyUI Manager → search "ComfyUI Ino Nodes" → install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/nobandegani/comfyui_ino_nodes
cd comfyui_ino_nodes
pip install -r requirements.txt

Restart after. The pack needs a current ComfyUI (V3-style node API, README says v0.18.1+) and pulls in inopyutils automatically. No keys or models to download for this node.

Common issues

Same resolution gotcha as the sibling node, one level worse: because it auto-scales, a folder mixing tiny and huge images will produce reference latents that fight each other. Keep the folder roughly homogeneous in aspect and set megapixels deliberately rather than trusting the default. And remember it reads the folder at execution time - if you add files while a batch is running, results are whatever the loader saw, so point it at a settled folder. load_cap of 0 meaning "everything" trips people up at first; if you want one image, set it to 1.

CategoryInoImageHelper

Inputs (11)

NameTypeDefaultDescription
enabledBOOLEANtrue
parent_folderCOMBO3 options: input, output, temp
folderSTRING
load_capINT00–10000
skip_from_firstINT00–10000
upscale_methodCOMBOlanczos5 options: nearest-exact, bilinear, area, bicubic, lanczos
megapixelsFLOAT1.000.01–16
resolution_stepsINT11–256
vaeVAE
positiveCONDITIONING
negativeoptCONDITIONING

Outputs (9)

NameTypeDescription
successBOOLEAN
messageSTRING
rel_pathSTRING
abs_pathSTRING
imagesIMAGE
latentsLATENT
positiveCONDITIONING
negativeCONDITIONING
number of imagesINT