ComfyUI Node

AI_GLM_text

Text-only chat against Zhipu's GLM models

By cardenluo·Created 2 years ago·Updated 18 days ago· 309
AI_GLM_text
    • result
    • system_prompt
    model_nameGLM-4.5-Flash
    presetNone
    custom_system_prompt
    text
    max_tokens1024
    seed0
    api_key_input
    custom_model

    Same vendor and API as AI_GLM_image, stripped of the vision inputs - this one's a pure text-in, text-out chat node against Zhipu AI's (Z.ai) GLM models. Use it for prompt expansion, rewriting a rough idea into a proper generation prompt, summarizing, or any LLM-shaped text task you'd rather hand off inside the graph than do in a separate chat window. Zhipu is worth trusting here: it's the lab behind CogVideoX and most of its line ships genuinely open (MIT/Apache 2.0), and it IPO'd on the Hong Kong exchange in January 2026 as China's first publicly listed frontier AI company - this API sits alongside a real, actively-maintained open catalog, not a side project.

    The model_name dropdown carries the same structure as its vision sibling, including the same author-authored dividing line - one of the choices is literally a label meaning "the models below need billing enabled." GLM-4.5-Flash (the default) and glm-4v-flash sit above that line and work on a free account; glm-5, GLM-4.6V, glm-4.7, glm-4.5-air, and glm-4.5 sit below it and need a paid account before they'll return anything. Start with the default flash model to confirm your key works before spending time on the paid tier.

    Required fields: model_name, preset (defaults to "None"), custom_system_prompt, and text - your actual prompt. Optional: max_tokens (1–4096, default 1024), seed, api_key_input, and custom_model for a free-text model override outside the dropdown list. It returns result (the response text) and system_prompt (whatever system prompt actually ran, useful for confirming a saved preset loaded correctly).

    That preset dropdown only showing "None" is expected on a fresh install, not broken - this pack's AI_PresetSave node writes named prompts into a shared AiPromptPreset.json, and once you've saved one there (and restarted ComfyUI), it appears here as a selectable option instead of retyping the same system prompt into every node by hand.

    Installing it: search "ComfyUI-Apt_Preset" in ComfyUI Manager, or clone manually - cd ComfyUI/custom_nodes && git clone https://github.com/cardenluo/ComfyUI-Apt_Preset - then run install.bat and restart. Pure API client, no model files to fetch.

    Troubleshooting: a failure on any of the models below the billing-divider line means exactly what it says - go turn on billing for your Zhipu account, don't waste time debugging the node itself. A failure on the free-tier default is almost always the API key: double-check what's in api_key_input for stray whitespace or an expired key. If you set up a preset through AI_PresetSave and it's not showing in the preset dropdown, that's the restart-required quirk - ComfyUI needs to reload the pack before newly saved presets register as choices.

    CategoryApt_Preset/AI_tool

    Inputs (8)

    NameTypeDefaultDescription
    model_nameCOMBOGLM-4.5-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
    max_tokensoptINT10241–4096
    seedoptINT00–18446744073709550000
    api_key_inputoptSTRING
    custom_modeloptSTRING

    Outputs (2)

    NameTypeDescription
    resultSTRING
    system_promptSTRING