Nodes/ComfyUI-Flow-Control/Flow - CLIP Text Encode
ComfyUI Node

Flow - CLIP Text Encode

A CLIP Text Encode that remembers your prompt

By krich-cto·Created 2 years ago·Updated 2 years ago· 1
Flow - CLIP Text Encode
  • clip
  • gen_info
  • CONDITIONING
  • GENINFO
text
typePositive

On the surface this is a renamed CLIP Text Encode, and you'd be forgiven for skipping it. The interesting part isn't the encoding - that's identical to stock ComfyUI - it's the bookkeeping. FlowClipTextEncode takes a gen_info dict in and hands it back out with your prompt stuffed into it, so the last node in the chain (FlowSaveImage) can write the actual prompt into the PNG metadata instead of an empty placeholder.

It's part of ComfyUI-Flow-Control, a small pack built around one idea: thread a gen_info dictionary through every node so a save node at the end can reconstruct the full generation parameters. This node is where your text becomes part of that record.

How it works

text goes through the same clip.tokenize() + clip.encode_from_tokens() path the stock node uses, so the conditioning math is untouched. Two things differ:

  • A type dropdown sets the role: Positive or Negative. That choice decides which slot in gen_info gets written - positive_prompt or negative_prompt. There's no separate Positive/Negative node; one node, one dropdown, rewire as needed.
  • If gen_info says the base model is Flux, it re-tokenizes and makes sure the t5xxl tokens are in the batch. Stock ComfyUI handles Flux encoding fine now, but this node pins that behavior down so the Flow sampler downstream gets what it expects.

Outputs are CONDITIONING (wire into your sampler's positive or negative input) and GENINFO, which carries the prompt onward. That second output is the whole reason to use this node over the stock one.

The inputs that matter

  • text - your prompt, multiline. That's it, really.
  • clip - from the Flow checkpoint or Flux preset loader (or any CLIP output).
  • type - Positive/Negative.
  • gen_info - required, and this is the gotcha. It's not optional in the schema, and the code does gen_info["base"] to decide the Flux path. If you feed it a gen_info from a non-Flow loader that lacks the base key, you'll get a KeyError. This node assumes you've bought into the pack's pipe: Flow loader → this → Flow KSampler → FlowSaveImage.

Install

It ships inside ComfyUI-Flow-Control, so one install covers it:

cd ComfyUI/custom_nodes
git clone https://github.com/krich-cto/ComfyUI-Flow-Control

Restart ComfyUI. ComfyUI Manager users can search "ComfyUI-Flow-Control" instead. No models to download - it's pure plumbing around the CLIP you already load. Just make sure requests (and gguf, which the pack imports at startup) are in your Python env, or the pack won't load at all.

Gotchas

The Flux re-tokenize branch runs whenever gen_info["base"] == "Flux", so if you set the wrong base on the loader you'll get the Flux code path against an SDXL clip - keep the base honest. And remember the type dropdown does nothing to the conditioning itself; it only decides which metadata slot the text lands in. If you only care about the conditioning output, the stock node is simpler. You use this one because you want the save node to know what you actually prompted.

Categoryconditioning

Inputs (4)

NameTypeDefaultDescription
textSTRINGThe text to be encoded.
clipCLIPThe CLIP model used for encoding the text.
typeCOMBOPositive2 options: Positive, Negative
gen_infoGENINFO

Outputs (2)

NameTypeDescription
CONDITIONINGCONDITIONINGA conditioning containing the embedded text used to guide the diffusion model.
GENINFOGENINFO