Chat GLM Image Generate Node
Call Z.ai's hosted image model from inside ComfyUI
- IMAGE
Most of ComfyUI is built around running weights you download and control locally. This node is the exception: it's an API client wearing a ComfyUI node's clothes. Send a text prompt, and it returns an image generated by one of Z.ai's hosted CogView models - no checkpoint, no VAE, no sampler, none of it running on your machine.
Why you'd reach for it
The honest use case is comparison and convenience, not replacing your local pipeline: you want to quickly see what a specific hosted model does with a prompt, without setting up local weights, or you're testing a prompt idea cheaply on a smaller model before committing to a slower local run. It's also useful if your machine simply can't run image generation locally at all (low VRAM, laptop, whatever) and you'd rather pay per call than not generate at all.
Worth knowing going in: CogView is one product in a much larger catalogue from Z.ai (formerly Zhipu AI), a Tsinghua-spinout lab that's actually best known in this community for its open-weight video and motion-transfer models (CogVideoX, SCAIL) - the image line here gets far less community attention by comparison, so go in expecting a solid, general-purpose hosted generator rather than something with a dedicated fanbase and a deep well of community-tested prompting tricks.
How it works
Your prompt (plus a few generation parameters) goes to Z.ai's hosted API, which runs one of their CogView models server-side and returns the resulting image. Standard request-response - there's no sampler steps, no CFG scale, none of the usual local-diffusion knobs, because you're not running the diffusion process yourself.
The inputs and outputs that matter
prompt- your text prompt, multiline.model(defaultcogview-3-flash) - 4 choices:glm-image,cogview-4-250304,cogview-4,cogview-3-flash. The-flashvariant is the cheap/fast default; thecogview-4variants are the newer, presumably higher-quality tier if flash disappoints.quality(defaultstandard, optional) -standardorhd. Straightforward trade of cost/speed for output quality.width/height(default 1024×1024, optional) - output resolution.watermark_enabled(defaulttrue, optional) - whether the returned image carries a watermark. Turn it off if you need clean output, though check Z.ai's terms on watermark-free generation before relying on this for anything commercial.
Output is a single IMAGE - same type as any local generator node, so it drops straight into a Save Image, a further img2img pass, or an upscaler.
How to install it
Via ComfyUI Manager: search "ComfyUI Custom Nodes AlekPet" and install. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/AlekPet/ComfyUI_Custom_Nodes_AlekPet
Restart ComfyUI. You'll need a Z.ai (Zhipu) API key configured before this generates anything - check the ChatGLMNode subfolder in the repo for exactly where the key goes, since the top-level README doesn't document per-node API setup. No local model download - there's nothing to fetch, the model runs entirely on Z.ai's servers.
Common issues & troubleshooting
Authentication errors. Unconfigured API key - same as every other ChatGLM* node in this pack, this is a paid hosted call and needs credentials first.
Every generation costs money, unlike a local checkpoint. Budget accordingly if you're iterating on a prompt a lot - a local Z-Image or SDXL checkpoint is free per-generation after the initial setup; this node bills per call. It's a better fit for occasional comparison runs than for the kind of rapid seed-hunting you'd do locally.
Watermark shows up even though you don't want it. Check watermark_enabled - it defaults to true.
Output doesn't match the visual style you get from local checkpoints you're used to. Expected - CogView is a different model family entirely from Flux/SDXL/Z-Image, trained and tuned by a different team with different priorities. Treat it as its own tool with its own visual signature, not a drop-in swap for your usual local pipeline.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | cogview-3-flash | The model code to be called. Models with text 'flash' should be free! |
| prompt | STRING | Enter the prompt for generated image | |
| qualityopt | COMBO | standard | Image generation quality, default is 'standard'. This parameter is only supported by cogview-4-250304 and 'glm-image' model supports only HD |
| widthopt | INT | 1024 | Image width, default value 1024. Recommended width values: 720, 768, 864, 960, 1024, 1056, 1088, 1152, 1280, 1344, 1440, 1472, 1568, 1728. |
| heightopt | INT | 1024 | Image height, default value 1024. Recommended height values: 720, 768, 864, 960, 1024, 1056, 1088, 1152, 1280, 1344, 1440, 1472, 1568, 1728. |
| watermark_enabledopt | BOOLEAN | true | Add watermark, default: True. Watermark off allow only customers who have signed a disclaimer to use the service. Signature path: Personal Center>Security Management>Remove Watermark Management |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |