comfyui_vidu_api/推荐提示词
Free prompt ideas for your Vidu clips, one image at a time
- 图像
- 格式化提示词
The odd one out in this pack: ViduPromptRecommender doesn't make a video at all. It makes ideas. You feed it one image, it asks Vidu's API to suggest video prompts and effect templates that would work well with that image, and it hands you back a nicely formatted block of text. Think of it as the "I have the shot but my prompt brain is empty" node.
The recommended-prompt feature is a real Vidu API endpoint (/ent/v2/img2video-prompt-recommendation), and the node just front-ends it. It's useful in exactly the workflow the pack's README describes - getting inspiration for what to do with an image before you commit to paying for an actual generation. Given that every generation in this pack costs real money per call, a free advice step before the paid step is a legitimately sensible addition.
How it works. Uploads your image through the same presigned upload flow as the generation nodes, calls the recommendation endpoint with your 推荐类型 and 数量, then formats the response into one big string. The formatting is where the value is: it splits the results into 特效模板 (effect templates) and 图生视频 (image-to-video prompts), and for each template it prints the template name, recommended resolution, and a 专用Prompt line you can copy straight into a generation node. Then it labels the sections with emoji headers and hands the whole thing over as a single output.
Inputs that matter:
- 图像 - the one required input. One image, that's it.
- 推荐类型 - 特效和图生视频 (both), 仅特效 (templates only), or 仅图生视频 (prompts only). "Both" is the sensible default.
- 数量 - 1 to 10 suggestions, default 5.
- 分辨率 - a dropdown with exactly one choice,
360p. The recommendation feature is 360p-only on Vidu's side; that's the API's limit, not a bug.
The output. One STRING, named 格式化提示词 (formatted prompts). You read it, or you wire it straight into the 提示词 input of ViduText2Video or ViduImage2Video - those are STRING inputs, so the wiring works. The recommended prompt for a template is designed to be copy-paste ready for Vidu's generation endpoints, which is the whole trick: Vidu's templates and prompt style have their own idioms, and this node hands you prompts already in that dialect instead of making you learn it the hard way.
Install - pack-standard, and yes, it needs the API key too even though it never downloads a video:
cd ComfyUI/custom_nodes
git clone https://github.com/josephxie1/comfyui_vidu_api_node
# restart, then create api.json beside the nodes:
# { "api_key": "vda_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }
Key from platform.vidu.cn; ComfyUI Manager search comfyui_vidu_api_node works. Only dependency is requests.
Where people get burned. Two things. First, the error-handling quirk of this pack: if the recommendation call fails, the node returns the error text as its output string - so a "格式化提示词" output full of 错误: ... is the failure mode, and the [Vidu::ViduPromptRecommender] console logs have the real reason. Second, remember this still sends your image to Vidu's servers - a prompt-recommendation request is a cloud call like any other, just a cheaper one. And a mild reality check: the suggestions are Vidu's, so they tend to be broad and commercial (this is a product feature, not a writing muse). Great for unblocking a scene; don't expect it to know your project's lore.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| 图像 | IMAGE | — | |
| 推荐类型 | COMBO | 3 options: 特效和图生视频, 仅特效, 仅图生视频 | |
| API地址opt | STRING | https://api.vidu.cn | — |
| 数量opt | INT | 51–10 | — |
| 分辨率opt | COMBO | 1 options: 360p |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 格式化提示词 | STRING | — |