Nodes/Easy Use Anima/Negative Wildcard Processor Plus
ComfyUI Node

Negative Wildcard Processor Plus

Keep negatives inline with <! !>

By nobinBB·Created 2 months ago·Updated 6 days ago· 3
Negative Wildcard Processor Plus
    • text_positive
    • text_negative
    ◄positive►
    ◄negative►

    Writing a prompt in two boxes means maintaining two boxes. This node lets you write one, mark the bits that should be negative with <!...!>, and have them moved across automatically.

    Why one box is nicer than two

    The negative prompt is not a filter - it's the text that replaces the empty string in classifier-free guidance's unconditioned pass, so the sampler pushes away from what you name. Which is why the useful negative is usually short and specific: the defect you can actually see, or a named source region. Anima's best-known example is dropping deviantart in the negative, which works because deviantart is a literal dataset tag from training rather than folklore.

    So you're editing a prompt, and you're editing one or two tags of it. With a single text source - say the text_all output of Dynamic Text Hub - you avoid the classic mismatch where you rewrite the positive and forget the negative still says worst quality, low quality, bad hands. The inline marker keeps the pairing in the same paragraph.

    Anima makes this slightly more interesting than it is on SDXL: quality boilerplate matters less here, and you get better results from naming real tags. Being able to mark a tag as "wrong this run" inline, without cutting it out of your base prompt, is genuinely convenient.

    What it does, exactly

    It scans the positive string for <! … !> blocks, removes them from the positive text, and appends them to the negative text. Multiple blocks work, blocks can contain line breaks, and blocks are non-greedy - <!a!><!b!> becomes two separate moves, not one giant block.

    The Plus in the name is the difference from the original Negative Wildcard Processor, which is known for eating <lora:...> tags out of your prompt. This one only interprets complete <!text!> blocks. LoRA tags, embeddings, <lora:style_a:0.8> plus <lora:style_b:0.6>, all pass through untouched. If you've been bitten by a processor that stripped a LoRA trigger and left you wondering why the style went away, that's the fix.

    How the moved text lands: appended to the negative with a single space separator, unless your negative text is empty or already ends in whitespace, in which case no separator is inserted. Empty blocks are skipped. Nothing else about either string is normalized - no trimming, no comma fixing - so what you typed is what the encoder sees.

    Inputs and outputs

    Two required inputs: positive and negative, both multiline STRING. Note that both are socket-only - the node has no text fields of its own, so you have to feed them from a text node, a prompt node, or the Dynamic Text Hub. That surprises people who expect to type in the box, but it's the point: this is a pass-through stage in the middle of a prompt pipeline, not an editor.

    Two outputs: text_positive (your positive with the marked blocks removed) and text_negative (your negative plus the moved blocks). Wire both into their respective text-encoding nodes; nothing else in your workflow changes.

    An Anima wiring that works well: text hub text_all → this node → CLIPTextEncode ×2 → the sampler's positive and negative inputs, with the negative encoder carrying something like worst quality, low quality, blurry, jpeg artifacts as its base and <!deviantart!> marked in the positive block.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/nobinBB/comfyui-easy-use-anima
    pip install piexif
    

    Or ComfyUI Manager → comfyui-easy-use-anima, then restart. This node is pure regex and has no Anima model or dependency requirements - it works fine in an SDXL graph too.

    Where people trip

    The regex needs both halves. A stray <! with no matching !> is left in the positive string and goes to the encoder as literal characters, which is worse than useless on a tokenizer. Same for a lone !>. If your output has odd punctuation showing up in the image, check for an unbalanced marker.

    Nesting isn't supported - a block inside a block will split at the first !> - so keep groups flat.

    And remember that none of this matters at CFG 1. On a distilled or Turbo-LoRA setup where cfg is 1, the negative pass isn't computed at all and everything you moved here is discarded silently. That's a property of guidance, not of this node, but it's the trap people hit when they switch to a fast preset.

    CategoryEasyUse-Anima/Text

    Inputs (2)

    NameTypeDefaultDescription
    positiveSTRING—
    negativeSTRING—

    Outputs (2)

    NameTypeDescription
    text_positiveSTRING—
    text_negativeSTRING—