Nodes/ComfyUI-WepeNerd/H3 Prompt Enhancer
ComfyUI Node

H3 Prompt Enhancer

A local LLM compiles them for you

By WepeNerd·Created 5 months ago·Updated about 17 hours ago· 0
H3 Prompt Enhancer
  • model
  • enhanced_prompt
prompt
modeAuto
taskAuto
action_detailAuto
enhancementSmart
duration_seconds0.00
reference_context
max_tokens2048
creative_freedomPreserve

Video prompting is where plain English dies. "A guy walks in and sits down" is fine for an image, but MiniMax H3-style video conditioning wants to know whether it's text-to-video, whether there's a reference image and what role it plays, who owns the camera, and which moments must survive contact with the sampler. H3 Prompt Enhancer is the shortcut: it runs a small local LLM whose whole job is compiling your rough idea into an H3-ready prompt, using the model's actual prompting guide as its system prompt. No API, no key, no subscription - the "Local AI" in its category name is doing real work.

It ships in ComfyUI-WepeNerd (author: WepeNerd), a one-pack grab-bag of video, image, 3D, and local-LLM nodes. The H3 node is one half of a paired workflow: Local AI Model picks the GGUF and hands it to this node via a GGUF_LLM_CONFIG socket, and this node hands a clean STRING prompt out the other side. It's a text tool, pure and simple - it never touches a diffusion or video sampler itself.

How it works

The magic lives in a bundled skill file, skills/H3_Skill.md - a researched "MiniMax H3 Prompt Enhancement Skill v2" that the pack reads in and uses as the model's system prompt. Its philosophy is the opposite of the old "add more adjectives" enhancers: it's ambiguity management. Don't maximize length. Figure out what H3 can't infer from its conditioning, describe only that, then compress. The skill is genuinely specific - Ref2V references get bound to roles ("picture → identity, video → motion"), FL2V treats first/last frames as literal anchors, and a whole section explains when to spell out visible mechanics instead of trusting a verb.

The node takes your prompt, prepends your settings as an authoritative header (H3 ENHANCER SETTINGS), and sends the lot to a locally spawned llama-server with conservative sampling - low temperature, reasoning_effort forced to none, and any <think> blocks stripped from the reply. You get back one clean prompt, not chat ramble. That decoding discipline is what separates this from a generic LLM node wired to a text encoder (llm-in-comfyui.md lays out exactly why dirty output ruins LLM-assisted prompting).

The inputs that matter

  • model - required, a GGUF_LLM_CONFIG from a Local AI Model node. No model, no output.
  • prompt - your rough idea, plain English, one line is fine.
  • mode - Auto (default) or the generation type: T2V, I2V, Ref2V, Ref2VA, FL2V, FL2VA (text/image/reference/first-last-frame-to-video, the A variants adding audio binding). Auto usually figures this out from your wording.
  • task - 14 entries from Auto and General through the useful ones: Precise Action, Camera Movement, Motion Transfer, Video Edit, Character Replace, Physics / VFX, Dialogue. Sets what the compiler prioritizes.
  • action_detail - Semantic keeps ordinary actions plain ("she sits down"); Detailed Visible Mechanics makes it spell out failure-prone interactions.
  • enhancement - Smart (default), Light (keeps your wording, fixes structure), or Strict (explicit binding for hard adherence). These are authoritative only when not Auto.

The one output, enhanced_prompt, is a plain string - wire it into whatever actually runs your H3 generation, API or local.

Installing it

The node installs as part of the whole pack, so it's one job:

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

Or search WepeNerd in ComfyUI Manager. The real gotcha: the pack does not bundle llama.cpp. You need a current llama-server build on its own - on PATH, via the LLAMA_SERVER_PATH env var, or pointed at directly in Local AI Model (Advanced). Then drop a text GGUF in ComfyUI/models/LLM/ (the README's example is an abliterated Qwen3 quant; an 8B is plenty for prompt rewriting if 27B is out of your VRAM budget). Restart ComfyUI and look under WepeNerd/Local AI.

Where people get burned

The #1 failure: you type a prompt, queue it, and nothing comes out - because you never connected a Local AI Model node, or it errors with "no Local AI models found." A .gguf sitting in your models folder can't run by itself. Next is "llama-server was not found," which is the install step above, not a bug. And expect the first run to feel slow: the defaults load the model, generate, then release it to keep VRAM free for your diffusion branch. If you're iterating on prompt wording, that load/unload churn is real - the Advanced path's keep-alive exists precisely for that. CUDA OOM? Smaller quant, smaller context, or fewer offloaded layers.

CategoryWepeNerd/Local AI

Inputs (10)

NameTypeDefaultDescription
modelGGUF_LLM_CONFIG
promptSTRING
modeCOMBOAuto7 options: Auto, T2V, I2V, Ref2V, Ref2VA, FL2V, +1
taskCOMBOAuto14 options: Auto, General, Precise Action, Camera Movement, Motion Transfer, Video Edit, +8
action_detailCOMBOAuto3 options: Auto, Semantic, Detailed Visible Mechanics
enhancementCOMBOSmart3 options: Smart, Light, Strict
duration_secondsoptFLOAT0.000–3600Effective generated clip duration. 0 = unspecified; use relative timing.
reference_contextoptSTRINGDescribe supplied references and their roles, using the workflow's actual aliases. The enhancer cannot see the media.
max_tokensoptINT2048128–32768Output budget. Increase for long reference prompts; must fit alongside instructions in the model context.
creative_freedomoptCOMBOPreservePreserve: clarify existing ideas. Fill in details: enrich an outline. Develop scenario: also add supporting beats and transitions. Explicit instructions and references always take priority.

Outputs (1)

NameTypeDescription
enhanced_promptSTRING