Nodes/ComfyUI-JDCN/JDCN_SeamlessExperience
ComfyUI Node

JDCN_SeamlessExperience

Crossfade a folder of images into seamless tiles

By daxcayΒ·Created 2 years agoΒ·Updated about a year agoΒ· 160
JDCN_SeamlessExperience
    • NewImagePaths
    • Log
    β—„inputDirectorydirectory pathβ–Ί
    β—„BatchSize0β–Ί
    β—„OverlapSize0β–Ί

    If you've ever tried to tile an image - as a texture, a looping background, a panorama strip - you know the seam problem: the left edge never matches the right edge, and the moment it loops you can see the jump. JDCN_SeamlessExperience is the pack's answer for folders of images: it takes every image in a directory, crossfades neighboring files into each other at the edges, and writes the blended results to an output subfolder. You point it at a folder, it comes back with a folder of images that tile edge-to-edge without the visible seam.

    How it works

    This one works entirely in pixel space, no model involved. For each image in the input directory, it walks the files in order and merges each one with the next using a linear opacity ramp - image A fades out while image B fades in over the overlap region, then the two are alpha-composited and saved. Two knobs control the whole thing:

    • BatchSize - how many files are treated as one processing round.
    • OverlapSize - how many frames of overlap bleed into each merge. Bigger overlap, softer (and longer) the blend.

    The node copies the source files into <yourDirectory>/output first, then works on the copies, which keeps your originals untouched. It returns two outputs:

    • NewImagePaths - the list of merged files in the output folder.
    • Log - a plain-text rundown of what happened: each merge pair, plus "IMAGES BEFORE" and "IMAGES AFTER" counts, so you can sanity-check the run without opening Explorer.

    Where it fits

    Textures for game-ish tiles, looping animation backgrounds, and anything you want to wrap around an axis without a hard cut. If your actual goal is upscaling, this isn't your node - it's a pixel-blend utility, not a detail generator, and it won't add resolution. Use it as a pre-pass: make something seamless first, then feed it to your sampler as img2img reference.

    Install

    Part of ComfyUI-JDCN. ComfyUI Manager β†’ Install Custom Nodes β†’ search "JDCN", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/daxcay/ComfyUI-JDCN.git
    pip install -r requirements.txt
    

    Pack dependency is just piexif (plus psutil from ComfyUI itself). No model downloads.

    Gotchas - read this before you run it

    This node has two real footguns, both visible in the source:

    • It deletes the output subfolder first. Every run wipes <yourDirectory>/output and rebuilds it. If you already have files in there that you care about, they're gone. Point it at a scratch directory, or back up first.
    • Defaults of 0 will crash it. With both BatchSize and OverlapSize at their default 0, the code divides by zero and the node errors out. Set both to 1 or more. There's no internal guard, so the failure shows up in your console as a traceback.
    • It only reads top-level files in the directory - no recursion, no format filter. Anything the OS lists gets treated as an image, and non-images will fail inside the merge loop.

    It's a fiddly node with sharp edges, but there isn't really a stock ComfyUI equivalent for "crossfade a folder of images edge-to-edge," and once you've got the two knobs above 0 and the path right, it does exactly what it says.

    CategoryπŸ”΅ JDCN πŸ”΅

    Inputs (3)

    NameTypeDefaultDescription
    inputDirectorySTRINGdirectory pathβ€”
    BatchSizeINT00–9999β€”
    OverlapSizeINT00–9999β€”

    Outputs (2)

    NameTypeDescription
    NewImagePathsSTRINGβ€”
    LogSTRINGβ€”