Load Folder with Anchor
One fixed pivot point for a whole frame batch
- IMAGE
- MASK
- anchor
- frame_count
Load Folder with Anchor does two things, and the second is the reason it exists: it loads a folder of frames into a single IMAGE batch, and it hands you one fixed (x, y) point that stays the same for every frame. No tracking, no per-frame analysis - the docstring is blunt: "The anchor is deliberately a single point."
That matters in exactly one situation, and it's a common one. You have a sprite animation or an AI-generated walk cycle, every frame nudged a few pixels in a different direction, and you want to stabilize against a known pivot - the feet, the character's origin, whatever your engine treats as the physics point - instead of letting automatic registration guess. Frame-to-frame registration is great at removing jitter and terrible at agreeing on an absolute origin. Give it a fixed point and you stop arguing.
How it works
The directory dropdown lists the non-file entries of ComfyUI/input, minus clipspace. Only top-level folders, no recursion - frames go in ComfyUI/input/your_folder/, or in a symlink planted there. The symlink route is deliberate: this pack's own save nodes plant links in input/ to expose output folders, and the loader accepts them instead of treating them as a path escape.
Files are sorted by name, filtered to image extensions, then paged by skip_first_images → select_every_nth → image_load_cap. Everything loads as one tensor, and the mask comes from alpha - a transparent frame yields 1 - alpha, so your cut-out background arrives already masked. Palette PNGs and their tRNS transparency are handled properly too, which plenty of loaders get wrong.
Then the anchor. anchor_x and anchor_y both default to -1, which means "use the canvas center." Set them and they're clamped to the image bounds. What comes out of the anchor socket is not a number pair, it's a JSON string:
{"format":"link-comfy-nodes/anchor-v1","sourceSize":{"w":512,"h":512},"anchor":{"x":256,"y":470}}
That string is what the pack's Stabilize Frames node parses off its optional anchor input. So the intended wiring is Load Folder with Anchor → Stabilize Frames, and downstream you're in spritesheet / pixel-art / export territory.
The inputs you actually touch
directory is the only required one. The other three are the standard paging trio; an image_load_cap of 0 means unlimited.
The interesting pair is anchor_x / anchor_y, and here's the practical bit: the node hides those widgets and you click the preview instead. The frontend draws your frames on the node with a crosshair, and clicking anywhere writes the pixel coordinate back into the two widgets - clamped to the image, so you can't set an anchor outside the frame.
Moving the crosshair also invalidates the cache on purpose: the anchor values are mixed into IS_CHANGED, so nudging it reruns downstream stabilization even when the files haven't changed.
Four outputs: IMAGE (the batch), MASK (alpha, per frame), anchor (that JSON string), and frame_count (the count after paging, not the folder's file count).
Installing it
ComfyUI Manager, search Link Comfy Nodes, install, restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/Mister-Link/link-comfy-nodes
Read the terms first: the README is one line - "AI slop nodes for my own purposes, use at your own risk (I change how nodes behave without warning)." Zero footprint in the community corpus, nobody filing bugs on your behalf, so back up workflows you depend on.
Also budget for the install. The pack's requirements.txt is long, pulls things this loader doesn't need (pytorch_lightning, mambapy, numba, transformers), and includes a git dependency - clip @ git+https://github.com/openai/CLIP.git - the line that dies behind a proxy. And because the pack's __init__.py imports every node at load time, any missing dependency stops the pack from registering at all, so this node vanishes with the rest. One more oddity: the pack runs its own install.py at import to patch Impact Pack - personal-utility-pack energy, all the way down.
Where people get burned
Mixed frame sizes throw a hard error. Every image must be identical in dimensions; the loader raises "Image size mismatch. All images in the folder must have the same dimensions." rather than padding.
The folder isn't in the dropdown yet. The list is a plain directory listing evaluated when the node's input types are built, so a folder you just created may not appear until you refresh the page or restart.
You're expecting tracking. If the subject moves around the frame and you want each frame re-centered on it, a point that never moves is the wrong tool - the anchor is for when you've decided where the origin should be.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| directory | COMBO | 1 options: 3d | |
| image_load_capopt | INT | 00–9007199254740991 | — |
| skip_first_imagesopt | INT | 00–9007199254740991 | — |
| select_every_nthopt | INT | 11–9007199254740991 | — |
| anchor_xopt | INT | -1-1–9007199254740991 | — |
| anchor_yopt | INT | -1-1–9007199254740991 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |
| anchor | STRING | — |
| frame_count | INT | — |