Nodes/ComfyUI-ELLA/Load T5 TextEncoder #ELLA
ComfyUI Node

Load T5 TextEncoder #ELLA

Loading FLAN-T5 for ELLA

By TencentQQGYLab·Created 2 years ago·Updated 2 years ago· 382
Load T5 TextEncoder #ELLA
    • T5_TEXT_ENCODER
    name
    max_length0
    dtype

    This is the node that actually gives ELLA its brains, and it's the reason the whole pack is a ~6 GB download. It loads FLAN-T5 XL - a real language model, roughly 3 billion parameters - from ComfyUI/models/ella_encoder/. If the Load ELLA Model node is the tiny connector, this is the encoder that reads your prompt properly.

    Why go through this instead of CLIP? SD 1.5's CLIP text encoder caps out at 77 tokens and treats text as a tag list. FLAN-T5 is an actual LLM: it understands full sentences, spatial relationships, adjectives doing real work. The whole pitch of ELLA is "give SD 1.5 an LLM's semantic alignment without retraining the diffusion model." The trade-off is disk space, a load-time hit, and the fact that everything is SD 1.5-only.

    The three settings that matter

    • name - a dropdown built by scanning ella_encoder for folders containing a config.json. In the README's layout that's models--google--flan-t5-xl--text_encoder, holding config.json, model.safetensors, tokenizer files, and so on. If the dropdown is empty, your folder structure is wrong.
    • max_length - default 0 means flexible token length: no padding, no truncation. The pack's own comment calls this a trick, and it genuinely helps short captions - a fixed padded length makes a one-line prompt behave like it was written to a quota. Set it to a real value (up to 128, in steps of 16) and prompts get padded or cut to that length.
    • dtype - auto, FP32, or FP16. auto picks whatever ComfyUI thinks is best for your text-encoder hardware. If you hit RuntimeError: ... not implemented for 'Half' on load or encode, this is your escape hatch: set it to FP32. That fp16-kernel error is an old, well-known SD-family failure on GPUs (and some setups) where half-precision ops aren't supported - forcing 32-bit costs speed and VRAM but produces valid numbers.

    Output is a T5_TEXT_ENCODER object that you feed into T5 Text Encode #ELLA or ELLA Text Encode.

    Where the download goes

    mkdir -p ComfyUI/models/ella_encoder
    # unzip / place the FLAN-T5 XL text encoder folder here
    # (must contain config.json at the folder root)
    

    Grab it from the QQGYLab/ELLA Hugging Face repo (under models--google--flan-t5-xl--text_encoder), or add an ella_encoder entry to extra_model_paths.yaml for a custom location. The pack pulls transformers and sentencepiece from its requirements.txt - those are what actually run this encoder, so don't skip the pip install -r requirements.txt step.

    One honest note on the size: the raw Hugging Face repo is bloated with all the model formats; the community quickly learned that only the text encoder weights are needed. Clone smartly, or just take the folder the README points at. And don't panic when the first run spends a while loading it into VRAM - it's a 3B-parameter model, that's normal.

    Categoryella/loaders

    Inputs (3)

    NameTypeDefaultDescription
    nameCOMBO0 options:
    max_lengthINT00–128
    dtypeCOMBO3 options: auto, FP32, FP16

    Outputs (1)

    NameTypeDescription
    T5_TEXT_ENCODERT5_TEXT_ENCODER