Nodes/ComfyUI-RvTools_v2/Pass String v2
ComfyUI Node

Pass String v2

Route text around the graph, with a VRAM flush in the box

By r-vage·Created about a year ago·Updated 5 months ago· 23
Pass String v2
    • STRING
    string
    Purge_VRAMfalse

    Pass String v2 is a passthrough for text with a Purge_VRAM toggle attached - which sounds absurd until you remember what a string is actually carrying in a modern ComfyUI workflow. A STRING in, the identical STRING out, and optionally a memory flush along the way. It's a text reroute with a very specific extra tool.

    The text part is straightforward: string (default "", forced input) in, STRING out, unchanged. Like the other passers, its job is to be a stable junction - one prompt, filename, or tag wired to several consumers, with the source easy to bypass or swap without ripping out every downstream connection. That's the core RvTools philosophy from the README: passers were made for nodes that "had problems getting information from bypassed nodes," and to be the second node you need to form a managed group. A prompt shared across several branches is a textbook case.

    The Purge_VRAM toggle is where it gets interesting, because flushing VRAM from a string passer is pure convenience - the string is tiny, so the toggle isn't about the data at all. When enabled, the node runs gc.collect(), torch.cuda.empty_cache() and ipc_collect() on CUDA, then unload_all_models() and soft_empty_cache(), then passes the string along. What you've built, in effect, is a scheduled VRAM reset you can drop anywhere in a graph. Typical use: your text node feeds a node that's about to load a big model, and the stage before it left memory in a bad state - put the passer with Purge_VRAM on at the boundary and the next stage starts clean. The cost is real (whatever model the next node needs gets reloaded from disk), so it's a surgical fix for "my workflow OOMs here," not a default-on habit.

    Inputs

    • string (STRING, default "", required) - the text to pass through. Forced input, so wire it in.
    • Purge_VRAM (BOOLEAN, default false) - flush CUDA cache and unload all models before passing.

    Output is one STRING, unchanged.

    Install

    From ComfyUI-RvTools_v2. ComfyUI Manager → search "ComfyUI-RvTools_v2" → install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/r-vage/ComfyUI-RvTools_v2
    

    Under RvTools II / Passer. No model downloads; standard pip deps (torch, numpy, Pillow, opencv-python, pilgram, pynvml, piexif).

    Honest notes

    The pack is deprecated in its README, superseded by ComfyUI_Eclipse - works, frozen. If you just need to route text with no drama, the plain version does it; the v2's flush toggle earns its keep only when you've actually got a VRAM handoff problem. And the pack-wide gotcha: old workflows referencing RvTools v1 won't resolve because that repo was pulled from GitHub - v2's rename is the fix.

    Category🫦 RvTools II/ Passer

    Inputs (2)

    NameTypeDefaultDescription
    stringSTRING
    Purge_VRAMBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    STRINGSTRING