Nodes/Chye ComfyUI Toolset/πŸ“„ CYH File | Text File Editor
ComfyUI Node

πŸ“„ CYH File | Text File Editor

An editable text box that can mute its own upstream input

By chyerΒ·Created about a year agoΒ·Updated 6 months agoΒ· 1
πŸ“„ CYH File | Text File Editor
    • output_text
    β—„actionuse_inputβ–Ί
    β—„editable_text_widgetEditable text widget Action modes: - use_input: Outputs connected text, updates widget - use_edit_mute_input: Outputs widget text, mutes input β–Ί
    β—„input_textβ–Ί

    At first glance this looks like a glorified text box, and half of it is. But the interesting half is the action mode - a switch that lets you hand-edit text and mute whatever is feeding the node from upstream, without unplugging any wires. That's the ComfyUI-equivalent of a bypass that actually carries text.

    It's part of the Chye ComfyUI Toolset's file category, and it's designed to sit downstream of the pack's Text File Loader (or any text-producing node): Text File Loader β†’ CYH File | Text File Editor β†’ KSampler.

    How it works

    Two modes, controlled by the action dropdown:

    • use_input - the node outputs whatever text is connected to its input_text input, and mirrors it into its own editable widget so you can see what's flowing through. Upstream wins.
    • use_edit_mute_input - the node outputs the text in its widget instead, ignoring the connected input entirely. You win; the upstream text is muted.

    That second mode is the whole point. Instead of cutting a wire or adding a bypass node to switch between "generated prompt" and "my hand-written version," you flip one dropdown. Output is output_text (a STRING), and it's an output node, so the text also shows in the UI.

    The node forces execution on every run, and when in use_input mode it reaches back through the workflow data to update its own widget - so you can watch a loaded prompt appear in the box even though the box isn't the source.

    The inputs that matter

    • action - the two modes above. The only control you'll really use.
    • editable_text_widget - the multiline text box (defaults to an explanation of the two modes, which you'll want to replace).
    • input_text - the optional upstream text. Leave it disconnected and use_input outputs an empty string - so wire it or switch modes.

    Where it bites

    The use_edit_mute_input mode mutes the input, but only the one this node is wired to - it doesn't bypass other consumers of the upstream node. If the upstream text also feeds something else, that path keeps flowing; "mute" here is per-node, not global.

    Also, the widget-updating trick depends on the node running inside a graph with workflow data - if you run it in some hosted/API contexts without that metadata, the box won't update even though the output is correct. Minor, but it's why the "updates widget" behavior can seem flaky.

    Install

    ComfyUI Manager (search "Chye ComfyUI Toolset"), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/chyer/Chye-ComfyUI-Toolset
    cd Chye-ComfyUI-Toolset
    pip install -r requirements.txt
    

    Restart after. Pure-Python, no per-node dependencies. Zip installs need .git/.cnr-id (Chye-ComfyUI-Toolset) per the README.

    Verdict

    For the price of one extra node in the chain, you get an editable text box with a built-in mute switch - genuinely handy when you A/B between a loaded prompt and your own override. If you never need to override an upstream prompt, it's just a text box and you can skip it. But when you need it, it beats cutting wires.

    Categoryfile

    Inputs (3)

    NameTypeDefaultDescription
    actionCOMBOuse_input2 options: use_input, use_edit_mute_input
    editable_text_widgetoptSTRINGEditable text widget Action modes: - use_input: Outputs connected text, updates widget - use_edit_mute_input: Outputs widget text, mutes input β€”
    input_textoptSTRINGβ€”

    Outputs (1)

    NameTypeDescription
    output_textSTRINGβ€”