comfyui-negativewildcardsprocessor Introduction
comfyui-negativewildcardsprocessor adds two prompt-manipulation nodes to ComfyUI. They let you write related prompt ideas together, then move marked text to a different prompt before it is used in your workflow.
This is especially useful when a wildcard choice has both something you want to see and something you want to avoid. For example, a rainy scene might call for a different negative prompt than a sunny scene. The extension’s other node gives you a similar way to route part of a prompt to a separate sampler, such as one using a different model.
How comfyui-negativewildcardsprocessor Works
Think of the markers as labels on pieces of your prompt. You write a prompt containing ordinary text and marked text; the appropriate node moves the marked portion from one prompt to another. This helps you keep related instructions in one place while sending them where they belong in your ComfyUI workflow.
The extension provides two ways to do this:
- Negative wildcards processor: Moves text enclosed in
<!and!>from the positive prompt to the negative prompt. - Custom token processor: Moves text enclosed by a token you choose from a source prompt to a target prompt.
The nodes serve different purposes. Use the first when marked text belongs in a negative prompt. Use the second when marked text needs to go to another prompt destination in your workflow.
comfyui-negativewildcardsprocessor Features
Negative wildcards processor
This node helps you pair a positive wildcard choice with a corresponding negative instruction. The original example is:
{ rain, <!umbrella,!> | sunshine, <!sunglasses,!> }
Here, each choice includes a scene idea and marked text intended for the negative prompt. If your workflow selects the rain option, the marked umbrella, text is moved out of the positive prompt and into the negative prompt. The sunshine option similarly pairs sunshine with sunglasses,.
This is useful when you do not want to maintain a separate, fixed negative prompt for every possible wildcard result. The example image shows how the node is connected in a ComfyUI workflow:
Negative wildcards processor example and connections
Custom token processor
This node lets you choose the marker used to move text from a source prompt to a target prompt. For example, if the token is zyup, text marked between <zyup and zyup> is moved to the target prompt.
You can use this when different parts of an idea need to travel through different parts of a workflow. The author gives the example of sending one part of a prompt to a sampler using one model and the rest to a sampler using another model. The token determines which text is moved; your workflow connections determine where it goes.
The example image shows the node and its connections:
Custom token processor example and connections
Troubleshooting comfyui-negativewildcardsprocessor
Marked text remains in the original prompt. Check that the text uses the markers expected by the node you selected. For the negative wildcards processor, enclose the text with <! and !>. For the custom token processor, make sure the marker in your prompt matches the token you chose.
Text reaches the wrong prompt destination. Check your node connections. The negative wildcards processor is for moving text to a negative prompt; the custom token processor moves text from its source prompt to its target prompt. Compare your connections with the example images above.
A wildcard choice does not carry the negative instruction you expected. Check that the marked text is inside the intended wildcard choice. In the rain-and-sunshine example, each choice has its own marked instruction.
Frequently asked questions
Do these nodes create images or provide models?
No. The readme describes them as prompt-manipulation nodes. They organize and route prompt text within a ComfyUI workflow.
Which node should I use for text I want in the negative prompt?
Use the negative wildcards processor and mark that text with <! and !>.
Which node should I use to send text to another prompt in my workflow?
Use the custom token processor, choose a token, and connect its source and target prompts as needed.
