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

Clip Text Encode (Shinsplat)

The ComfyUI text encoder that actually does what A1111 users expect

By Shinsplat·Created 2 years ago·Updated about a year ago· 47
Clip Text Encode (Shinsplat)
  • clip
  • CONDITIONING
  • tokens_count
  • tokens_used
  • tokens_out
  • prompt_out
text
clip_ltrue
ponyfalse
prompt_before
prompt_after

If you've typed BREAK into a ComfyUI prompt box and wondered why nothing happened, this node is the answer. Stock ComfyUI lowercases your prompt and feeds BREAK to the tokenizer like any other word - it does nothing. The community has been asking for a fix for years, and the usual answer is "use two text encoders and a Conditioning Concat," which works but is clumsy when you want the split marker right in the middle of one text box. This is the single most useful node in the Shinsplat pack: a drop-in replacement for the core CLIP Text Encode that honors BREAK, adds an END directive, an optional Pony score prefix, and a live token counter.

How it works

You wire it exactly like the stock node - clip in, CONDITIONING out to the sampler - but before the text is tokenized, the node's own interpreter strips your uppercase directives and restructures the prompt into blocks. BREAK ends one context block and starts another (it effectively behaves like the concat-conditioning split, minus the extra nodes). END tells it to ignore everything after that word, which is the fast way to test just the top of a long prompt without commenting the rest out. The README is blunt that the lowercased word "break" passes through to the evaluator normally - only the uppercase form is a directive, so you can still literally write the word.

There's a pony toggle for PonyXL models that prepends the whole score line for you:

score_9, score_8_up, score_7_up, score_6_up, score_5_up, score_4_up, BREAK

The inputs that matter

  • text - your prompt, with optional BREAK / END / CLIP_INVERT / POOL_INVERT directives (the invert ones just fiddle with the tensor returns; the author calls them entertainment, and you can skip them).
  • clip - the CLIP model from your checkpoint or CLIP loader.
  • clip_l - default on, duplicates the text into the clip_l stream as well as t5. The author's own advice: clip_l can introduce artifacts and hallucinations, and he leaves it off. Flip it off for cleaner Flux-style output.
  • pony - adds the score line above.
  • prompt_before / prompt_after - optional text inputs that get prepended/appended, handy for piping in a LoRA trigger phrase from this pack's LoRA loader.

Outputs worth knowing: tokens_count and tokens_used give you a live read on how much of the context window you're chewing through, tokens_out is the token-expander view of what words got inferred, and prompt_out is the cleaned text after directives are stripped - the exact string the encoder saw, which you can feed to other nodes.

How to install it

ComfyUI Manager, search "ComfyUI-Shinsplat", install, restart. Or:

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

Restart ComfyUI after. No requirements.txt, no model downloads, no extra Python deps - the pack ships its own tokenizer JSONs and works out of the box. Support channel is shinsplat.com/sd/.

Common issues

  • "BREAK still doesn't split" - make sure it's uppercase. Lowercase is passed through as a normal word.
  • The image changed when you swapped encoders - expected. The author's tokenizer restructures token data, so the same seed produces a different image than stock ComfyUI. That's the point, but it will throw you if you're A/B testing.
  • Tokens are in the output but you can't see the split - the conditioning output is a single block; BREAK segments context on the back-end, not in a way you can inspect visually. Trust the token outputs instead.
Categoryadvanced/Shinsplat

Inputs (6)

NameTypeDefaultDescription
textSTRING
clipCLIP
clip_lBOOLEANtrue
ponyBOOLEANfalse
prompt_beforeoptSTRING
prompt_afteroptSTRING

Outputs (5)

NameTypeDescription
CONDITIONINGCONDITIONING
tokens_countSTRING
tokens_usedSTRING
tokens_outSTRING
prompt_outSTRING