Nodes/comfyUI-tool-2lab/ChatGLM chatGPT 智谱AI
ComfyUI Node

ChatGLM chatGPT 智谱AI

Plug your Zhipu key in and get a text response for your prompt chain

By AI2lab·Created 2 years ago·Updated 2 years ago· 23
ChatGLM chatGPT 智谱AI
  • api_key
  • text
prompt
modelchatglm_turbo

This node lets you put a Chinese LLM inside your ComfyUI graph. It takes an API key, a prompt, and a model name, calls Zhipu's ChatGLM API, and returns the model's text answer as a STRING you can wire anywhere - into a prompt encoder, into another LLM node for a multi-step chain, or into a text display to see what came back. If you've used any "LLM in ComfyUI" node, the shape is familiar: text in, text out, with your key doing the paying.

Why Zhipu? The 智谱AI / Zhipu brand - now going by Z.ai internationally - is one of China's serious frontier labs, spun out of Tsinghua in 2019, and its GLM family is the deep-pocketed cousin of the open CogVideo/CogView line. If you're building workflows for the Chinese market, calling ChatGLM from inside the graph is a way to get model-based prompt rewriting or translation without leaving ComfyUI.

The inputs that matter:

  • api_key (KEY) - your Zhipu/Z.ai API key. The KEY type means it's entered as a hidden field, not a visible string, so you won't accidentally bake it into a shared workflow screenshot.
  • prompt - the actual text you're sending to the model. Multiline, so write your system-ish instructions right in here.
  • model - the model name, default chatglm_turbo. Here's the thing to know: the schema only exposes chatglm_turbo as a choice, and that's an older member of the GLM lineup - Zhipu has shipped newer GLM models since. If you're used to a specific GLM version, check the current model names in Zhipu's API docs, because this node's dropdown may be a snapshot from when the pack was written.
  • text out (STRING) - the model's reply, wired downstream.

This is a server-side call, so it needs network access and the key to be valid. No local model download, no VRAM hit - the compute happens at Zhipu. That's the tradeoff: instant and light locally, but you're paying per token and your prompts leave the machine.

Where people get burned: the pack is China-focused and its documentation is a thin Chinese README, and there's essentially no English community writing about these nodes - which makes sense, it's a small pack aimed at the WeChat mini-program crowd. So when something fails, you're debugging an API error message on your own. The good news is the node is a thin wrapper; an invalid key or a changed model name will throw loudly, and that's most of what can go wrong.

Installing it

Ships in AI2lab/comfyUI-tool-2lab. ComfyUI Manager → search "comfyUI-tool-2lab" → install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/AI2lab/comfyUI-tool-2lab

Restart ComfyUI. The pack's requirements are light - qrcode, Pillow, numpy, torch - and it doesn't download any model. On first launch it writes a config.json and a WeChat-binding QR; you can ignore those if you're only using the API nodes with your own key.

Common issues

Authentication is the #1 failure: a missing or expired Zhipu key gives you an API error, not a friendly message. Model-name drift is #2 - if the API returns "model not found," the dropdown's chatglm_turbo may have been retired or renamed, so check Zhipu's current catalog. And remember the KEY fields don't travel with a shared workflow the way plain strings do; if you hand someone the JSON, they'll have to supply their own key.

Category🦊2lab/llm

Inputs (3)

NameTypeDefaultDescription
api_keyKEY
promptSTRING
modelCOMBOchatglm_turbo1 options: chatglm_turbo

Outputs (1)

NameTypeDescription
textSTRING