Nodes/ComfyUI-Omini-Kontext/Omini Kontext Text Encoder
ComfyUI Node

Omini Kontext Text Encoder

Omini Kontext Text Encoder

By tercumantanumut·Created about a year ago·Updated about a year ago· 60
Omini Kontext Text Encoder
  • pipeline
  • PROMPT_EMBEDS
  • POOLED_EMBEDS
  • TEXT_IDS
prompt
max_sequence_length512

Every Flux-family model runs your prompt through two text encoders - a CLIP model and a big T5 - and the result is the embedding that gets packed into the context window alongside your image tokens. The main Omini Kontext Pipeline node does all that internally. The Omini Kontext Text Encoder is the version that hands you the raw pieces: prompt embeddings, pooled embeddings, and text ids, as three separate outputs.

How it works

It calls the diffusers pipeline's encode_prompt with your text and returns prompt_embeds, pooled_prompt_embeds, and text_ids. One detail the node handles for you: it temporarily silences the CLIP overflow warning that spams the console whenever you encode a long prompt. Flux prompts routinely sail past the 77-token CLIP limit - CLIP just truncates, and the T5 carries the real semantic load - so without that silencing your console would be wall-to-wall warning text.

The inputs that matter

  • pipeline - the OMINI_KONTEXT_PIPELINE from a loader. The text encoders live inside it, so there's no way to use this node without a loaded pipeline.
  • prompt - your text, multiline.
  • max_sequence_length - default 512, range 1–2048. This is the T5 context budget. For a plain character-insertion prompt, 512 is plenty; you'd raise it for long, descriptive scene prompts, and there's a real VRAM cost to going big because longer sequences mean more attention.

Outputs: PROMPT_EMBEDS, POOLED_EMBEDS, and TEXT_IDS - the token-level embedding, the pooled/summary embedding, and the positional ids, respectively.

Where this actually fits

Same honest caveat as the rest of the encoder set: there's no node in the pack that consumes PROMPT_EMBEDS and runs a denoise loop on it, so this isn't a working "encode once, reuse forever" performance trick in the current form. Its real value is the same diagnostic one - it's the way to look at what your prompt became before it entered the model, and to verify the encoding is sane when results are off. You can also stash the outputs and feed them into a custom sampler if you're building beyond this pack.

The one thing it does that nothing else in the pack does: give you control over max_sequence_length. If you're chasing prompt adherence on long scene descriptions with this pipeline, that knob is worth experimenting with - it's the only place in the pack where you get to touch the T5's context window.

CategoryOminiKontext

Inputs (3)

NameTypeDefaultDescription
pipelineOMINI_KONTEXT_PIPELINE
promptSTRING
max_sequence_lengthINT5121–2048

Outputs (3)

NameTypeDescription
PROMPT_EMBEDSPROMPT_EMBEDS
POOLED_EMBEDSPOOLED_EMBEDS
TEXT_IDSTEXT_IDS