Nodes/lf-nodes/Upload images
ComfyUI Node

Upload images

Reference frames without leaving the canvas

By lucafoscili·Created 2 years ago·Updated 6 days ago· 35
Upload images
  • file_names
  • image
  • image_list
upload_dirtemp

Every workflow eventually needs "that photo I have on my desktop" as an input - for img2img, for a reference frame, for ControlNet. Core ComfyUI makes you drop the file into the input folder by hand and then browse a list. LF_UploadImages cuts that out: you pick the files right in the browser, they upload into ComfyUI, and out the other end come ready-to-use image tensors. It's the "just give me the images" IO node from lf-nodes.

This is the kind of plumbing node that the pack's whole personality is built around - custom frontend widgets doing real work (an LF_UPLOAD picker here) so the graph feels less like wiring a server rack. If you're tired of shuffling files on disk to get a reference into a workflow, this is the node that makes that chore disappear.

How it works

The node's required input is file_names, typed as the custom LF_UPLOAD widget - a frontend file picker. Select files in the browser and they upload to a directory inside ComfyUI; the node receives the names as a semicolon-separated string (file1.jpg;file2.png). On execution it reads each file with Pillow, converts it to RGB, and turns it into a [B, H, W, C] tensor. The upload_dir combo decides where the uploads land - input, output, or temp, with temp as the default. That choice mostly matters if you want to reuse the uploaded file later from a disk node: files in temp are treated as throwaway, files in input stick around like a normal reference.

Outputs are image (batch of uploaded images) and image_list (the same as a list, for list-handling workflows). Both come from the same uploads, so you wire whichever your downstream node prefers.

The inputs that matter

  • file_names (LF_UPLOAD) - the picker. Semicolons separate multiple files, and whitespace is trimmed, so a sloppy a.jpg; b.png still works.
  • upload_dir (COMBO) - input, output, or temp. Default temp. Pick input when you want the uploaded file to be findable by other loaders later.

Install

Standard lf-nodes install:

  • ComfyUI Manager: search "LF Nodes", install, restart.
  • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/lucafoscili/lf-nodes.git, restart.

No models needed. Pillow is already a ComfyUI dependency, so nothing extra pulls in for this node.

Common issues

  • "It says the file failed to load." The node logs per-file failures to its widget and skips them - check the message on the node. Most common cause: a filename that doesn't exist in the directory it wrote to, or a format Pillow can't open.
  • The file isn't where you expected afterward. You set upload_dir to temp by default - that's ComfyUI's temp folder, which is exactly as temporary as the name implies. Use input if you want the file to survive as a reusable reference.
  • It swallows errors. A broken file logs and continues rather than failing the whole batch. Good for robustness, but it means you can get a silent partial result if you aren't watching the widget.
  • Old pack? If you're on the archived comfyui-lf repo (pre-late-2025), reinstall from lucafoscili/lf-nodes to get the current widget and fixes.
Category✨ LF Nodes/IO Operations

Inputs (2)

NameTypeDefaultDescription
file_namesLF_UPLOADList of file names separated by semicolons (e.g., file1.jpg;file2.png).
upload_diroptCOMBOtempDirectory where the files are uploaded.

Outputs (2)

NameTypeDescription
imageIMAGEUploaded images.
image_listIMAGEList of uploaded images.