Load ChatGLM3 Model
The local-file option for the biggest piece of Kolors
- chatglm3_model
Load ChatGLM3 Model is the sibling of the auto-downloading ChatGLM3 loader, and the one you use when you'd rather manage the encoder yourself. Instead of pulling the whole HuggingFace diffusers folder, it loads ChatGLM3 from a single .safetensors file sitting in ComfyUI/models/LLM/checkpoints. Same output, different diet.
Why does this variant exist? The pack's README has a whole section about it. Loading from a local file is nicer for people who want to pre-download once, keep a quantized copy around, or sidestep the auto-downloader when their connection (or HuggingFace) is being difficult. Kijai even published a matching repo, Kijai/ChatGLM3-safetensors, with pre-converted fp16 and quantized checkpoints that drop straight into that folder.
How it works
This is the clever bit: the node doesn't need the full HuggingFace layout because the configs are bundled in the pack. text_encoder_config.json and the tokenizer files ship inside the repo, so from one weights file it can reconstruct the whole model - ChatGLMConfig from the bundled JSON, weights loaded with ComfyUI's load_torch_file, and the tokenizer from the included config folder.
Two details worth knowing:
- Quantization is filename-driven. The loader checks the checkpoint name for
4bitor8bitand quantizes automatically. Name your filechatglm3-fp16.safetensorsand it stays fp16;chatglm3-4bit.safetensorsand you get 4-bit. There's no precision dropdown here - the filename is the setting. - It uses
accelerate'sinit_empty_weightsto build the model skeleton without blowing up memory, then moves the loaded tensors onto the offload device. Ifaccelerateisn't installed, the code falls back to a plain load - which is whyaccelerateis in the pack'srequirements.txt.
The input
- chatglm3_checkpoint - a dropdown listing whatever
.safetensorsfiles are inComfyUI/models/LLM/checkpoints. If the folder's empty, the dropdown's empty and the node can't do anything, so drop a file in and hit refresh first.
The output is the same chatglm3_model as its sibling - wire it into Kolors Text Encode and the rest of the chain is identical.
Installing it
Same pack, same install:
cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-KwaiKolorsWrapper
cd ComfyUI-KwaiKolorsWrapper
pip install -r requirements.txt
Restart ComfyUI. ComfyUI Manager also has it under "KwaiKolorsWrapper". Then grab the checkpoint: either convert it yourself or download from Kijai/ChatGLM3-safetensors on HuggingFace and put the file at ComfyUI/models/LLM/checkpoints/. The folder gets registered automatically when the pack loads - ComfyUI may need a restart after you add the file for the dropdown to see it.
Gotchas
- The empty-dropdown loop is the #1 first-run frustration: file not in place yet, or ComfyUI didn't refresh. Restart after dropping the file in.
- Filename spelling matters for quantization -
4bit/8bitare literal substrings, so don't name a quantized fileq8and expect it to be detected. - This node is only for the encoder. You still need the Kolors UNet loader, Text Encode, Sampler, and an SDXL VAE decode to get a picture.
- If the pack itself won't import, it's usually the known transformers/diffusers version clash with other packs - the community fallback there is the MinusZoneAI/Kolors-MZ wrapper.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| chatglm3_checkpoint | COMBO | 0 options: |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| chatglm3_model | CHATGLM3MODEL | — |