Nodes/ComfyUI-MiniMaxH3-QwenPrompt/Qwen Chat (Multi-turn)
ComfyUI Node

Qwen Chat (Multi-turn)

A free multi-turn Qwen chat that lives inside ComfyUI

By wangminxing2019·Created 30 days ago·Updated 19 days ago· 2
Qwen Chat (Multi-turn)
    • response
    • history
    model
    mmprojNone
    chat_handlerQwen3.5
    n_ctx8192
    user_input
    system_prompt
    max_turns10
    clear_historyfalse
    enable_thinkingfalse
    seed0
    max_tokens1024
    temperature0.80
    top_p0.90
    top_k30

    Here's a node that has nothing to do with MiniMax H3 at all. It's a plain multi-turn chat with a local Qwen GGUF, tucked into a pack about video prompts - and honestly it's the pack's sleeper. Once you've got a Qwen model loaded for prompt-writing, you might as well use it to brainstorm the prompt ideas themselves. This is that: type a sentence, get an answer, and it remembers the conversation.

    It's completely local and needs no API key - same stack as the rest of the pack, just pointed at a conversation instead of the H3 format.

    How it works

    The node keeps a session per node instance in memory - a list of system/user/assistant messages keyed by the node's unique_id. Each run appends your user_input, trims to the most recent max_turns (dropping the oldest turns once you exceed the limit), and calls create_chat_completion through ComfyUI-llama-cpp_vlm with the whole session. Then it appends the reply and hands you back the response plus the full formatted history.

    Two niceties worth calling out. max_turns caps context growth so a long chat session doesn't balloon past your n_ctx - the tooltip spells it out: keep the most recent N turns, discard the oldest beyond that. And enable_thinking flips the thinking mode on the model's chat handler at runtime without reloading the checkpoint, which is a real Qwen3.5-style feature: off for speed, on when you want the better answer.

    The inputs that matter

    • user_input - what you're saying this turn. Empty input just returns the current history.
    • system_prompt - empty by default, which falls back to a basic helpful-assistant system prompt. Set it to make this a specialized assistant (e.g. a video-idea critic) without touching the model.
    • max_turns (default 10, up to 50) - how much of the conversation it remembers.
    • clear_history - tick it and run once to wipe the session.
    • enable_thinking - off by default for speed; on for thinking models.

    The standard sampling controls (temperature, top_p, top_k, max_tokens, seed) behave exactly as you'd expect, and model / mmproj / chat_handler / n_ctx are the same shared LLM-loading block as the rest of the pack.

    Two outputs: response (the latest reply, wire it into a text display) and history (the whole session, formatted with system/user/assistant markers - handy for dumping to a file or feeding a later LLM stage).

    Installing it

    Same shared setup as the pack's other nodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/wangminxing2019/ComfyUI-MiniMaxH3-QwenPrompt.git
    git clone https://github.com/JamePeng/ComfyUI-llama-cpp_vlm.git
    

    Restart, and make sure a Qwen GGUF is in ComfyUI/models/LLM. For chat you don't need a vision model or an mmproj - any Qwen GGUF works.

    Gotchas worth knowing

    • History lives in RAM, tied to the node instance - the session is keyed to the node's id in the current workflow. Duplicate the node and you get a separate fresh session; load a different workflow and it's gone. Don't treat it as a chat log.
    • A failed run rolls back cleanly - if inference throws, the node pops your user input off the session so a crash doesn't poison the conversation. Nice touch, but it means the failure message alone won't tell you what broke.
    • It shares the loaded model - since it uses the same storage as the prompt nodes, switching models here unloads the one the prompt node was using. Fine, just be aware changing model or n_ctx on any of these nodes kicks the others out of VRAM.
    CategoryMiniMax H3

    Inputs (14)

    NameTypeDefaultDescription
    modelCOMBO1 options: (未找到模型,请检查 models/LLM 目录)
    mmprojCOMBONone1 options: None
    chat_handlerCOMBOQwen3.520 options: None, LLaVA-1.5, LLaVA-1.6, Moondream2, nanoLLaVA, llama3-Vision-Alpha, +14
    n_ctxINT81921024–327680上下文长度限制
    user_inputSTRING
    system_promptSTRING
    max_turnsINT101–50保留的最近对话轮数,超过后自动丢弃最早的内容
    clear_historyBOOLEANfalse勾选后运行一次以清空该节点的对话历史
    enable_thinkingBOOLEANfalse关闭思考可大幅加速回答,开启思考质量更好(Qwen3.5 等 thinking 模型生效)
    seedINT00–18446744073709550000
    max_tokensINT10240–8192
    temperatureFLOAT0.800–2
    top_pFLOAT0.900–1
    top_kINT300–1000

    Outputs (2)

    NameTypeDescription
    responseSTRING
    historySTRING