ComfyUI Node

prompt - del

Delete tags from a prompt without hunting for them

By YMC-GitHub·Created 3 years ago·Updated about a year ago· 20
prompt - del
    • STRING
    search
    todel
    action

    You grab a workflow's prompt off Civitai, paste it in, and one of the tags is doing something you hate - maybe it's pulling a pose, maybe it fights with your LoRA. Hand-editing a 200-tag list is miserable. prompt - del from the ymc-node-suite-comfyui pack is the surgical version: tell it what to remove, it removes it, everything else stays exactly as written.

    The name of this node is slightly hostile to beginners, so here's the honest mapping: the search input is your actual prompt text, and todel is the list of tags you want gone. There's no "search" happening in the eyeballing sense - the node takes your prompt, and deletes every comma-separated tag in it that appears in todel.

    How it works

    The pack is a pure-Python text utility suite (author: yemiancheng, with code credited to WASasquatch's WAS Node Suite as a reference). prompt - del splits search on commas, and for each tag strips off any (parentheses) and :1.2-style weights before comparing against todel - so it deletes (easy pose:0.8) even if your todel just says easy pose. That unweighting matters: it means you can paste a weighted prompt and still match against plain tag names.

    The action enum (yes/no) is a bypass switch. no returns search untouched - handy for A/B testing or for wiring a toggle into a workflow without deleting the node.

    Inputs and outputs

    Three inputs, one output - the whole thing is small enough to hold in your head:

    • search - your prompt (the text to edit)
    • todel - the comma-separated tags to remove
    • action - yes (delete) or no (pass through unchanged)

    The single STRING output is the cleaned prompt, ready to feed into a CLIP Text Encode or your prompt stack.

    Installing it

    It ships inside ymc-node-suite-comfyui, so you install the whole pack:

    • ComfyUI Manager → Custom Nodes Manager → search ymc-node-suite-comfyui → Install → restart, or
    • manually:
    cd ComfyUI/custom_nodes
    git clone https://github.com/YMC-GitHub/ymc-node-suite-comfyui
    

    Then restart ComfyUI. There are no model downloads - this is string math, not neural net. The pack's requirements.txt pulls in four tiny yors_* helper libraries (list utilities, console color, node setup helpers). If you cloned manually, run pip install -r requirements.txt yourself - the auto-install in the pack's __init__.py is commented out, so a bare clone will import nothing and you'll see zero ymc nodes.

    You'll find it by double-clicking the canvas and searching prompt / del, or via the right-click ymc suite menu.

    Common issues

    • It doesn't work on multi-line prompts the way you expect. Splitting happens on commas, so a newline-separated list is treated as one long string with \n inside tags. Run the prompt through prompt - std or prompt - unweight first to normalize to clean comma-separated tags.
    • WAS Node Suite conflicts. If you also run WAS nodes, the packs overlap on a couple of save-node names (Manager shows "Conflicted Nodes" for Image Save / Save Text File). That hits the io/save side of this pack, not prompt - del, but it's worth knowing when you install both - disable whichever pack you aren't using.
    • Node counts as zero after a fresh manual clone - almost always the missing yors_* deps from above.

    For anything more elaborate - deleting, but also moving tags around or replacing them - the same pack has prompt - search (adv), which bundles all of it into one action dropdown.

    Categoryymc suite/text

    Inputs (3)

    NameTypeDefaultDescription
    searchSTRING
    todelSTRING
    actionCOMBO2 options: yes, no

    Outputs (1)

    NameTypeDescription
    STRINGSTRING