Nodes/ComfyUI-Diffusers/Diffusers Clip Text Encode
ComfyUI Node

Diffusers Clip Text Encode

Encode prompts through a diffusers pipeline

By Limitex·Created 3 years ago·Updated 8 months ago· 186
Diffusers Clip Text Encode
  • maked_pipeline
  • positive_embeds
  • negative_embeds
  • positive
  • negative
positive
negative

This is the pack's version of CLIP Text Encode, and it does one thing the native node doesn't: it hands you back both the encoded embeddings and the plain text strings you typed in, from the same node, in one pass. That second half sounds minor until you get to StreamDiffusion Sampler further down this pack, which wants raw prompt strings rather than pre-computed embeddings - this node is what lets one prompt box feed both the Diffusers-pipeline sampling path and, if you're routing that way, keep the plain text available for reuse elsewhere in the graph.

How it works

You give it the maked_pipeline coming out of Diffusers Model Makeup, plus a positive and negative prompt. It runs both through that pipeline's text encoder - using whatever tokenizer and CLIP model the checkpoint shipped with - and outputs the resulting embeddings for Diffusers Sampler to consume. It also just passes the two strings straight back out unchanged, which is a small convenience: you can wire a single text box's output to something else in your graph without adding a splitter node.

The inputs and outputs that matter

Required inputs:

  • maked_pipeline - from Diffusers Model Makeup. This node needs the assembled pipeline, not the raw one, so the text encoder step matches whatever scheduler/VAE configuration you settled on.
  • positive - your prompt (multiline text box).
  • negative - what you don't want (multiline text box).

Four outputs, and it's worth knowing which is which since the names on positive/negative repeat:

  • positive_embeds / negative_embeds - the actual encoded conditioning, type EMBEDS, feeds Diffusers Sampler.
  • positive / negative - the same two strings you typed in, unchanged, output as plain STRING for reuse elsewhere.

How to install it

ComfyUI Manager → Install Custom Nodes → search ComfyUI-Diffusers → install → restart. Manual version:

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

That's all this node needs - text encoding rides on whatever CLIP model is already bundled in the checkpoint you loaded, nothing extra to download.

Common issues & troubleshooting

"Missing node type: DiffusersClipTextEncode." Same fix as every other node here: install ComfyUI-Diffusers through Manager, or git clone it into custom_nodes and restart. A missing-node error on anything starting with Diffusers is this pack, full stop.

Nothing connects to your maked_pipeline input. This node is downstream of Diffusers Model Makeup specifically - it won't accept the raw PIPELINE output straight from Diffusers Pipeline Loader. If the wire won't attach, you've skipped a step; the chain is Pipeline Loader → (optional Scheduler/VAE swaps) → Model Makeup → this node.

Trying to feed positive_embeds into StreamDiffusion Sampler. Don't - StreamDiffusion's own sampler nodes take raw prompt strings as input and encode internally; they're not built to accept this node's EMBEDS outputs. This node's plain-text outputs exist for exactly that kind of situation, so pull from positive/negative rather than the embeds pair if you're feeding a StreamDiffusion node instead of Diffusers Sampler.

Empty output image later in the chain. If sampling produces nothing or garbage, double-check you wired positive_embeds/negative_embeds - not the passthrough strings - into Diffusers Sampler. It's an easy slip since both pairs sit right next to each other on the node.

CategoryDiffusers

Inputs (3)

NameTypeDefaultDescription
maked_pipelineMAKED_PIPELINE
positiveSTRING
negativeSTRING

Outputs (4)

NameTypeDescription
positive_embedsEMBEDS
negative_embedsEMBEDS
positiveSTRING
negativeSTRING