Nodes/ComfyUI-UniWorld-jd17/UniWorld T5/CLIP Encoder
ComfyUI Node

UniWorld T5/CLIP Encoder

UniWorld's own take on the FLUX dual encoder

By judian17·Created about a year ago·Updated about a year ago· 21
UniWorld T5/CLIP Encoder
  • flux_clip
  • CONDITIONING
prompt
max_sequence_length512

FLUX conditions on two text encoders at once - T5-XXL for the long-form prompt and CLIP-L for a pooled vector - and ComfyUI normally handles that with CLIPTextEncode after a DualCLIPLoader. UniWorld_T5_CLIP_Encoder in the ComfyUI-UniWorld-jd17 pack is a specialized version of that, rewritten to match the exact tokenization the original UniWorld-V1 pipeline used. When this pack's main encoder node joins its VLM output with plain text conditioning, this is the node that supplies it.

What's different from the stock encoder

The class docstring says it outright: it reproduces the logic of the original repo's denoiser_prompt_embedding_flux.py and bypasses ComfyUI's generic prompt parsing. Instead of letting ComfyUI chunk, weight, or otherwise reinterpret your text, it tokenizes the prompt directly with each encoder's real tokenizer - CLIP-L padded to 77, T5-XXL padded to your chosen sequence length - and encodes from the raw token IDs. So what comes out is the conditioning the UniWorld model was trained against, not ComfyUI's approximation of it. In a workflow where the conditioning feeds a research model, matching the original pipeline's quirks is the point, not a bug.

Inputs and output

  • flux_clip - a CLIP object from DualCLIPLoader set to type flux (the example workflow uses sd3/clip_l.safetensors + sd3/t5xxl_fp8_e4m3fn.safetensors). The node checks that the CLIP actually has clip_l and t5xxl components and raises a TypeError otherwise - so don't feed it the output of a normal CLIPTextEncode.
  • prompt - the text to encode. Empty is a valid, handled case; this pack does image-only passes where the T5 side stays empty.
  • max_sequence_length (default 512, range 77–4096) - the T5 truncation length. This is the only knob you'll realistically touch; lower it to save memory, raise it for long prompts.

The single CONDITIONING output carries the T5 prompt embeddings plus the CLIP pooled output, and in the shipped workflow it feeds UniWorldEncoderNode's t5_conditioning input. The encoder node then concatenates it with the VLM's own embeddings - unless you tick no_joint_with_t5 or just leave this node unwired.

Install and notes

Install is the pack-level story (Manager, search "ComfyUI-UniWorld-jd17", or git clone into custom_nodes and restart) with the shared transformers==4.50.0 pin. The FLUX text encoders are standard ComfyUI model downloads, no special extraction. One genuinely useful thing from the author's workflow note: this node is optional. The workflow runs without it, which is equivalent to no_joint_with_t5 = true, with slight differences in the result. So if you want the simplest path first, skip it and add it back later to compare - the pack's example workflow keeps both routes on the canvas, which is the right way to learn what the joint conditioning actually buys you.

Categoryconditioning/UniWorld

Inputs (3)

NameTypeDefaultDescription
flux_clipCLIP
promptSTRING
max_sequence_lengthINT51277–4096

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING