MinusZone - ChatGLM3Embeds2Conditioning
The plumbing node that turns raw Kolors embeddings into conditioning
- kolors_embeds
- positive
- negative
MZ_ChatGLM3Embeds2Conditioning is a utility node with an honest job description: it takes already-encoded Kolors embeddings - a KOLORS_EMBEDS object - and converts them into the positive and negative CONDITIONING pair that your KSampler actually eats. It doesn't encode any text itself. It's the last mile of the pipeline, and you only meet it if you're working with precomputed embeddings rather than encoding a prompt on the fly.
What a KOLORS_EMBEDS is
Think of it as a box holding four tensors: prompt_embeds and negative_prompt_embeds (the actual token-level embeddings for both prompts), plus pooled_prompt_embeds and negative_pooled_prompt_embeds (the pooled/global summaries). Something upstream has to have produced those - typically an external Kolors pipeline or a custom script that did the ChatGLM3 encoding outside this node - and this node is what wraps them into the conditioning format ComfyUI's sampler expects. The positive conditioning gets the full set including the pooled output and the size/crop/target geometry; the negative gets its embeddings and pooled output, without the size fields. Two outputs, positive and negative, ready to wire into KSampler.
Inputs and outputs
kolors_embeds- the KOLORS_EMBEDS object, required.width,height,crop_w,crop_h,target_width,target_height- the canvas geometry, identical in meaning to the same fields onMZ_ChatGLM3_Advance_V2. Defaults are 1024 / 0 / 1024.- Outputs:
positiveandnegativeCONDITIONING.
How to use it (and when not to)
The realistic use case is the API/batch workflow: some other system encoded a batch of prompts into embeddings (saving re-encoding time or using a text encoder this node set doesn't ship), then hands them to ComfyUI as KOLORS_EMBEDS, and this node adapts them into the graph. If you're just prompting normally in the UI, you don't need it - MZ_ChatGLM3_V2 does the encoding and returns CONDITIONING directly. Reaching for this node when you have plain text is a sign you've gone one level of abstraction too deep.
Install
Standard pack install: ComfyUI Manager search "ComfyUI-Kolors-MZ", or git clone https://github.com/MinusZoneAI/ComfyUI-Kolors-MZ into custom_nodes and restart. No extra dependencies beyond the pack itself - the models (ChatGLM3, UNet) are only needed if whatever produced the embeddings is running on this machine too. The main gotcha is data shape: a KOLORS_EMBEDS object from a different source must match what this node expects (prompt/negative + pooled variants), or the KSampler will fail on tensor shapes further down the line. Validate your embeds source before blaming the node.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| kolors_embeds | KOLORS_EMBEDS | — | |
| 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 (2)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |