Nodes/ComfyUI-Shinsplat/Clip Text Encode T5 (Shinsplat)
ComfyUI Node

Clip Text Encode T5 (Shinsplat)

Clip_l, clip_g, and t5xxl in one node, with a token inspector

By Shinsplat·Created 2 years ago·Updated about a year ago· 47
Clip Text Encode T5 (Shinsplat)
  • clip
  • CONDITIONING
  • prompt_out
  • tokens_raw
  • tokens_out
clip_l
clip_g
t5xxl
empty_padding
prompt_before
prompt_after

SD3-style checkpoints don't use one text encoder - they use three: the small clip_l, the larger clip_g, and the massive t5xxl that carries most of the semantic load. ComfyUI's stock CLIP Text Encode Encode SD3 gives you all three boxes and nothing else. This Shinsplat version adds the directives (BREAK, END), the prompt_before/prompt_after inputs, and two diagnostic outputs that show you exactly what the tokenizer did - which is the part people actually get stuck on.

How it works

The mechanism is stock SD3 encoding with a preprocessing layer in front: each of the three text areas is independently run through the END chop, then tokenized per-stream and encoded into one combined CONDITIONING. BREAK splits blocks the same way the SD/SDXL versions do. The interesting extra is the diagnostic outputs. tokens_raw carries the raw token stream, and tokens_out carries the actual token values and weights as a Python-dictionary-formatted string - one token set per element - so you can inspect (and later programmatically reweight) exactly what each stream got.

The author kept this node around partly as a testing/digging tool; his changes.txt notes he expects to work with this T5 variant more than the SD3 one. That's worth knowing: if you're on an SD3-family model and want the deepest visibility into the encoding, this is the node.

The inputs that matter

  • clip - the CLIP model from an SD3-style checkpoint or a triple-capable CLIP loader.
  • clip_l, clip_g, t5xxl - the three text areas. The author's tip from the SDXL encoder applies here too: putting the same criteria in both clip areas gives you a result close to the simple encoder, because the back-end duplicates the text when they match.
  • empty_padding - an enum, none or empty_prompt, controlling how the padding stream is handled.
  • prompt_before / prompt_after - prepend/append inputs for pulling in trigger phrases from this pack's LoRA loader.

Outputs: CONDITIONING (to the sampler), plus prompt_out (the cleaned text with directives stripped), tokens_raw, and tokens_out.

How to install it

Part of ComfyUI-Shinsplat:

cd ComfyUI/custom_nodes
git clone https://github.com/Shinsplat/ComfyUI-Shinsplat

or ComfyUI Manager → search "ComfyUI-Shinsplat". Restart, and you're done - no pip requirements, no model files to fetch; the pack bundles its own t5_tokenizer.json and shinsplat_tokens.json.

Common issues

  • "t5xxl isn't recognized" - make sure your checkpoint/CLIP loader actually exposes a t5 stream. Some SD1.5-era checkpoints won't have one, and this node is meant for SD3/Cascade-style triple encoders.
  • tokens_out looks like raw Python, not a list - correct; it's a dictionary-formatted string you can eval into a list of dicts. If you need to reweight tokens, pipe it through this pack's Clip Tokens Encode instead of parsing it by hand.
  • Different image than stock - expected behavior across the whole pack, since the tokenizer restructures the token data before encoding.
Categoryadvanced/Shinsplat

Inputs (7)

NameTypeDefaultDescription
clipCLIP
clip_lSTRING
clip_gSTRING
t5xxlSTRING
empty_paddingCOMBO2 options: none, empty_prompt
prompt_beforeoptSTRING
prompt_afteroptSTRING

Outputs (4)

NameTypeDescription
CONDITIONINGCONDITIONING
prompt_outSTRING
tokens_rawSTRING
tokens_outSTRING