MinusZone - ChatGLM3TextEncodeAdvanceV2
The Kolors text encoder for 2048-resolution workflows
- chatglm3_model
- CONDITIONING
MZ_ChatGLM3_Advance_V2 is MZ_ChatGLM3_V2 with a resolution kit attached. Same ChatGLM3 encoding, same output type, but it adds six integer inputs - width, height, crop_w, crop_h, target_width, target_height - that get baked into the conditioning. The pack comments this node "for 2048 resolution," which tells you what it's for: if you're generating at sizes where the model needs to know the canvas geometry up front, this is the encoder that tells it.
Why the size inputs exist
Diffusion conditioning doesn't have to be just "what the text means" - it can also carry metadata about the image the sampler is expected to produce. ComfyUI's SDXL pipeline does this routinely (that's what the crop/target fields on CLIPTextEncodeSDXL are), and Kolors inherits the convention from its SDXL-style UNet. The base MZ_ChatGLM3_V2 node sends only text; this one sends text plus the full size/crop/target picture, which matters at high resolutions where the model otherwise has to guess at the intended layout and can drift or produce artifacts. If you've been fighting wonky 2048 outputs with the plain V2 encoder, this node is the knob you're missing.
Inputs and outputs
Required: chatglm3_model (from MZ_ChatGLM3Loader), text (multiline), then:
width/height- the canvas, default 1024.crop_w/crop_h- crop offset, default 0.target_width/target_height- the final target resolution, default 1024.
Set width/height/target to your intended output size and you're done. The semantics mirror SDXL's conditioning: width/height describe the actual latent you're sampling, and if you're doing the encode-and-crop dance for high-res, target_* is where the final dimensions go. Output is a single CONDITIONING for the KSampler's positive slot (or negative, if you feed it a negative prompt).
Install and models
Standard pack install: ComfyUI Manager search "ComfyUI-Kolors-MZ", or git clone https://github.com/MinusZoneAI/ComfyUI-Kolors-MZ into custom_nodes and restart. Requires the ChatGLM3 fp16 model in models/LLM/ (from Kijai/ChatGLM3-safetensors) and pairs with the V2 UNet loader.
Common issues
Pairing, again: this is a V2-family node, so it goes with MZ_KolorsUNETLoaderV2 - the V1 loader's graph expects the hid_proj-carrying legacy encoder. And because the extra conditioning fields are baked in, a mismatch between these numbers and the actual latent size from your Empty Latent node produces subtly off results rather than a hard error; keep them consistent with what KSampler actually receives. Beyond that, it's the same model-download gotchas as the rest of the pack: fp16 ChatGLM3, correct file in the dropdown, current ComfyUI core.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| chatglm3_model | CHATGLM3MODEL | — | |
| text | STRING | — | |
| width | INT | 10240–16384 | — |
| height | INT | 10240–16384 | — |
| crop_w | INT | 00–16384 | — |
| crop_h | INT | 00–16384 | — |
| target_width | INT | 10240–16384 | — |
| target_height | INT | 10240–16384 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |