Nodes/IF_VideoPrompts/IF Video Prompts 🎥🧠
ComfyUI Node

IF Video Prompts 🎥🧠

Make Qwen2.5-VL watch a video and write the prompt for you

By if-ai·Created about a year ago·Updated about a year ago· 57
IF Video Prompts 🎥🧠
  • images
  • sequence_description
  • scene_breakdown
  • preview_image
  • negative_prompt
input_modeFrames
model_nameQwen2.5-VL-3B-Instruct-AWQ
profileHyVideoAnalyzer - Simple one line prompt
max_new_tokens512
frame_sample_count16
temperature0.70
analysis_typeFull sequence
languageEnglish
video_file
fps8.0
max_pixels262144
fallback_frame_count4
custom_system_prompt
prefix
suffix
seed-1
negative_promptNone
model_offloadYes
precisionfloat16

Writing a good Wan or Hunyuan prompt is half the battle in local video gen, and it's the half that makes you feel like you're describing a dream from memory. IF Video Prompts (VideoPromptNode) is the shortcut: it feeds a real video - either frames you've loaded or an mp4 file - to Alibaba's Qwen2.5-VL vision model, and gets back a ready-to-use descriptive prompt, a scene breakdown, and a matching negative prompt. It's from Impact Frames, the YouTube channel that's been shipping LLM-based prompt-maker nodes since 2024, so it sits comfortably in the same lineage as their other IF tools.

How it works

The node runs Qwen2.5-VL locally through Hugging Face transformers - no API, no key. You pick a model (3B or 7B, plain or AWQ-quantized), and on the first run it downloads from Hugging Face, which means a multi-GB initial load and a VRAM bill for inference. Give it frames and it samples up to frame_sample_count of them (default 16, capped at 32), assembles them into one chat message, and generates a description. Give it a video_file instead and it decodes the video itself via qwen_vl_utils, honoring your fps and max_pixels. If inference blows up on the full frame set, it silently retries with fallback_frame_count frames (default 4) before giving up.

The inputs that actually matter

  • input_mode - "Frames" (wire in a VideoHelperSuite LoadVideo output) or "Video File" (pick from your input folder). Frames mode is more flexible; file mode is what the author recommends when things get glitchy.
  • model_name - defaults to Qwen2.5-VL-3B-Instruct-AWQ. The AWQ 3B is the sensible default on consumer GPUs; step up to 7B or non-quantized only if you have headroom.
  • profile - preset system prompts. The default "HyVideoAnalyzer" spits out a single one-line prompt capped at 77 tokens and 20-30 keywords, which is tuned for HyVideo/Hunyuan-style pipelines. "Narrative VideoFlow Analyzer" gives a looser storytelling description.
  • analysis_type - Full sequence, Key scenes, or Single summary.
  • custom_system_prompt - override any profile with your own instructions. Presets live in presets/profiles.json, so you can edit them to death.

Everything else is comfort dials: temperature, max_new_tokens, language (English/Chinese), precision (float16 default, bfloat16 if your card supports it), and model_offload - keep "Yes" so the model frees VRAM after each run.

What comes out

Four outputs: sequence_description (the prompt - feed it into your video model's text encoder, e.g. Wan 2.1/2.2 or HyVideo), scene_breakdown (the same text chunked into scenes with the frame indices used, handy for reviewing what the model actually saw), preview_image (a montage of up to 9 sampled frames so you can sanity-check), and negative_prompt - pick "WAN_neg" or "VidNeg" from the dropdown and it hands you a prebuilt negative string to wire into your sampler.

Installing it

ComfyUI Manager will find it if you search "IF_VideoPrompts". Or the manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/if-ai/ComfyUI-IF_VideoPrompts
cd ComfyUI-IF_VideoPrompts
python install.py

Then restart ComfyUI. Note the README's clone URL is copy-pasted wrong (yourusername), so use the real one above. The killer requirement: transformers >= 4.49.0 - anything older throws immediately. That's also where people get burned.

Common issues

The classic is autoawq (needed for the AWQ models) downgrading your transformers on install, which breaks everything. The README's fix is blunt but works: uninstall both, pip install transformers==4.49.0, then pip install --no-deps autoawq==0.2.8. The install.py script tries to handle this dance for you.

Second classic: "Image features and image tokens do not match." The README's advice is to switch to Video File mode, drop frame_sample_count (that's what fallback_frame_count is for), or use an AWQ model. There's also the usual ComfyUI dependency-hell tax - this pack pulls in moviepy, opencv, decord, av, and qwen-vl-utils, so a fresh portable install is often the cleanest recovery. It's a genuinely useful node, but it's a heavyweight: budget for the model download and a few minutes of dependency roulette before the first clean run.

CategoryImpactFrames💥🎞️/LLM

Inputs (20)

NameTypeDefaultDescription
input_modeCOMBOFramesSelect input mode: use pre-loaded frames or direct video file
model_nameCOMBOQwen2.5-VL-3B-Instruct-AWQSelect the Qwen2.5-VL model to use
profileCOMBOHyVideoAnalyzer - Simple one line promptSelect a profile with predefined system prompt and rules
max_new_tokensINT5121–2048Maximum number of new tokens to generate
frame_sample_countINT161–32Number of frames to sample from entire sequence
temperatureFLOAT0.700–2Higher values increase creativity but reduce coherence
analysis_typeCOMBOFull sequenceType of analysis to perform on the video
languageCOMBOEnglishLanguage for the output
imagesoptIMAGEInput frames from a LoadVideo node
video_fileoptCOMBOSelect a video file from the input directory
fpsoptFLOAT8.00.1–60Frames per second for video processing. Higher values sample more frames.
max_pixelsoptINT2621440–921600Max pixels for video processing (0 = default)
fallback_frame_countoptINT41–16Number of frames to use in fallback mode if initial processing fails. Lower values use less VRAM.
custom_system_promptoptSTRINGCustom system prompt to override the profile
prefixoptSTRINGText to add before the generated prompt
suffixoptSTRINGText to add after the generated prompt
seedoptINT-1Random seed for generation (use -1 for random)
negative_promptoptCOMBONonePredefined negative prompt to use
model_offloadoptCOMBOYesOffload model from GPU when not in use to save VRAM
precisionoptCOMBOfloat16Model precision - lower precision uses less VRAM but may reduce quality

Outputs (4)

NameTypeDescription
sequence_descriptionSTRING
scene_breakdownSTRING
preview_imageIMAGE
negative_promptSTRING