ComfyUI Node

Local LLM

Answers a prompt with a local language model: a GGUF file from models/LLM (or from LM Studio, the Hugging Face cache, llama.cpp or GPT4All) run by llama.cpp just for this call, or a model of a running app (LM Studio, Ollama, llama.cpp, vLLM, Jan, KoboldCpp, ...). Works anywhere a STRING is needed; Plenio's Write Song uses it when its writer model is one of these. Press R to refresh the list.

By jplenio·Created 17 days ago·Updated about 19 hours ago· 40
Local LLM
    • text
    • thinking
    ◄prompt►
    ◄model▾►
    ◄seed0►
    ◄max_tokens6144►
    ◄temperature0.80►
    ◄thinkingfalse►
    ◄context12288►
    ◄keep_loadedfalse►
    ◄system_prompt►
    ◄reuse_answerstrue►
    ◄schema—►
    CategoryPlenio/Text

    Inputs (11)

    NameTypeDefaultDescription
    promptSTRINGThe request (connect Compose Writing Prompt, or type).
    modelCOMBO'models/LLM · file.gguf' and other '... files' / 'HF cache' entries are GGUF files, run by llama.cpp for the call; 'LM Studio · ...', 'Ollama · ...' are models of a running app.
    seedINT00–18446744073709550000Same seed, same prompt, same settings: the same answer - taken from Plenio's answer cache without asking the model again (see reuse_answers). Change it for a new answer.
    max_tokensINT614416–131072Longest answer in tokens; a cut-off answer stops the run with a message.
    temperatureFLOAT0.800–20 = always the most likely words; higher = more varied.
    thinkingBOOLEANfalseLet a reasoning model think first (Qwen, Gemma, DeepSeek ...); the thoughts come out separately. Slower; needs more max tokens.
    contextINT122881024–262144Context length in tokens (prompt + answer) for GGUF files and Ollama. Other apps use the length set in the app.
    keep_loadedBOOLEANfalseOff: the model's memory is freed after the answer, so ComfyUI's models have the GPU. On: the model stays loaded for the next run (faster, needs the memory for both).
    system_promptSTRINGOptional standing instructions sent before the prompt.
    reuse_answersoptBOOLEANtrueOn: a request answered before (same model file or app model, prompt, seed and settings) is answered from Plenio's answer cache (user/plenio/cache/llm) - no call, also after a restart or when an earlier node ran again. Off: always ask the model.
    schemaoptSTRINGOptional JSON schema of the answer (Compose Arrangement provides one): GGUF files, LM Studio, Ollama and vLLM are held to it while they write, so the answer always has that format. Apps without this feature answer freely.

    Outputs (2)

    NameTypeDescription
    textSTRINGThe answer (thoughts removed).
    thinkingSTRINGThe model's thoughts, if it shared any.