Nodes/ComfyUI_LayerStyle_Advance/LayerUtility: ZhipuGLM4(Advance)
ComfyUI Node Runs on cloud

LayerUtility: ZhipuGLM4(Advance)

ZhipuGLM4 — free-tier text inference via Zhipu's (now Z.ai's) GLM API

By chflame163·Created 2 years ago·Updated 4 months ago· 696
LayerUtility: ZhipuGLM4(Advance)
  • history
  • text
  • history
model
user_promptwhere is the capital of France?
history_length8

The text counterpart to this pack's ZhipuGLM4V vision node - same API, same account, but for text-only chat completion instead of image description. The appeal is the same reason it's worth having in a pack that already has Gemini and DeepSeek text nodes: Zhipu's entry-level model has a genuinely free tier, no trial period, no card required.

A quick note on who you're calling: Zhipu AI is the Tsinghua University spin-out behind the GLM model line and CogVideoX, internationally rebranded as Z.ai in 2025, and it IPO'd in Hong Kong in January 2026 as China's first publicly listed frontier AI lab. This node hits their hosted API, not open weights - Z.ai does ship open models elsewhere, but what you're calling here is a paid service with a free tier, the same shape as Gemini is for Google.

The inputs and outputs that matter

  • model - eleven options: the newer glm-4.5 line (glm-4.5-flash, glm-4.5, glm-4.5-air, glm-4.5-x, glm-4.5-airx) plus the older GLM-4 line (GLM-4-Flash, GLM-4-FlashX, GLM-4-Plus, GLM-4-Long, GLM-4-Air, GLM-4-AirX). The README, written before the 4.5 line existed, only explicitly confirms GLM-4-Flash as free. Zhipu uses "flash" as their cheap/free tier naming elsewhere in the lineup too (confirmed on the vision side with glm-4v-flash), so glm-4.5-flash is a reasonable bet to also be the low-cost option - but check current pricing on Zhipu's own site rather than assuming, since that pattern isn't guaranteed.
  • user_prompt - your instruction.
  • history_length (default 8) - paired with the optional history input: wire a previous call's history output into a later node and the conversation carries context forward across multiple graph executions, same multi-turn pattern as this pack's DeepSeekAPI node.

Outputs: text (the response) and history (updated conversation state to chain forward).

How to install it

Recommended: ComfyUI Manager, search "ComfyUI Layer Style Advance". Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/chflame163/ComfyUI_LayerStyle_Advance.git

Then install_requirements.bat / install_requirements_aki.bat, or pip install -r requirements.txt plus repair_dependency.bat. Restart. No local model - pure API glue.

API key: register free at bigmodel.cn/usercenter/proj-mgmt/apikeys, then rename api_key.ini.example (in the plugin's own folder) to api_key.ini and fill in zhipu_api_key=. This file is shared with ZhipuGLM4V - set it up once and both nodes work.

Common issues & troubleshooting

Node errors or silently produces nothing. Check api_key.ini actually exists (not just the .example file) and has your key in the right field - this is the most common way any API node in this pack "doesn't work."

Picked a paid model and got billed unexpectedly. Only GLM-4-Flash is confirmed free by the README; several of the other ten options, especially the higher-reasoning -Plus, -Air, and -X variants, are metered. If you're just testing, start on Flash.

Requests time out or fail from certain networks. Zhipu's API is hosted in China; depending on where you're running ComfyUI, connectivity can be noticeably worse than hitting Gemini or OpenAI's endpoints. Consistent connection errors (rather than API errors) point at network routing, not the node.

Conversation loses earlier context. Expected once you exceed history_length - raise it (up to 64) if you need the model to remember further back.

Category😺dzNodes/LayerUtility

Inputs (4)

NameTypeDefaultDescription
modelCOMBO11 options: glm-4.5-flash, glm-4.5, glm-4.5-air, glm-4.5-x, glm-4.5-airx, GLM-4-Flash, +5
user_promptSTRINGwhere is the capital of France?
history_lengthINT81–64
historyoptGLM4_HISTORY

Outputs (2)

NameTypeDescription
textSTRING
historyGLM4_HISTORY