Nodes/Nougan Nodes/Nougan Tail Load
ComfyUI Node

Nougan Tail Load

Nougan Tail Load

By Winnougan·Created 4 months ago·Updated 3 days ago· 31
Nougan Tail Load
    • mods
    • info
    ◄enabledtrue►
    ◄strength1.00►
    ◄save_nametail_latest►

    Tail Load is the reading half of the video-continuation pair. It looks in models/refmods/_tail/, finds the most recently written tail for the given name, and hands it to Nougan RefMod Apply as an extra_mods bundle - so your new clip starts with the previous clip's last second as a visual (and maybe audio) reference.

    It has two inputs and two outputs and no UI to speak of. The interesting part is entirely in the failure modes.

    How it decides what to load

    Nougan Tail Capture writes to two alternating files, <save_name>_a and <save_name>_b, so it never overwrites one a loader might be holding open. Tail Load doesn't track a pointer to any of that: it stats both slots and takes whichever has the newer mtime. Simple, robust to a crashed run, and it means "the most recent thing you captured" is always the answer.

    It's also IS_CHANGED-aware in the right way - the returned key includes the newest slot's mtime, so when a new tail lands, this node (and the sampler downstream of it) re-executes instead of pulling a cached result. Without that, every run after the first would quietly reuse the conditioning from the first, because ComfyUI caches on identical inputs. Small detail, completely load-bearing.

    The two fields

    enabled (default on). Turn it off for the first clip of a new sequence - otherwise clip one gets a reference to whatever you were working on ten minutes ago, which is either a happy accident or a cursed one. The tooltip says exactly this and it's worth obeying.

    strength (0–1, default 1) scales the mod's weight before it goes out. It stacks with the retention and curve settings on RefMod Apply, so a tail at 0.6 going into an Apply with heavy retention is still a strong reference - this is a multiplier, not the last word.

    Then save_name (optional, default tail_latest) which must match the Capture node. That's the whole node.

    Outputs: mods (H3_REF_MODS) into RefMod Apply's extra_mods, and info, a readable one-liner. Read info. It's the only diagnostic you get: tail loaded: N tokens from tail_latest_b when it worked, no tail saved yet (first clip) when the folder is empty or the name is wrong, tail off when enabled is false.

    Install

    Part of the Nougan pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Winnougan/Nougan_Nodes
    # restart ComfyUI
    

    Or ComfyUI Manager, search Nougan. It depends on nothing outside the pack - the RefMod engine is vendored - but the whole RefMod family needs a ComfyUI build with MiniMax H3 support, and it's designed for the H3 workflow specifically, licence caveats and all (minimax-h3.json).

    Where it goes wrong

    "no tail saved yet (first clip)" forever. Tail Capture never ran - remember it's an output node with no sockets, so if its input chain is bypassed or it was muted, nothing gets written. Or the save_name on the two nodes doesn't match. Check the folder first: ls ComfyUI/models/refmods/_tail/.

    The tail comes from a completely different project. Both nodes default to tail_latest, which is global state shared by every workflow on the machine. Two sequences, one name, and they steal each other's endings. Give each its own save_name.

    Clip one of a new sequence looks like clip twelve of the old one. enabled was still on. It's the first thing to check before you start debugging the sampler.

    The tail persists across sessions and nothing seems to update. It's mtime-based, so it does update - but only when Capture actually writes. If you turned Capture off to iterate on something else, Load keeps cheerfully reusing the old bundle.

    Empty mods doesn't crash the graph. That's deliberate: no tail means no extra mods, and RefMod Apply just carries on with whatever characters it already had. It's forgiving, which also means a silent "no tail" is easy to miss. The info string is how you notice.

    If you want a mental model: this is disk as graph memory, the same trick behind every "remember this between runs" node in ComfyUI (comfyui-node-plumbing.md covers the general pattern). Nothing magic in it - a folder, two file slots and an mtime. But there's almost no community chatter about this family to fall back on, so treat the info string as your documentation and the tail folder as state you own: name it, clear it, don't trust the defaults across projects.

    CategoryNougan/RefMod

    Inputs (3)

    NameTypeDefaultDescription
    enabledBOOLEANtrueOff = no tail reference (use for the first clip of a new sequence).
    strengthFLOAT1.000–1—
    save_nameoptSTRINGtail_latestMust match Nougan Tail Capture.

    Outputs (2)

    NameTypeDescription
    modsH3_REF_MODS—
    infoSTRING—