ComfyUI Node

AI_GLM_image

Vision chat over Zhipu's GLM models, with a free tier that actually works

By cardenluo·Created 2 years ago·Updated 18 days ago· 309
AI_GLM_image
  • image_1
  • image_2
  • image_3
  • result
  • system_prompt
model_nameglm-4v-flash
presetNone
custom_system_prompt
text
max_tokens1024
seed0
api_key_input
custom_model

GLM is Zhipu AI's (now branded internationally as Z.ai) model line, and this node is a vision-language chat client for it - hand it up to three images plus a text prompt, get a text answer back. Think of it as a captioning/analysis/Q&A node rather than an image generator: nothing here produces pixels, it reads them and talks about them, which makes it a solid fit for auto-captioning a batch, describing a reference image for a downstream prompt, or asking a model to judge whether a generated image matches a brief.

Zhipu is worth a beat of context because it changes how you should think about this node: it's a genuinely open-weights lab (CogVideoX, GLM-Image, and its LLM line mostly ship MIT or Apache 2.0), and it went public on the Hong Kong exchange in January 2026 as China's first listed frontier AI company - so this isn't some fly-by-night API, it's backed by an actual public company with a track record of shipping usable open models. The API side is the commercial complement to that open catalog.

The model_name dropdown is worth reading carefully, because the author baked a note straight into the choice list: one of the options is literally a separator that translates to "the ones below need billing enabled." Above that line sit glm-4v-flash and GLM-4.5-Flash - usable on a free-tier account. Below it: glm-5, GLM-4.6V, glm-4.7, glm-4.5-air, glm-4.5 - all of which need a paid account before they'll respond. If you're just testing this node out, start with glm-4v-flash and don't spend time debugging auth errors on the paid-tier models until you've confirmed billing is actually turned on.

Required fields beyond the model: preset (defaults to "None" - see the note below), custom_system_prompt, and text, your actual question or instruction. Optional: image_1/image_2/image_3 for up to three reference images, max_tokens (10–4096, default 1024), seed, api_key_input, and custom_model (a free-text override if you want to hit a model not in the dropdown). Outputs are result (the model's text response) and system_prompt (echoing back whatever system prompt actually got used - handy for confirming a preset applied correctly).

That preset field showing only "None" isn't a bug - it's empty because you haven't saved one yet. This pack ships a companion node, AI_PresetSave, that writes named prompt presets into a shared AiPromptPreset.json file; once you save one there, it shows up as a new option in this dropdown (a ComfyUI restart is typically required before a freshly-saved preset appears as selectable).

Installing it: ComfyUI Manager, search "ComfyUI-Apt_Preset," or manually - cd ComfyUI/custom_nodes && git clone https://github.com/cardenluo/ComfyUI-Apt_Preset - then install.bat and restart. No model download needed; it's an API client.

Troubleshooting: an empty or error result on glm-5/GLM-4.6V/glm-4.7/glm-4.5-air/glm-4.5 almost always means billing isn't enabled on your account yet - that separator in the dropdown is the author telling you exactly that. If you're getting rejected on the free-tier models too, it's an API key problem: confirm the key is valid and pasted cleanly into api_key_input. And if your saved preset isn't showing up in the dropdown, restart ComfyUI - presets from AI_PresetSave need a fresh load to register.

CategoryApt_Preset/AI_tool

Inputs (11)

NameTypeDefaultDescription
model_nameCOMBOglm-4v-flash9 options: None, GLM-4.5-Flash, glm-4v-flash, XX----下面的要开通支付-----XX, glm-5, GLM-4.6V, +3
presetCOMBONone1 options: None
custom_system_promptSTRING
textSTRING
image_1optIMAGE
image_2optIMAGE
image_3optIMAGE
max_tokensoptINT102410–4096
seedoptINT00–18446744073709550000
api_key_inputoptSTRING
custom_modeloptSTRING

Outputs (2)

NameTypeDescription
resultSTRING
system_promptSTRING