ComfyUI Node Runs on cloud

FolderScanner

Find images still missing their IP-adapter embedding β€” the moodmix housekeeper

By edenartlabΒ·Created 3 years agoΒ·Updated 6 months agoΒ· 119
FolderScanner
    • non_embedded_image_filenames
    β—„cache_direden_images/xander_bigβ–Ί
    β—„seed0β–Ί

    FolderScanner is a housekeeping node for the IP-adapter "embedding cache" workflows that the Eden pack is built around. The premise: for style and mood mixing, you keep a folder of images where each image is paired with a precomputed .pth IP-adapter embedding file. FolderScanner walks that folder and tells you which images don't have their embedding yet - and cleans up orphaned embeddings whose images have been deleted.

    It's part of eden_comfy_pipelines, Eden.art's 70+ node suite. In the pack's own words: the folder "should contain pairs of image and their corresponding IP adapter embeddings as: x.jpg, x.pth". The scanner's contract is simple: if an image has no .pth next to it, it needs one generated (a later node does that); if a .pth has no image, it gets deleted.

    What you set

    • cache_dir - the folder to scan. Note the default is eden_images/xander_big, which is a leftover from the pack's own production use - you'll almost certainly set your own path. The folder must exist or the node raises an assertion error on run, which is the single most common way people hit it cold.
    • seed - accepted, but it's not really used for the scan logic; it's there to keep the node consistent with the pack's other seeded nodes.

    One output: non_embedded_image_filenames, a LIST of the image filenames that still need a .pth embedding generated.

    How it fits the bigger workflow

    FolderScanner is the front end of a deliberate pipeline: scan β†’ find un-embedded images β†’ generate embeddings β†’ save them (SavePosEmbeds and friends do the saving) β†’ next run the scanner finds fewer stragglers. Run it every time and the folder slowly converges on fully-embedded. The seed input hints that the wider moodmix workflow treats the selection of which image to embed as a random choice - the scanner feeds that.

    If you're not running an IP-adapter embedding workflow, this node has nothing to give you. It's plumbing for a specific pattern, and that's fine - it does its narrow job cleanly.

    Where people get burned

    The obvious one: the assert on cache_dir. Give it a real path or it throws before doing anything. Second, it's opinionated about the naming convention - embedding filename equals image filename with a different extension. If your files are named photo1.jpg and photo1.pth, great; if you've renamed things or used a different extension scheme, the scanner will consider everything "unembedded" and you'll churn out embeddings it will then delete. Third, it deletes orphaned embeddings automatically - by design, but if you temporarily move an image out of the folder for safekeeping, its .pth gets removed. The deletion is the one behavior to be careful with.

    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. It needs no models itself, but the pipeline it feeds into (embedding generation) will want IP-adapter models and the pack's heavier requirements (torch, the usual suspects). If you're only ever a casual user of IP-Adapter, you can probably skip this whole corner of the pack - it's built for the "style library" power-user workflow.

    CategoryEden 🌱

    Inputs (2)

    NameTypeDefaultDescription
    cache_dirSTRINGeden_images/xander_bigβ€”
    seedINT0β€”

    Outputs (1)

    NameTypeDescription
    non_embedded_image_filenamesLISTβ€”