Nodes/comfyui-ea-nodes/EA Filename → Combine
ComfyUI Node

EA Filename → Combine

Build a save path that won't collide — and survive ComfyUI's cache detection

By ExoticArts·Created about a year ago·Updated 10 months ago· 0
EA Filename → Combine
    • prefix_for_combine
    • fullpath_stub
    subfoldertrim/6_belle
    stemmy_video
    suffix_trim
    use_video_infofalse
    video_info

    Every video pipeline eventually needs a consistent filename: the same clip saved to the same path so you can iterate without a hundred timestamped duplicates piling up. EA Filename → Combine is a tiny string builder that turns subfolder + stem + suffix into the two strings every ComfyUI save node wants - and it exists because hand-typing that path, then hand-typing it again in two different nodes, is where people's pipelines quietly break.

    It's not a save node. It outputs nothing but text. Think of it as the "naming" half of a save workflow, sitting between your video node and your Save Video node.

    How it works

    You give it three strings:

    • subfolder - e.g. trim/6_belle. It's scrubbed for safety: backslashes become forward slashes and .. traversal pieces get stripped, so you can't accidentally write outside your output root.
    • stem - the base name, like my_video. It's slugged (spaces → underscores, unsafe characters removed) and capped in length.
    • suffix - a short tag like _trim that gets appended to the stem.

    It then outputs prefix_for_combine - a POSIX-style subfolder/stem_suffix string you can drop into SaveImage's filename prefix or a video saver's prefix field - and fullpath_stub, the absolute path (no extension) resolved against ComfyUI's output directory.

    The clever bit is the use_video_info toggle. ComfyUI caches nodes by their widget values: if two runs of the same node produce identical output strings, it can treat the second run as a no-op and skip re-executing downstream nodes. That's a footgun when you're loading different clips into the same workflow - the filename node would happily report the same string forever. When you flip use_video_info on, it mixes the video_info string (typically something unique per clip: a hash, or fps/width/height, or just the source filename) into the name, so every distinct input produces a distinct, cache-safe output. That's the "trigger" the README mentions, and it's the difference between a pipeline that re-saves every clip and one that silently skips them.

    Where you'd use it

    The natural pairing: EA Video Load hands you a stem and other path parts; wire the source's stem into this node's stem, add a suffix, and feed the resulting prefix_for_combine into EA Video Save (Idempotent) or any Save Video node. Since this node is pure string math, you can also drive it from a manifest pick, a seed, or anything else that produces text - which makes it the naming backbone for batch and training-data workflows.

    Install and gotchas

    Install via ComfyUI Manager (search comfyui-ea-nodes) or git clone https://github.com/ExoticArts/comfyui-ea-nodes into custom_nodes/, restart, hard-refresh. No dependencies beyond stock ComfyUI.

    Two things trip people up. First, fullpath_stub has no extension by design - your save node appends it, so don't go looking for .mp4 here. Second, if you're not using use_video_info and your downstream saves start mysteriously caching, that's the trigger you forgot. Wire the source filename in and the problem disappears.

    CategoryEA / IO

    Inputs (5)

    NameTypeDefaultDescription
    subfolderSTRINGtrim/6_belle
    stemSTRINGmy_video
    suffixSTRING_trim
    use_video_infoBOOLEANfalse
    video_infooptSTRING

    Outputs (2)

    NameTypeDescription
    prefix_for_combineSTRING
    fullpath_stubSTRING