Nodes/ComfyUI_SamplingUtils/IdeographicTagPad
ComfyUI Node

IdeographicTagPad

For tag-style prompts and their filters

By silveroxides·Created 11 months ago·Updated 3 months ago· 20
IdeographicTagPad
    • padded_text
    text

    Ideographic Tag Pad is the tag-prompt specialist in silveroxides' text-padding family. It takes a prompt (typically a comma-separated tag list) and rewrites its whitespace: every run of whitespace gets replaced with an invisible padding sequence of word joiner + ideographic space + word joiner (U+2060 U+3000 U+2060) plus carriage-return/line-feed breaks, and the whole text is wrapped in the same padding at both ends.

    How it works

    The mechanism, from the source, is one regex that replaces every \s whitespace character with the ideographic pad + CRLF, then wraps the entire result in a leading CRLF, the pad, and a trailing pad + CRLF. Because the padding lands on spaces rather than inside words, individual tag tokens stay intact - 1girl, portrait becomes 1girl + padding + , + padding + portrait, all visually identical.

    The point: a tag-based prompt is exactly what a naive word filter or an upstream moderation layer would try to match token-by-token, and the padding guarantees those tokens are never adjacent to the following token in the byte stream.

    Input is one multiline text; output is padded_text. Nothing else to set.

    When to reach for it

    This is the one from the family I'd grab for tag-heavy, booru-style prompts being pushed through a pipeline with any kind of string scanning - it preserves the structure of a tag list while scrambling the matches. It's also useful if you're feeding tags into an LLM-style text encoder that behaves oddly with CJK spacing, since the ideographic space (U+3000) is how CJK text is normally spaced. If your text is prose rather than tags, the sentence-level sibling (Ideographic Sentence Pad) is the better fit.

    Caveats

    • The padding replaces whitespace, so the output's line structure genuinely changes (CRLFs are added throughout).
    • Zero-width joiners are the first casualty of unicode normalization, which quietly un-does the trick.
    • It only defeats string-matching filters. Anything that decodes or normalizes unicode before scanning sees right through it.

    Install

    ComfyUI Manager → ComfyUI_SamplingUtils, or clone it:

    cd ComfyUI/custom_nodes
    git clone https://github.com/silveroxides/ComfyUI_SamplingUtils
    

    then restart ComfyUI. Pack note, same as the rest: the README marks the pack DEPRECATED in favor of ComfyUI-UtilsCollection, and this text family is the most likely to be renamed when it migrates.

    Categoryadvanced/text

    Inputs (1)

    NameTypeDefaultDescription
    textSTRING

    Outputs (1)

    NameTypeDescription
    padded_textSTRING