LLMLoader (Text Encode)
The Bare-Bones LLM Loader for People Who Want to Build Their Own Encoder
- LLM
LLMLoader (Text Encode) is the low-level half of this pack's second text-encoder path, and it's honest about being low-level. It takes a HuggingFace LLM from your models/LLM folder and loads it as a bare LLM object - the raw AutoModel plus tokenizer, no ComfyUI CLIP wrapper, no magic. You get a socket that only one node in the pack knows what to do with: LLMTextEncode, its partner in the same menu, which turns it into actual CONDITIONING.
If that sounds like more steps than the pack's other loader (LLMCLIPLoader, which hands you a ready-made CLIP in one node), you're right. That one is the convenient path. This one is the manual path, and there are legit reasons to prefer it: you see exactly what goes in, you control the exact text the encoder sees, and you're not carrying around a full comfy.sd.CLIP object with its hooks and patcher. It's the DIY route, and the pack clearly treats it as the utility version.
How it works
The loader picks a model folder, a device (auto / cpu / cuda), and a dtype, then does the straightforward thing: AutoTokenizer.from_pretrained plus AutoModel.from_pretrained straight out of transformers, set to eval and frozen. It returns a dict carrying the tokenizer, the text encoder, the device, and the dtype. Nothing is loaded on import - the load happens when the node runs, and the dropdown is built by scanning models/LLM for subfolders that contain a config.json.
One quirk you'll hit immediately: the defaults are conservative (device: cpu, dtype: default) because this node is built to work even on a machine with no GPU. That's friendly, but it means the first thing most people do is flip device to cuda and pick a dtype. And if you do stay on CPU, the loader follows the same hard rule as the rest of the pack: only FP32 or default are allowed there. Pick BF16 on CPU and it raises a clear error telling you exactly that.
The inputs that matter
Honestly there are only three, and they're all on the node itself:
- model_folder - dropdown of your
models/LLMsubfolders. Must be a complete HuggingFace repo. - device -
auto,cpu, orcuda(pluscuda:Nif you have more than one card). - dtype -
default, BF16, FP16, FP32, and FP8 if your torch build has it.
Output is one LLM socket, which feeds straight into LLMTextEncode.
Installing it
Same story for every node in this pack, so once you've done it, you've done it: ComfyUI Manager → search comfyui-ez-llm, or:
cd ComfyUI/custom_nodes
git clone https://github.com/spawner1145/comfyui-ez-llm
Then restart and drop a full model repo into models/LLM/<name>/ - the README's example is Qwen3-0.6B-Prompt-Gen-v0.1. Dependencies are just transformers and accelerate.
A sizing note carried over from the pack's other nodes: for prompt rewriting a small model genuinely is enough - the job wants something small and obedient that follows a format, not a giant that thinks out loud. If you load a 0.6B and it does the job, that's the correct outcome, not a compromise. And keep in mind this node loads AutoModel (the plain encoder path), not the causal-generative path - if you want the model to write text rather than encode it, that's what LLMModelLoader + LLMTextGenerator in the same pack are for. This one is strictly for feeding a conditioning chain.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model_folder | COMBO | (请将模型放到 models/LLM 目录) | 1 options: (请将模型放到 models/LLM 目录) |
| device | COMBO | cpu | 3 options: auto, cpu, cuda |
| dtype | COMBO | default | 6 options: default, BF16, FP32, FP16, FP8_E4M3, FP8_E5M2 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LLM | LLM | — |