Nodes/ComfyUI-JakeUpgrade/SD3 Prompts Switch JK๐Ÿ‰
ComfyUI Node

SD3 Prompts Switch JK๐Ÿ‰

Three text encoders, three prompts, one router

By jakechaiยทCreated 2 years agoยทUpdated 3 months agoยท 147
SD3 Prompts Switch JK๐Ÿ‰
    • clip_l
    • clip_g
    • t5xxl
    โ—„clip_lโ–บ
    โ—„clip_gโ–บ
    โ—„t5xxlโ–บ
    โ—„clip_l_promptclip_lโ–บ
    โ—„clip_g_promptclip_gโ–บ
    โ—„t5xxl_promptt5xxlโ–บ

    SD3 doesn't read one prompt - it reads three, through three separate text encoders (two CLIP variants plus T5-XXL). That's the architecture, and it means an SD3 workflow has three prompt slots, and those slots don't all want the same text. SD3 Prompts Switch JK is the router that lets you decide which prompt text goes into which encoder. You type up to three prompts, then per-encoder you pick which one to use.

    Why this exists

    Here's the practical pain it solves: the three encoders have genuinely different strengths. CLIP-L and CLIP-G are short, punchy - they respond well to tag-like text. T5-XXL is a huge LLM-based encoder that can actually parse long, descriptive sentences. A common SD3 move is to feed a compact tag prompt to the CLIPs and a longer natural-language version to T5, or vice versa, depending on the checkpoint. This node makes that mapping explicit and switchable, instead of you copy-pasting prompts into the wrong slots and wondering why the output ignored half your sentence.

    It landed in v1.9.0 as part of the pack's SD3 imgen group-node updates, and it's the kind of node that only makes sense if you've felt the SD3 "why is my prompt barely working" confusion before.

    The inputs

    • clip_l, clip_g, t5xxl - the three prompt texts you can type in (all multiline).
    • clip_l_prompt, clip_g_prompt, t5xxl_prompt - three selectors, each with the same three choices (clip_l, clip_g, t5xxl), deciding which of the typed prompts goes to that encoder.

    So with the defaults (each encoder gets its own matching prompt) it's a straight pass-through. Change clip_l_prompt to t5xxl and suddenly the CLIP-L encoder is reading your long T5 prompt instead.

    The outputs

    Three STRING outputs - clip_l, clip_g, t5xxl - wired straight into the SD3/Flux triple-text-encode node. The outputs mirror the encoder names, so the graph stays readable: output "clip_l" feeds the CLIP-L encoder, and so on. Wire order is the only thing to respect; the selector inputs determine content, the outputs determine destination.

    Install

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

    No models, no deps beyond the pack standard. It's a pure string router - no encoder runs here, it just decides what text reaches the encoder. The only gotcha: it doesn't know which checkpoint you're using, so "which prompt style works best" is still a model-by-model experiment. That's true of SD3 itself, not of this node.

    Category๐Ÿ‰ JK/๐Ÿ“ฆ Misc

    Inputs (6)

    NameTypeDefaultDescription
    clip_lSTRINGCLIP-L prompt text
    clip_gSTRINGCLIP-G prompt text
    t5xxlSTRINGT5-XXL prompt text
    clip_l_promptCOMBOclip_lPrompt type to use for CLIP-L output
    clip_g_promptCOMBOclip_gPrompt type to use for CLIP-G output
    t5xxl_promptCOMBOt5xxlPrompt type to use for T5-XXL output

    Outputs (3)

    NameTypeDescription
    clip_lSTRINGโ€”
    clip_gSTRINGโ€”
    t5xxlSTRINGโ€”