Nodes/ComfyUI-LLM-Session/LLM Dialogue Cycle (Simple)
ComfyUI Node

LLM Dialogue Cycle (Simple)

The two-model loop with the clutter removed

By kantan-kanto·Created 7 months ago·Updated 14 days ago· 31
LLM Dialogue Cycle (Simple)
    • transcript_text
    initial_user_text
    system
    systemA
    systemB
    session_iddefault
    cycles1
    modelA(No GGUF models found in models/LLM/)
    modelB(No GGUF models found in models/LLM/)
    history_dir
    config_path
    force_text_onlyfalse
    reset_sessionfalse

    LLM Dialogue Cycle (Simple) is the same A→B→A→B model-to-model loop as the full LLM Dialogue Cycle node, with the parameter panel slimmed down to what you actually touch. The full node exposes a dozen sampling and caching knobs on the canvas; this one gives you the two models, the system prompts, the cycle count - and pushes everything else into a JSON config file. Same engine underneath: it literally instantiates the full node and hands off.

    That split is the pack's whole design philosophy. Standard nodes show you the runtime controls; Simple nodes keep the UI small and let advanced tuning live in config/simple_defaults.json, which you can either edit in place or point at with your own file via config_path. So if the full node feels like a cockpit, this is the one you put in a workflow you share with people who just want two models to argue.

    The inputs that matter

    Almost everything here is required, but it's all stuff you'd set anyway:

    • modelA / modelB - your two GGUF files from ComfyUI/models/LLM/.
    • cycles - round trips, one cycle being A then B. The Simple variant allows up to 100, double the full node's cap.
    • system, systemA, systemB - shared prompt plus per-role overrides. Leave empty to fall back to whatever the config file sets.
    • history_dir - where histories, summaries, the transcript, and session caches live; empty uses ComfyUI's output folder.

    The two optional inputs are worth knowing. force_text_only disables mmproj auto-detection, and for today's text-only dialogue you want it True - that's the author's own recommendation, spelled out in the tooltip and the README. reset_session overwrites the session history with a fresh one while keeping the disk cache, so you can clean the slate without throwing away the speed benefit of cached prompts.

    Output is a single transcript_text string with the whole exchange. Session naming works exactly like the full node: model A's history is {id}_A, B's is {id}_B, and the transcript appends to {id}.txt.

    Installing and running it

    Same pack as everything else here - ComfyUI Manager (search ComfyUI-LLM-Session) or clone into custom_nodes, install pillow, numpy, and llama-cpp-python, and restart:

    cd ComfyUI/custom_nodes
    git clone https://github.com/kantan-kanto/ComfyUI-LLM-Session.git
    pip install pillow numpy llama-cpp-python
    

    Model files go in ComfyUI/models/LLM/. The recurring gotchas all apply: two models means twice the VRAM, so pick your quants with care, and plain PyPI llama-cpp-python is fine for text-only - you only chase the JamePeng build if you're doing vision. If the node ever seems to ignore a setting you swore you changed, you've hit the config-file fallback: an empty UI field means the JSON default wins, and that's by design.

    CategoryLLM/Session

    Inputs (12)

    NameTypeDefaultDescription
    initial_user_textSTRINGInitial user message (sent to Model A only).
    systemSTRINGShared system prompt. Leave empty to use config/default.
    systemASTRINGSystem prompt override for Model A. Leave empty to use config/default.
    systemBSTRINGSystem prompt override for Model B. Leave empty to use config/default.
    session_idSTRINGdefaultSession id. A uses {id}_A, B uses {id}_B.
    cyclesINT11–100Number of turns. 1 = A then B.
    modelACOMBO(No GGUF models found in models/LLM/)GGUF model for role A
    modelBCOMBO(No GGUF models found in models/LLM/)GGUF model for role B
    history_dirSTRINGDirectory to store histories, summaries, transcript, and session-scoped disk caches. Empty uses ComfyUI output.
    config_pathoptSTRINGOptional path to a JSON config file. If empty, uses <node_dir>/config/simple_defaults.json.
    force_text_onlyoptBOOLEANfalseDisables mmproj auto-detect. For current text-only dialogue, use True.
    reset_sessionoptBOOLEANfalseIf true, overwrite existing session history with a fresh session. Session disk cache is kept.

    Outputs (1)

    NameTypeDescription
    transcript_textSTRING