Nodes/ComfyUI-Easy-Media/MultiTrack Prompt Enhancer
ComfyUI Node

MultiTrack Prompt Enhancer

The LLM-powered prompt expander that knows your video and your timeline

By yolain·Created 3 months ago·Updated about 17 hours ago· 158
MultiTrack Prompt Enhancer
  • api_account
  • images
  • audio
  • video
  • files
  • llama_model
  • PROMPT
  • TASK_ID
  • FILE_IDS
system_prompt
user_prompt
typet2v
length124
model
seed0
enabledtrue

A bare "man walks through a market" prompt gets you a bland 5-second clip. MultiTrack Prompt Enhancer is the pack's answer: it takes the sparse prompt that came out of a MultiTrack task segment and expands it into something a video model can actually work with - and because it's plugged into the multitrack, it can look at your images, audio, and video while it writes. It's the "connect an LLM for prompt expansion" step the MultiTrack editor's own README points you at.

Three ways to enhance

The model dropdown picks the provider, and the node supports three fundamentally different backends:

  1. MiniMax H3-Context-IR - the native option. Media (images, audio, video) is uploaded to MiniMax, and the prompt is expanded in the H3 context. This is the one that returns TASK_ID and FILE_IDS, since it's talking to a real API with file handles.
  2. A configured third-party multimodal LLM - bring your own provider through the pack's API account management (api_account widget, which is status/balance display, not a prompt control). Media gets sent as images (capped at 2 megapixels) or resized frames.
  3. A local llama.cpp model - the llama_model input, evaluated only when the local provider is selected. This is the privacy-friendly path, and it needs the ComfyUI-llama-cpp_vlm package (llama_cpp_instruct_adv).

The inputs that matter: system_prompt and user_prompt (wire these from MultiTrack Task Output - the whole point is those per-segment prompts flow straight in), type (t2v/i2v/r2v - selects which H3 variant and how media roles get assembled), length (frames, aligned to MiniMax; it converts to 4–15 integer seconds), and seed. The enabled boolean is the escape hatch: switch it off and the node passes user_prompt through untouched without calling any model - genuinely useful for A/B testing prompt expansion vs. raw prompts.

What comes out

  • PROMPT - the enhanced prompt (STRING).
  • TASK_ID - MiniMax task ID, empty for every other provider.
  • FILE_IDS - comma-separated MiniMax file IDs for uploaded media, empty when nothing was uploaded.

So for H3 you get an audit trail of what was sent; for local or third-party models, only the PROMPT matters.

Install and the practical stuff

It's part of ComfyUI-Easy-Media:

cd ComfyUI/custom_nodes
git clone https://github.com/yolain/ComfyUI-Easy-Media.git

restart ComfyUI (ComfyUI Manager works too, search "Easy-Media"). FFmpeg system-wide for the pack, and note that this node is where the heavy optional deps live: the local path needs llama.cpp VLM support, and the H3 path needs an account with MiniMax (and remember the H3 community license geography restrictions if you're downloading weights locally).

Where people get burned

People assume enabled=true means it always improves the prompt - it doesn't, and the LLM can happily hallucinate specifics your clip can't support. Watch type: set it wrong (say, t2v when your segment has a reference image) and the media roles get assembled incorrectly. And the local llama.cpp path has a habit of looking like it's running while actually failing to load the vision model - check the console for llama_cpp_instruct_adv errors before blaming the node. For one-off sanity checks, keep enabled off, run once, then turn it on and compare - you'll learn more in five minutes than from a day of guesswork.

CategoryEasyUse/MultiTrackEditor

Inputs (13)

NameTypeDefaultDescription
system_promptSTRINGOptional system instructions from MultiTrack Task Output.
user_promptSTRINGOptional user prompt from MultiTrack Task Output.
typeSTRINGt2vTask type used to select H3 t2va, i2va, or r2va and assemble provider-specific media roles.
lengthINT1241–2147483647MiniMax-aligned frame length; converted back to 4–15 integer seconds.
modelCOMBOProvider and model used to enhance the prompt.
seedINT00–18446744073709550000ComfyUI generation seed; used by compatible third-party LLM APIs.
enabledBOOLEANtrueEnhance the prompt when enabled. When disabled, return user_prompt unchanged without calling the selected model.
api_accountEASY_API_ACCOUNTProvider balance and API key management. This widget is for account status only and does not affect prompt enhancement.
imagesoptIMAGEOptional image, batch, or list. H3 uploads each selected image; third-party inputs are limited to 2 megapixels.
audiooptAUDIOOptional H3 r2va audio input or list. Audio is uploaded to MiniMax and omitted for third-party models.
videooptVIDEOOptional video input or list. A supported public video URL or local video data is sent natively when the provider accepts it; otherwise up to 24 resized frames are sent per video. Native video uploads are limited to 15 seconds; RunningHub videos are additionally limited to 10MB.
filesopt*Reserved file input for a future provider implementation.
llama_modeloptLLAMACPPMODELLocal llama.cpp model input; evaluated only when the local provider is selected. Requires llama_cpp_instruct_adv from https://github.com/lihaoyun6/ComfyUI-llama-cpp_vlm.

Outputs (3)

NameTypeDescription
PROMPTSTRINGEnhanced video prompt.
TASK_IDSTRINGMiniMax task ID; empty for all other providers.
FILE_IDSSTRINGComma-separated MiniMax file IDs for uploaded images, videos, and audio; empty when no media was uploaded.