Nodes/ComfyUI-Llama/LLM_Create_Completion Advanced
ComfyUI Node

LLM_Create_Completion Advanced

Call LLM Advanced, under a more literal name

By HairlessPrimate·Created 3 years ago·Updated 2 years ago· 71
LLM_Create_Completion Advanced
  • LLM
  • STRING
prompt
suffix
max_response_tokens16
temperature0.80
top_p0.95
min_p0.05
typical_p1.00
echofalse
frequency_penalty0.00
presence_penalty0.00
repeat_penalty1.10
top_k40
seed-1
tfs_z1.00
mirostat_mode0
mirostat_tau5.00
mirostat_eta0.10

Let's be upfront: this node is Call LLM Advanced wearing a different name. Compare the schemas and they're identical - same required LLM and prompt, same long list of optional sampling parameters (temperature, top_p, top_k, min_p, typical_p, repeat_penalty, frequency_penalty, presence_penalty, tfs_z, the whole mirostat_* family, echo, suffix, seed), same single STRING output. The only real difference is what it maps to under the hood: the name comes straight from llama-cpp-python's create_completion method, which is exactly the API this node wraps.

So why does it exist? Two reasons, both worth knowing. First, llama.cpp's own terminology - "completion" - is the more accurate name for what's happening: the model is completing text after your prompt, not having a conversation. Second, this pack was written by someone exposing llama-cpp-python's methods one-by-one as graph nodes, and create_completion got its own slot. It's an artifact of the pack's structure, not a distinct feature. If you can use Call LLM Advanced, you can use this node. If you can't tell them apart from the outside, you're not missing anything.

What you'd actually set

Given it's a duplicate, the practical guidance is the same as for its twin:

  • prompt - your entire one-shot instruction, multiline. No chat history, so say everything you need in one string.
  • temperature (0.8) - creativity dial.
  • top_p (0.95) / top_k (40) - the sampling constraints; mostly fine at defaults.
  • repeat_penalty (1.1) - raise it in small steps if output loops.
  • max_response_tokens (16) - the output cap. That default of 16 tokens is short - bump it to a few hundred for anything that needs a real answer.
  • seed (-1) - fix for reproducible output.

The output STRING has the same invisibility problem as the rest of the pack: wire it into ShowText from ComfyUI-Custom-Scripts to actually see it on the graph.

The disabled list applies here too

Because it wraps create_completion, it inherits that method's disabled arguments: stream, logprobs, stop, stopping_criteria, logits_processor, logits_bias, and grammar are all off. No streaming, no stopping sequences, no GBNF grammar constraints. That grammar gap is the one that actually stings for people coming from llama.cpp - you can't force JSON-shaped output. The pack's README lists it openly; don't hunt for the toggle.

Install and go

Same pack, same steps - Manager search "ComfyUI-Llama", or:

cd ComfyUI/custom_nodes
git clone https://github.com/daniel-lewis-ab/ComfyUI-Llama

plus pip install llama-cpp-python on manual installs. GGUF models into ComfyUI/custom_nodes/ComfyUI-Llama/models, restart ComfyUI, hard-refresh with Ctrl+F5. Nodes sit under the LLM menu.

Which one should you use - this or Call LLM Advanced? Practically: whichever you remember exists. If you're sharing workflows, the friendlier, less intimidating name is Call LLM Advanced, so default to that for readability. Use this one if you think in llama.cpp method names and want the graph to self-document the API it's calling. Both have the same one-shot limitation - the pack has no loopback, so neither one will ever carry on a dialogue.

CategoryLLM

Inputs (18)

NameTypeDefaultDescription
LLMLLM
promptSTRING
suffixoptSTRING
max_response_tokensoptINT16
temperatureoptFLOAT0.800–1
top_poptFLOAT0.95
min_poptFLOAT0.05
typical_poptFLOAT1.00
echooptBOOLEANfalse
frequency_penaltyoptFLOAT0.00
presence_penaltyoptFLOAT0.00
repeat_penaltyoptFLOAT1.10
top_koptINT40
seedoptINT-1
tfs_zoptFLOAT1.00
mirostat_modeoptINT0
mirostat_tauoptFLOAT5.00
mirostat_etaoptFLOAT0.10

Outputs (1)

NameTypeDescription
STRINGSTRING