Get_Prefixed_Imgs
Pull your latest 'preferred' image and use it as an IP-adapter anchor
- anchor_images
- use_anchor
Get_Prefixed_Imgs is the "remember what I liked last time" node. The idea behind it: as you iterate on a look, every time you land on an image you like, you save it into an output folder under a consistent prefix. On the next run, this node finds the most recent of those saved favorites and hands them back as IP-adapter anchor images - so the workflow automatically keeps the style you approved and keeps drifting toward it. It's a feedback loop implemented as a couple of tensors.
It's part of eden_comfy_pipelines, Eden.art's 70+ node suite. In the source it's clearly built for the pack's moodmix/style-mixing workflows, where "user preference" is a first-class concept.
What you set
- folder - where to look for your saved preference images. Default is the string
"output", which resolves to ComfyUI's output directory. - filename_prefix - the name fragment that marks a file as a preference image. Default
"Prefered_Images"(yes, that's the author's spelling). Any file in the folder containing that substring counts. - max_n_imgs - how many of the most recent preference images to load, default 1.
- seed - present for consistency with the pack's other nodes; not doing heavy lifting in this one.
Two outputs:
- anchor_images (IMAGE) - the loaded preference images, centre-cropped to 512Γ512 and normalized, ready to feed an IP-adapter encoder or apply node.
- use_anchor (FLOAT) - a flag:
1.0if real anchor images were found,0.0if not. This is the clever part - you can wire it into a weight or a switch so your workflow behaves differently on the first run (no preferences yet) than on later runs.
How it behaves when there's nothing saved
On a cold start the node doesn't error - it returns a dummy random 256Γ256 image and use_anchor = 0.0. That's deliberate: the graph keeps running, downstream nodes can check the flag and fall back to a non-anchored path. It's a graceful-degradation design, and it means you can build the whole pipeline before you've saved a single favorite. It also prints a warning to the console when the folder can't be found, so check your terminal if anchors mysteriously never apply.
The gotcha that will catch you
The matching is a bare substring test against filename_prefix. Files are picked purely by name, so if your save node writes Prefered_Images_00001.png and also Prefered_Images_00002.png, the node grabs the newest first (it sorts and reverses). But it does not filter by extension - any file containing the prefix counts. And the prefix spelling (Prefered, one "r" is... wrong, but that's the default) means your save node and this node must agree on the exact string, or you'll stare at dummy images wondering why nothing anchors.
Installing it
Standard pack install - ComfyUI Manager (search "eden"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/edenartlab/eden_comfy_pipelines.git
cd eden_comfy_pipelines
pip install -r requirements.txt
Restart ComfyUI. The node itself needs no models; the IP-adapter machinery you feed it into obviously does. If the "AI keeps refining in the direction you kept" workflow appeals to you, this is the node that makes it one click.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| folder | STRING | output | β |
| filename_prefix | STRING | Prefered_Images | β |
| max_n_imgs | INT | 1 | β |
| seed | INT | 0 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| anchor_images | IMAGE | β |
| use_anchor | FLOAT | β |