ComfyUI Node
LLM Text Generator
Generate text from any OpenAI-compatible server. Supports multiple reference images, videos and audio.
LLM Text Generator
- images
- videos
- video_audios
- audios
- text
- reasoning
◄config_select▾►
◄config_nameDefault►
◄base_urlhttp://127.0.0.1:8080►
◄api_keysk-no-key-required►
◄model_select▾►
◄model►
◄model_NoVision_select▾►
◄model_NoVision►
◄system_promptYou are a helpful AI assistant.►
◄user_promptDescribe this image or answer my question.►
◄temperature0.70►
◄top_k40►
◄seed-1►
◄context_length2048►
◄timeout180►
◄thinkingfalse►
◄think_start_tag<think>►
◄think_end_tag</think>►
◄clean_comfy_vram_before_genfalse►
◄unload_after_genfalse►
◄unload_endpoint/v1/models/unload►
◄llama_cpp_unloadfalse►
◄llama_endpoint/models/unload►
◄cache_prompttrue►
◄auto_lockfalse►
◄video_fps1.0►
◄max_video_frames-1►
◄enable_audiofalse►
◄use_lockedfalse►
◄locked_text►
◄locked_reasoning►
Categoryzyd232 Nodes/LLM
Inputs (35)
| Name | Type | Default | Description |
|---|---|---|---|
| config_select | COMBO | Choose a saved server preset | |
| config_name | STRING | Default | Name for this preset; illegal characters are removed automatically |
| base_url | STRING | http://127.0.0.1:8080 | AI service URL, e.g. Ollama or vLLM endpoint |
| api_key | STRING | sk-no-key-required | API key, or ENV:var_name to read from environment |
| model_select | COMBO | Dropdown to select a vision model. Selection will fill the 'model' field below. | |
| model | STRING | Vision model name (free input). Can be typed manually or selected from the dropdown above. | |
| model_NoVision_select | COMBO | Dropdown to select a text-only model. Selection will fill the 'model_NoVision' field below. | |
| model_NoVision | STRING | Text-only model name (free input). Used when no image/video/audio is provided. | |
| system_prompt | STRING | You are a helpful AI assistant. | System prompt that defines the AI's role and behavior |
| user_prompt | STRING | Describe this image or answer my question. | Your question or instruction for the AI |
| temperature | FLOAT | 0.700–2 | Randomness: higher is more creative, lower is more stable |
| top_k | INT | 401–100 | Pick next word from top K candidates |
| seed | INT | -1-1–18446744073709550000 | Random seed for reproducibility, -1 for random |
| context_length | INT | 2048-1–128000 | Context window size. Set to -1 or 0 to omit num_ctx/n_ctx and let the server use its default context length |
| timeout | INT | 1801–3600 | Timeout in seconds for the LLM generation request |
| thinking | BOOLEAN | false | Separate AI's thinking process from final answer |
| think_start_tag | STRING | <think> | Opening tag to mark the start of thinking content |
| think_end_tag | STRING | </think> | Closing tag to mark the end of thinking content |
| clean_comfy_vram_before_gen | BOOLEAN | false | Clear ComfyUI VRAM before generation to avoid OOM |
| unload_after_gen | BOOLEAN | false | Unload model after generation to free VRAM |
| unload_endpoint | STRING | /v1/models/unload | API endpoint path for unloading the model |
| llama_cpp_unload | BOOLEAN | false | Unload model via llama.cpp-specific endpoint |
| llama_endpoint | STRING | /models/unload | llama.cpp unload API endpoint path |
| cache_prompt | BOOLEAN | true | Cache prompts to speed up repeated requests |
| auto_lock | BOOLEAN | false | When enabled, the Streaming Text panel automatically locks the result once generation completes |
| video_fps | FLOAT | 1.00.1–30 | Sampling density per reference video. Assumes the source video is 24fps: keeps video_fps frames per 24 source frames (n = total * video_fps/24), then capped by max_video_frames. Default 1.0. |
| max_video_frames | INT | -1 | Maximum number of frames sent per video (to avoid exceeding context length). Set to -1 or 0 to disable the cap and send all frames. |
| enable_audio | BOOLEAN | false | Encode and send audio references to the API (only if the model supports audio) |
| use_locked | BOOLEAN | false | When true, skip LLM generation and return the locked result |
| locked_text | STRING | Locked final text returned when use_locked is true | |
| locked_reasoning | STRING | Locked reasoning text returned when use_locked is true | |
| imagesopt | COMFY_AUTOGROW_V3 | — | |
| videosopt | COMFY_AUTOGROW_V3 | — | |
| video_audiosopt | COMFY_AUTOGROW_V3 | — | |
| audiosopt | COMFY_AUTOGROW_V3 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| reasoning | STRING | — |