ComfyUI Node
LLM Dialogue Cycle
Run a chat cycle between two local GGUF models inside one node (A<->B), saving transcript.
LLM Dialogue Cycle
- transcript_text
◄initial_user_text►
◄session_iddefault►
◄cycles1►
◄modelA(No GGUF models found in models/LLM/)►
◄mmprojA(Auto-detect)►
◄modelB(No GGUF models found in models/LLM/)►
◄mmprojB(Auto-detect)►
◄system_promptYou are a helpful assistant.►
◄system_prompt_A►
◄system_prompt_B►
◄max_tokens512►
◄temperature0.70►
◄top_p0.90►
◄n_gpu_layers0►
◄n_ctx4096►
◄max_turns12►
◄summarize_old_historytrue►
◄summary_chunk_turns3►
◄max_tokens_summary128►
◄summary_max_chars1500►
◄dynamic_max_tokenstrue►
◄min_generation_tokens96►
◄safety_margin_tokens64►
◄persistent_cacheoff►
◄runtime_cacheLlamaTrieCache►
◄repeat_penalty1.12►
◄repeat_last_n256►
◄rewrite_continuetrue►
◄log_leveltiming►
◄suppress_backend_logstrue►
◄history_dir►
◄reset_sessionfalse►
◄stream_to_consolefalse►
◄enable_thinkingfalse►
CategoryLLM/Session
Inputs (34)
| Name | Type | Default | Description |
|---|---|---|---|
| initial_user_text | STRING | Initial user message (sent to Model A only) | |
| session_id | STRING | default | Base session id. A uses {id}_A, B uses {id}_B, transcript uses {id}.txt |
| cycles | INT | 11–50 | Number of round trips. 1 = A then B. |
| modelA | COMBO | (No GGUF models found in models/LLM/) | GGUF model for role A |
| mmprojA | COMBO | (Auto-detect) | Projector reserved for image-capable dialogue workflows. For current text-only dialogue, use (Not required). |
| modelB | COMBO | (No GGUF models found in models/LLM/) | GGUF model for role B |
| mmprojB | COMBO | (Auto-detect) | Projector reserved for image-capable dialogue workflows. For current text-only dialogue, use (Not required). |
| system_prompt | STRING | You are a helpful assistant. | Shared system prompt for both roles |
| system_prompt_A | STRING | Role-specific system prompt for model A (overrides shared prompt if set) | |
| system_prompt_B | STRING | Role-specific system prompt for model B (overrides shared prompt if set) | |
| max_tokens | INT | 5121–32768 | — |
| temperature | FLOAT | 0.700–2 | — |
| top_p | FLOAT | 0.900.05–1 | — |
| n_gpu_layers | INT | 0-1–200 | — |
| n_ctx | INT | 4096512–131072 | — |
| max_turnsopt | INT | 120–200 | — |
| summarize_old_historyopt | BOOLEAN | true | — |
| summary_chunk_turnsopt | INT | 31–50 | — |
| max_tokens_summaryopt | INT | 12816–2048 | — |
| summary_max_charsopt | INT | 1500200–20000 | — |
| dynamic_max_tokensopt | BOOLEAN | true | — |
| min_generation_tokensopt | INT | 961–4096 | — |
| safety_margin_tokensopt | INT | 640–2048 | — |
| persistent_cacheopt | COMBO | off | Persistent cache backend. LlamaDiskCache stores cache data under separate cache directories for each session id. |
| runtime_cacheopt | COMBO | LlamaTrieCache | 4 options: KV_cache, LlamaRAMCache, LlamaTrieCache, off |
| repeat_penaltyopt | FLOAT | 1.121–2 | — |
| repeat_last_nopt | INT | 2560–4096 | — |
| rewrite_continueopt | BOOLEAN | true | — |
| log_levelopt | COMBO | timing | 3 options: minimal, timing, debug |
| suppress_backend_logsopt | BOOLEAN | true | — |
| history_diropt | STRING | Optional history directory. Empty => output/llm_session_sessions/. Disk caches are also stored there, separated by session id. | |
| reset_sessionopt | BOOLEAN | false | If true, resets both {id}_A and {id}_B histories (transcript file is not deleted). Session disk caches are kept. |
| stream_to_consoleopt | BOOLEAN | false | Stream tokens to console while generating. |
| enable_thinkingopt | BOOLEAN | false | Enable model thinking/reasoning output for supported chat formats. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| transcript_text | STRING | — |