Nodes/ComfyUI-QING/GLM语言丨API
ComfyUI Node

GLM语言丨API

GLM chat in your graph — Zhipu's model, your choice of host

By sheengoa·Created about a year ago·Updated 19 days ago· 16
GLM语言丨API
    • generated_text
    • conversation_info
    • total_tokens
    text_input请帮我分析一下这个问题,并提供详细的解决方案。
    platform智谱AI
    modelGLM-4.5-AirX
    max_tokens4096
    history10
    temperature0.7
    top_p0.90
    repetition_penalty1.10
    clear_historyfalse

    Zhipu's GLM family is one of the strongest Chinese-language LLM lines, and the pack's GLMLanguageAPI is how you get it into a workflow - for prompt rewriting, structured text generation, or any chat-shaped job that a diffusion pipeline needs done in words. Like its DeepSeek sibling in the same pack, it lets you pick the host: 智谱AI (Zhipu's own API) or 硅基流动 (SiliconFlow). Same node, different endpoints, different keys.

    It's built on ComfyUI-QING's shared API framework, so it behaves exactly like the other language nodes: multi-turn history in memory, a platform that decides the endpoint and key, friendly model names mapped to each host's real IDs. If you've already configured another QING API node, the setup muscle memory transfers completely.

    How it works. The platform dropdown routes between Zhipu's official API and SiliconFlow. Zhipu gets you the full GLM lineup - GLM-4.5, GLM-4.5-Flash, GLM-4, GLM-4-Long, GLM-4-FlashX, and others - while SiliconFlow serves its own set including GLM-4.5-Air, GLM-Z1-32B-0414, and the 9B variants. The tooltip on the model field spells out the reasoning: Flash models for fast daily chat, Long for huge context, the Z-series for reasoning-heavy work. The framework handles the key lookup, applies per-platform token caps, and keeps history rounds of conversation so a multi-step generation can build on itself.

    The inputs that matter.

    • text_input - the message you're sending (multiline).
    • platform - 智谱AI or 硅基流动; match it to the key you hold.
    • model - a friendly name from the dropdown (19 options; GLM-4-Plus is the default).
    • max_tokens (default 4096) and history (default 10 rounds).
    • Optional: temperature, top_p, repetition_penalty, and clear_history.

    Outputs: generated_text, conversation_info, total_tokens. That's the standard trio - text out, usage tracking out, and a status/meta string.

    How to install. ComfyUI-QING installs as one pack - search "ComfyUI-QING" in ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/GAO-SHIQING/ComfyUI-QING
    cd ComfyUI-QING
    python install_dependencies.py
    

    Set the key in Settings → QING → API Configuration (or the matching env var), restart, and you're live. The README's clone URL is typo'd (GAOSHI-QING, missing the H) - use the URL above or Manager.

    Troubleshooting. Key/platform mismatch is the number one error: a Zhipu key with the SiliconFlow platform selected gets you a 401, so keep the dropdown aligned with the key you actually configured. Second, some GLM variants exist on only one host (the tooltip flags GLM-Z1-32B-0414 as a SiliconFlow listing) - if the call fails with a model-not-found, that's usually why. And remember conversation state is per-instance memory: restarts reset it, and clear_history is the manual reset if a long chat starts echoing its own context. As with any API node, your input text leaves the machine to the provider - the standard tradeoff, fine for prompt work.

    CategoryQING/API

    Inputs (9)

    NameTypeDefaultDescription
    text_inputSTRING请帮我分析一下这个问题,并提供详细的解决方案。输入要发送给GLM模型的文本内容,GLM擅长中文理解、逻辑推理和创意写作
    platformCOMBO智谱AI选择API服务提供商
    modelCOMBOGLM-4.5-AirX选择要使用的GLM模型 📋 智谱AI模型特点: 🔸 GLM-4.5-Flash:最新快速版本,响应迅速,适合日常对话 🔸 GLM-4.5:最新标准版本,平衡性能和质量 🔸 GLM-4:经典版本,稳定可靠 🔸 GLM-4-Long:长文本版本,支持超长上下文 🔸 GLM-4-FlashX:超快响应版本 📋 硅基流动模型特点: 🔸 GLM-4.5:高性能版本,适合复杂推理 🔸 GLM-4.5-Air:轻量级版本,快速响应 🔸 GLM-Z1-32B-0414:大参数版本,强大的理解能力 🔸 GLM-4-32B-0414:经典大参数版本 💡 GLM模型在中文理解、创意写作、代码生成方面表现优异
    max_tokensINT40961–32768模型生成文本时最多能使用的token数量
    historyINT101–40保持的历史对话轮数
    temperatureoptFLOAT0.70–2控制生成文本的随机性
    top_poptFLOAT0.900–1控制生成文本的多样性
    repetition_penaltyoptFLOAT1.101–1.3控制重复文本的惩罚程度
    clear_historyoptBOOLEANfalse是否清除历史对话记录

    Outputs (3)

    NameTypeDescription
    generated_textSTRING
    conversation_infoSTRING
    total_tokensINT