IF Video Prompts 🎥🧠
Make Qwen2.5-VL watch a video and write the prompt for you
- images
- sequence_description
- scene_breakdown
- preview_image
- negative_prompt
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
LoadVideooutput) or "Video File" (pick from yourinputfolder). 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.
Inputs (20)
| Name | Type | Default | Description |
|---|---|---|---|
| input_mode | COMBO | Frames | Select input mode: use pre-loaded frames or direct video file |
| model_name | COMBO | Qwen2.5-VL-3B-Instruct-AWQ | Select the Qwen2.5-VL model to use |
| profile | COMBO | HyVideoAnalyzer - Simple one line prompt | Select a profile with predefined system prompt and rules |
| max_new_tokens | INT | 5121–2048 | Maximum number of new tokens to generate |
| frame_sample_count | INT | 161–32 | Number of frames to sample from entire sequence |
| temperature | FLOAT | 0.700–2 | Higher values increase creativity but reduce coherence |
| analysis_type | COMBO | Full sequence | Type of analysis to perform on the video |
| language | COMBO | English | Language for the output |
| imagesopt | IMAGE | Input frames from a LoadVideo node | |
| video_fileopt | COMBO | Select a video file from the input directory | |
| fpsopt | FLOAT | 8.00.1–60 | Frames per second for video processing. Higher values sample more frames. |
| max_pixelsopt | INT | 2621440–921600 | Max pixels for video processing (0 = default) |
| fallback_frame_countopt | INT | 41–16 | Number of frames to use in fallback mode if initial processing fails. Lower values use less VRAM. |
| custom_system_promptopt | STRING | Custom system prompt to override the profile | |
| prefixopt | STRING | Text to add before the generated prompt | |
| suffixopt | STRING | Text to add after the generated prompt | |
| seedopt | INT | -1 | Random seed for generation (use -1 for random) |
| negative_promptopt | COMBO | None | Predefined negative prompt to use |
| model_offloadopt | COMBO | Yes | Offload model from GPU when not in use to save VRAM |
| precisionopt | COMBO | float16 | Model precision - lower precision uses less VRAM but may reduce quality |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| sequence_description | STRING | — |
| scene_breakdown | STRING | — |
| preview_image | IMAGE | — |
| negative_prompt | STRING | — |