Nodes/Trent Nodes/Ask Local LLM (GGUF)
ComfyUI Node

Ask Local LLM (GGUF)

A local LLM you can just ask things, right inside the graph — no Ollama, no key

By TrentHunter82·Created 9 months ago·Updated 3 days ago· 39
Ask Local LLM (GGUF)
  • images
  • response
  • history_json
  • info
prompt
system_promptYou are a helpful, direct assistant. Answer plainly and concisely. When asked to write a prompt for an image, video, or audio model, return only the prompt text itself unless asked otherwise.
gguf_model
mmprojauto
temperature0.70
reasoning_effortlow
seed0
max_tokens2048
input_text
history_json
base_url
ctx_size32768
port8735
free_vram_firstfalse
verbosefalse

Most "prompt enhancer" nodes only know how to be a prompt enhancer. Ask Local LLM is the opposite: it's the same local GGUF engine as the H3 Skill Promptor with the H3 contract ripped out, turned into a general-purpose chat node. Type a question, get an answer. Refine a prompt for any model, describe an attached image, brainstorm, summarize wired-in text - whatever you'd ask a frontier chat model, except this one runs on your card, offline, for free per call.

The LLM-in-the-graph pattern is older than this node and well-established, but what separates a good one from a toy is whether it keeps the VRAM cost sane and the output clean. This one does both by leaning on the shared server infrastructure from TrentNodes: it spawns (or attaches to) a managed llama-server and talks to it over OpenAI-compatible HTTP. No Ollama server to babysit, no separate process to configure.

The zero-reload trick

The defaults are identical to the H3 Skill Promptor's server spec field for field - port 8735, ctx 32768, mmproj auto-paired. The server manager only respawns when the spec changes, so if the promptor's Qwen3.8-27B is already resident, this node answers immediately, and vice versa. reasoning_effort is deliberately excluded from that comparison, so changing it never forces a reload. There's a real consequence here worth respecting: change ctx_size off the default and you force a cold respawn of a ~16 GB model. Leave it alone and the two nodes share one server like roommates.

What you set

  • prompt and system_prompt - the system prompt is the only steering the model gets, so put your role and format rules there ("return only the prompt text", "answer in three bullets"). Default is a sensible direct-assistant.
  • gguf_model / mmproj - from models/LLM; auto pairs the vision projector by filename prefix. Attach images and you're describing pictures, not just text.
  • reasoning_effort - low / medium / xhigh, each with its own thinking allowance on top of max_tokens, so a long think can't starve the visible reply.
  • seed - boring until it isn't: the node caches on identical inputs, so bumping the seed is how you get a different answer to the same prompt.

Three optional inputs earn their keep: input_text appends wired-in text under an INPUT TEXT header ("improve this prompt" flows wire straight in), history_json continues a previous conversation, and base_url points the whole thing at LM Studio, vLLM, or a llama-server you started by hand.

Multi-turn by wiring

The history_json output is the conversation as a readable JSON turn list. Wire it into another Ask Local LLM node's history_json input and you've got a follow-up with full context - which is how you'd build a chained critique-rewrite loop without any custom plumbing. Two guardrails keep that sane: history stays text-only (attached images become a [N image(s) were attached] note instead of re-sent base64, so chained turns don't balloon the context), and malformed history errors loudly rather than being silently dropped. The info output reports latency, token counts, and any warnings - worth a Show Text node if you're debugging.

Install

Same pack, same drill:

cd ComfyUI/custom_nodes
git clone https://github.com/TrentHunter82/TrentNodes.git
cd TrentNodes
pip install -r requirements.txt

or ComfyUI Manager → search "Trent Nodes" (if Manager flags it unsafe, that's the author's day-one repo-rename duplicate in the registry - the clone path works). Then drop a GGUF into ComfyUI/models/LLM - the tested pair is Qwen3.8-27B plus its mmproj from unsloth, but any current vision GGUF works. System prerequisite, once for the whole pack: a CUDA llama-server (llama.cpp ≥ b10450) on PATH, LLAMA_SERVER_BIN, or at ~/llama.cpp/build/bin/llama-server.

Where people get burned

  • Attaching images without a vision projector raises immediately: put the mmproj next to the model, or remove the image input.
  • Hitting the token limit mid-think returns an actionable error instead of an empty string - raise max_tokens or drop reasoning_effort.
  • Leaked <think> blocks get stripped and reported in info; unlike the promptor, markdown fences are kept here, because in a chat answer they're usually intentional code.

The honest caveat: an 8–27B local model isn't writing better English than a frontier API, and you should not expect it to. What it buys you is uncensored, offline, free, and wired directly into your graph - and for the "translate this idea into a structured prompt" job, that's the right trade.

CategoryTrent/VLM

Inputs (16)

NameTypeDefaultDescription
promptSTRINGWhat to ask. Plain language.
system_promptSTRINGYou are a helpful, direct assistant. Answer plainly and concisely. When asked to write a prompt for an image, video, or audio model, return only the prompt text itself unless asked otherwise.Who the model is for this call. Ignored widgets aside, this is the only steering the model gets - put format rules and role here.
gguf_modelCOMBOLLM .gguf from ComfyUI/models/LLM.
mmprojCOMBOautoVision projector. auto = pair by filename prefix (keeps the server spec identical to the H3 Skill Promptor's, so a resident server is reused with no reload). none = text-only.
temperatureFLOAT0.700–20.7 = Unsloth instruct default for Qwen3.8.
reasoning_effortCOMBOlowQwen3.8 thinking budget (chat_template_kwargs). The template accepts ONLY low/medium/xhigh.
seedINT00–18446744073709550000Bump for a different answer to the same prompt (the node caches on identical inputs).
max_tokensINT204864–16384Budget for the visible reply. Thinking gets its own capped allowance on top (low +2048, medium +3072, xhigh +7168), so it cannot starve the reply.
imagesoptIMAGEOptional pictures to ask about (Image 1..N in batch order). Needs an mmproj vision projector.
input_textoptSTRINGWired-in text (a prompt to improve, a caption, a file). Appended to your prompt under an INPUT TEXT header.
history_jsonoptSTRINGWire another Ask Local LLM node's history output here to continue that conversation.
base_urloptSTRINGAttach to a running OpenAI-compatible server instead of spawning one (e.g. http://127.0.0.1:8735). Empty = managed server.
ctx_sizeoptINT327684096–262144Keep at the default to share the resident server with the H3 nodes - a different value forces a cold respawn.
portoptINT87351024–65535
free_vram_firstoptBOOLEANfalseUnload ComfyUI models before spawning the server.
verboseoptBOOLEANfalseMirror the info lines to the ComfyUI console as they happen, and dump the full payloads: system prompt, user message, model thinking, raw reply.

Outputs (3)

NameTypeDescription
responseSTRING
history_jsonSTRING
infoSTRING