Nodes/ComfyUI-JNodes/Remove Parseable Data For Inference
ComfyUI Node

Remove Parseable Data For Inference

Strip <params:...> tags before they hit CLIP

By JaredTherriault·Created 3 years ago·Updated about a month ago· 91
Remove Parseable Data For Inference
    • STRING
    in_string

    If you're using JNodes' parameter-list feature - writing things like <params:seed:8675309> directly in your prompt so JNodes_GetParameterFromList or JNodes_GetParameterFromTable can pull real values back out of it - you end up with a prompt that's half description, half machine-readable metadata. That's exactly what you want while you're extracting parameters, and exactly what you don't want by the time the text reaches your CLIP encoder, because your text encoder has no idea what <params:seed:8675309> means and will happily encode the literal characters as if they were part of your description. This node is the cleanup step: it takes that mixed text and strips the parseable tags out, leaving plain prompt text behind.

    The pack's own README walks through this exact pairing directly: pull your parameters out with a GetParameterFromList/GetParameterFromTable node, then route the same original prompt through JNodes_RemoveParseableDataForInference before it goes anywhere near your positive or negative prompt encoding.

    How it works

    Feed it the full prompt text, tags and all. It scans for the <params:...>-style syntax and removes those tags, returning the rest of the text intact. You do this in parallel with, not instead of, extracting the parameters - the same prompt string typically feeds both a parameter-extraction node and this cleanup node, so you get the values and a clean prompt out of one source of truth.

    The inputs and outputs

    • in_string (STRING, multiline) - the prompt text, including any <params:...> tags.
    • STRING output - the same text with parseable tags removed.

    How to install it

    Via ComfyUI Manager: Install Custom Nodes, search "JNodes", install, restart. Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/JaredTherriault/ComfyUI-JNodes
    pip install -r ComfyUI-JNodes/requirements.txt
    

    then restart ComfyUI. No model downloads - plain text processing.

    Common issues & troubleshooting

    Forgetting this step is the whole failure mode. If you skip it, your image generations will literally contain the text <params:image_size_x:1024> as part of what CLIP encodes - you'll get weird, unpredictable results and possibly the model trying to render something resembling that punctuation and those digits. If a prompt that uses JNodes parameters is producing odd results, check that this node (or an equivalent cleanup step) sits between your parameter list and your CLIP Text Encode.

    Running it before you've extracted the values. Order matters here in the sense that both operations need the original tagged text as their input - if you clean the prompt first and then try to extract parameters from the already-cleaned version, there's nothing left to extract. Wire both the parameter-extraction node and this one from the same upstream source, not one from the other's output.

    Leftover extra whitespace where a tag used to be. Removing a tag from the middle of a sentence can leave a double space or an orphaned comma behind. It's rarely visually significant to the model, but if you're chasing down subtle prompt drift, JNodes_SplitAndJoin (splitting on commas and rejoining) is the pack's own tool for tidying that up afterward.

    Categorysd

    Inputs (1)

    NameTypeDefaultDescription
    in_stringSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING