Boyo Image Grab
Watch a folder and auto-load the newest image — the loop node that drives iterative editing
- image
- filename
- full_path
- timestamp
Semantic image editing - the "edit, regenerate, edit again" loop - has an ergonomics problem. You want to run a pass, look at the result, tweak something in an external editor, and have ComfyUI pick up the change automatically. ComfyUI's normal Load Image node reads once and caches; it won't re-read a file that changed. Boyo Image Grab is the fix: it watches a directory, and every time it executes, it loads the most recently modified image in that folder. New file appears → next run uses it. That one behavior is what makes iterative editing chains feel alive instead of manual.
How it works
The clever part is how it defeats ComfyUI's caching. ComfyUI skips re-executing a node if its inputs didn't change - which would normally freeze Image Grab on whatever it loaded first. This node implements IS_CHANGED to return a hash of the newest file's modification time, so the moment a new image lands in the watched folder, the hash changes and ComfyUI re-runs it. The auto_refresh toggle (default on) controls that behavior; turn it off and it only reloads when you bump refresh_trigger (an integer you change manually to force a refresh).
Mechanically: it globs the directory for your file_extensions (default jpg,jpeg,png,bmp,tiff,webp), finds the file with the latest mtime, and loads it. "Newest" here means most recently modified, not alphabetically newest - important if your editor re-saves in place.
Inputs and outputs
directory_path(required) - the folder to watch. Absolute path recommended.file_extensions(optional) - comma-separated filter, so a folder full of PNGs and scratch files doesn't grab the wrong thing.auto_refresh,refresh_trigger(optional) - the refresh controls above.
Four outputs: image (the loaded IMAGE), filename, full_path (strings, handy for feeding downstream save/logic nodes), and timestamp (FLOAT - the file's modification time, useful as a change signal in a loop).
Installation
No dependencies beyond the pack:
cd ComfyUI/custom_nodes && git clone https://github.com/DragonDiffusionbyBoyo/Boyonodes
restart, and it's under Boyo/loaders.
The workflow it's built for
The author's intent, straight from the pack docs: iterative editing chains where the output of one pass becomes the input of the next automatically. Concretely, that means things like:
- Generate an image, save it to a folder.
- Open it in Photoshop/Krita, edit something (a hand, a face, a background).
- Re-run the workflow - Image Grab picks up your edit, the next pass regenerates on top of it, the result saves back to the same folder.
Paired with Boyo Paired Saver (which writes image+prompt pairs to a folder), this becomes a closed loop for building datasets or running multi-pass edits.
Where people get burned
- It grabs the wrong file - there's another image in the folder being modified by something else. Tighten
file_extensionsor use a dedicated folder. - "It's not picking up my new file" - check
auto_refreshis on, and that the new file has a newer modification time than everything else (copying a file with preserved timestamps is a classic silent trap). - It reloads the same image every run - that's normal when nothing new lands; the node isn't broken, the folder just hasn't changed. That's precisely what
timestampoutput is for, so you can branch on whether anything actually changed.
It's a small node, but for anyone doing multi-pass editing it's the difference between a workflow you re-wire by hand each pass and one that runs on its own.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| directory_path | STRING | — | |
| file_extensionsopt | STRING | jpg,jpeg,png,bmp,tiff,webp | Comma-separated list of file extensions to search for |
| auto_refreshopt | BOOLEAN | true | Automatically check for new files on each execution |
| refresh_triggeropt | INT | 00–999999 | Change this value to manually force refresh |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| filename | STRING | — |
| full_path | STRING | — |
| timestamp | FLOAT | — |