Qwen Video Prompt Reversal
Reverse a video back into a prompt, without running a 235B model locally
- video
- images
- prompt
- frames
The name overpromises, the node mostly delivers
Qwen Video Prompt Reversal is the flagship of the ComfyUI-QwenVideo pack, and it does something people ask for constantly: you feed it a video, it hands you back a text prompt that describes that video well enough to feed to an image or video generator. "Reverse" is doing a lot of work there - you're not recovering the exact prompt someone used, because that doesn't survive generation. What you get is a good new prompt: a vision-language model looks at sampled frames and writes the kind of natural-language description that modern LLM-encoder models (Wan, LTX, Z-Image, the whole 2026 generation) actually respond to. That's the honest framing. It's a captioner for video, and captioners are exactly as useful as the prompt vocabulary they're trained to output.
The name is a lie in one specific way you'll love: nothing runs on your GPU. The node calls Alibaba's Qwen3-VL 235B over OpenRouter's API. Your 8GB card does nothing but extract frames. No model download, no VRAM budget, just a paid API call.
How it works
The mechanism is three steps, and it's worth knowing because every failure mode lives in one of them:
- Frame extraction. It shells out to
ffmpegto grab frames at even intervals - the code computesduration / (num_frames + 1)and pulls one frame per interval, saved as JPEG at quality level 2. Yournum_framescount is literally how many JPEGs get sent up. - Vision call. Each frame is base64-encoded and posted to
https://openrouter.ai/api/v1/chat/completionswith a system prompt ("You are an expert video analyst and prompt engineer...") plus one of the preset analysis instructions. - Parse and hand back. It pulls
choices[0].message.contentout of the JSON and returns it, plus the extracted frames as an IMAGE tensor so you can eyeball what the model actually saw.
Two input paths: the video input accepts a ComfyUI VIDEO type (from Load Video or the Kling nodes), which it saves to ComfyUI/temp/qwen_video_cache/ and processes; or skip video entirely and feed the images input an IMAGE tensor for direct still-image analysis.
The inputs that matter
analysis_mode- the dropdown that changes everything.detailed_prompt(the default) asks for a comprehensive generation-ready prompt covering subject, style, composition, mood.simple_promptgives a 1-2 sentence summary.technical_detailsfocuses on camera work, lighting, color grading.scene_descriptionproduces a chronological narrative.customsends whatever you type intocustom_instruction- the interesting one, since you can bolt on your own captioning philosophy instead of the built-ins.num_frames- default 6, min 2, max 30. The README recommends 4-8 for quality/speed, and that's right: every frame costs latency and tokens, and six stills usually captures a 5-10 second clip.api_key- your OpenRouter key (sk-or-v1-...). See the warning below, this one matters.video/images- connect one. If neither is connected you get "No input provided!"
Outputs: prompt (STRING) and frames (IMAGE). Wire the prompt into any text input - a Load Prompt node, a text encoder, or this pack's own Show Qwen Prompt for display.
The API key is a genuine gotcha
The node ships with a real-looking OpenRouter key baked in as the default - the code literally initializes self.api_key with an sk-or-v1- string. The README calls this a "default embedded key (limited usage, not recommended for production)." Paste your own key, and don't leave this node's key in workflows you share.
Also: this is a paid, online tool. ~15-25 seconds per 6-frame request, OpenRouter bills per token, and no internet means no results. If you want a fully local video captioner this isn't it - this is the "don't want to run a 235B model" trade.
Install
ComfyUI Manager (search "QwenVideo"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/eddyhhlure1Eddy/ComfyUI-QwenVideo.git
cd ComfyUI-QwenVideo
pip install -r requirements.txt
That's requests, Pillow, torch, numpy - nothing exotic. The real dependency is FFmpeg in your PATH; the installer checks for it, and "no frames extracted" almost always means ffmpeg isn't reachable. ffmpeg -version in a terminal to verify.
Where people get burned
The README's troubleshooting is honest and matches the code: video file not found (use a Load Video node or drop files in ComfyUI/input), API request failed (bad key, no credits, no network), "Unsupported video input type" (you connected a string path or IMAGE where it wanted VIDEO). And one thing the README undersells: a 10-second clip at 30fps is three hundred frames of motion compressed into six stills. Fast-moving video comes back generic - the node describes what's in the frames, and if the action isn't there, the prompt won't have it either. Sample more frames for busy footage, or accept that video-to-prompt is still-image description with extra steps. Genuinely useful shortcut; just don't expect it to read the director's intent.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | 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 | — |
| num_frames | INT | 62–30 | — |
| analysis_mode | COMBO | detailed_prompt | 5 options: detailed_prompt, simple_prompt, technical_details, scene_description, custom |
| videoopt | VIDEO | Input video for frame extraction and analysis | |
| imagesopt | IMAGE | Input images for direct analysis (alternative to video) | |
| custom_instructionopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| frames | IMAGE | — |