Nodes/ComfyUI-WepeNerd/Local AI Generate
ComfyUI Node

Local AI Generate

A raw local LLM call, right inside your graph

By WepeNerd·Created 5 months ago·Updated about 17 hours ago· 0
Local AI Generate
  • config
  • image
  • generated_text
prompt
system_prompt
max_tokens512
temperature0.70
top_p0.95
top_k40
repetition_penalty1.05
seed0
reasoning_effort
sampling_preset
min_p0.00
presence_penalty0.00
frequency_penalty0.00
image_max_edge1024
jpeg_quality90

Local AI Generate is the unfiltered text generator of the WepeNerd pack: a raw chat-completion call to your local llama-server, with optional image input that turns it into a vision-language call. The enhancer and captioner nodes are specialized wrappers around this same machinery - this is the one you use when the job doesn't fit a preset, like writing dialogue for a video, generating a JSON blob for a downstream node, or asking a question and feeding the answer into something else.

Inputs: config (the GGUF_LLM_CONFIG from Local AI Model (Advanced)), prompt, system_prompt, then the full sampler panel - max_tokens, temperature, top_p, top_k, repetition_penalty, seed, min_p, presence_penalty, frequency_penalty, plus reasoning_effort and a sampling_preset. image_max_edge and jpeg_quality only matter when you connect the optional image input.

Two inputs do most of the work for a beginner:

  • sampling_preset - custom hands you full control, but the two Qwen presets are the smart defaults: qwen_non_thinking sets temperature 0.7 / top-p 0.8 / top-k 20 with reasoning off, and qwen_thinking raises top-p to 0.95 and reasoning to high. If you're running a Qwen GGUF (the README's reference model is a Qwen), start with these instead of hand-rolling samplers.
  • reasoning_effort - none by default. Set it higher and the model deliberates before answering, which costs tokens and, for a prompt-rewriting job, is usually worse. This is the QwQ-class trap the KB warns about: a reasoner spends tokens thinking and leaks its scratch-work into output. The pack strips <think>...</think> blocks and never returns hidden reasoning_content, so you won't see the scratch - but you also pay for it.

The one structural constraint: max_tokens must be smaller than context_size from the config, with headroom for prompt and media tokens. The node validates this and errors with a clear message if not. And if you connect image, the config must have an mmproj projector selected - otherwise the node rejects the request before it starts, because a text-only model can't see the picture. Images are downscaled to image_max_edge (1024 default) and JPEG-encoded, same as the captioners.

Output is one generated_text string. Wire it to a Show Text / preview node to read it, or feed it anywhere the graph wants text. Because release_after_generate defaults to true in the config, each run spins the server up and tears it down - fine for occasional calls, and if you're chaining many consecutive generations, flip that flag off in the config node and watch the VRAM caveat from the config article.

Install as with the rest of the pack: ComfyUI Manager, search WepeNerd, or git clone https://github.com/WepeNerd/ComfyUI-WepeNerd.git into custom_nodes + pip install -r requirements.txt, restart. The model lives in ComfyUI/models/LLM, and llama-server must be a real executable on PATH - the pack refuses to guess there.

CategoryWepeNerd/Local AI/Advanced

Inputs (17)

NameTypeDefaultDescription
configGGUF_LLM_CONFIG
promptSTRING
system_promptSTRING
max_tokensINT5121–32768
temperatureFLOAT0.700–2
top_pFLOAT0.950–1
top_kINT400–1000
repetition_penaltyFLOAT1.050–5
seedINT00–18446744073709550000
reasoning_effortCOMBO5 options: default, none, low, medium, high
sampling_presetCOMBO3 options: custom, qwen_non_thinking, qwen_thinking
min_pFLOAT0.000–1
presence_penaltyFLOAT0.00-2–2
frequency_penaltyFLOAT0.00-2–2
image_max_edgeINT102464–4096
jpeg_qualityINT901–100
imageoptIMAGE

Outputs (1)

NameTypeDescription
generated_textSTRING