🎈LG_LoadImage
Load the image you just rendered, without the picker dance
- image
- mask
- filename
If you do iterative work - img2img passes, upscale-then-refine, "generate, tweak, regenerate" loops - you know the exact annoying ritual: run the queue, open the folder, note the newest filename, go back to your Load Image node, and pick it from the dropdown by hand. Every. Single. Time.
LG_LoadImage kills that ritual. It's the built-in Load Image node with one extra button: Refresh From → Temp/Output, which grabs the most recently saved image from those folders and swaps it into the node. Generate, hit refresh, run again. That's the whole loop.
How it works
The node subclasses ComfyUI's core LoadImage, so you keep everything you already know - image upload, the mask channel, drag-and-drop, the works. On top of that, a small frontend extension adds the button. When you click it, it asks the backend for the newest image:
GET /lg/get/latest_image?type=temp
The backend walks that folder, picks the file with the newest modification time, and returns its name and location. The node then re-runs as if you'd picked that file yourself. There's also a right-click menu on the thumbnails with a delete option for cleaning up.
Note the node's own description - it was designed to copy the newest image into your input folder, but the current code just references temp/output directly, which newer ComfyUI handles natively. No copies happening, which is fine.
Inputs:
- image - a dropdown of images in your input folder (with upload support).
Outputs:
- image - the IMAGE tensor.
- mask - the MASK, if the image has an alpha channel.
- filename - the filename as a STRING, handy for filename-based logic or just showing which file you're using.
When it shines
Any workflow that feeds its own output back in. Upscale chains, img2img refinement, face-restore loops, batch reprocessing. If your pipeline ends with a save and starts with a load, this node is the seam that removes the manual step between them.
Installing it
Part of Comfyui_LG_Tools - Manager (search "Comfyui_LG_Tools") or:
cd ComfyUI/custom_nodes
git clone https://github.com/LAOGOU-666/Comfyui_LG_Tools.git
pip install -r requirements.txt
Restart, then right-click → 🎈LAOGOU → Utils.
Troubleshooting
- "No images found" - the folder is genuinely empty, or your save node is writing to a custom path that isn't
temp/output. The refresh only looks in those three standard folders, so a Save Image pointed at a custom directory won't be picked up. - It loads the wrong file - it picks by modification time, not by "which image I think is newest." If another process wrote to that folder more recently (say, a second workflow saving in parallel), that's what you get.
- Mask looks wrong - standard Load Image behavior: JPG has no alpha, so the mask output comes back empty. Use a PNG with transparency if you need the mask.
For anyone doing repeated passes, this is one of those "why didn't the base node have this" quality-of-life nodes. It's small, it's obvious, and it saves a genuinely annoying amount of clicking.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | 1 options: example.png |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| filename | STRING | — |