Nodes/comfyui-llamacpp/llama.cpp Basic Prompt
ComfyUI Node

llama.cpp Basic Prompt

Runs local text generation through llama-server with sampling, reasoning, and workflow-chaining controls.

By Setmaster·Created 7 months ago·Updated about a month ago· 4
llama.cpp Basic Prompt
  • trigger
  • connection
  • response
  • thinking
  • success
prompt
model(use running model)
server_url
system_prompt
enable_thinkingtrue
max_tokens2048
temperature0.70
top_p0.90
top_k40
min_p0.05
repeat_penalty1.10
seed0
keep_contextfalse
enable_chainingfalse
presence_penalty0.0
frequency_penalty0.0
stop_sequences
api_key_envLLAMACPP_API_KEY
verify_tlstrue
request_timeout300
CategoryLlamaCpp

Inputs (22)

NameTypeDefaultDescription
promptSTRINGThe user prompt to send to the LLM
modeloptCOMBO(use running model)Model for router mode, or the running direct model.
server_urloptSTRINGLeave empty to use the server owned by this node pack. Attached endpoints are never implicitly stopped.
system_promptoptSTRINGSystem prompt that defines model behavior.
enable_thinkingoptBOOLEANtrueRequest thinking/reasoning from compatible models.
max_tokensoptINT20481–131072Maximum number of tokens to generate.
temperatureoptFLOAT0.700–2Sampling randomness. Lower values are more deterministic.
top_poptFLOAT0.900–1Keep tokens within this cumulative probability mass.
top_koptINT400–200Sample from the top K tokens. 0 disables top-k filtering.
min_poptFLOAT0.050–1Discard tokens below this probability relative to the best token.
repeat_penaltyoptFLOAT1.101–2Penalize recently repeated tokens. 1.0 disables the penalty.
seedoptINT00–2147483647Random seed
keep_contextoptBOOLEANfalseReuse a matching prompt-prefix KV cache. This is not chat history.
enable_chainingoptBOOLEANfalseCompatibility toggle. A connected trigger already controls ordering.
triggeropt*Optional dependency input used to sequence execution.
presence_penaltyoptFLOAT0.0-2–2Penalize tokens that have appeared at least once.
frequency_penaltyoptFLOAT0.0-2–2Penalize tokens in proportion to how often they appeared.
stop_sequencesoptSTRINGStop sequences. JSON arrays preserve commas and whitespace.
api_key_envoptSTRINGLLAMACPP_API_KEYEnvironment variable containing the API key. The secret is not serialized.
verify_tlsoptBOOLEANtrueVerify HTTPS certificates.
request_timeoutoptINT3001–86400Overall generation deadline in seconds.
connectionoptLLAMACPP_CONNECTIONOptional reusable local or remote connection profile.

Outputs (3)

NameTypeDescription
responseSTRINGGenerated response text.
thinkingSTRINGReasoning content reported separately by compatible models.
successBOOLEANWhether generation completed successfully.