Cinematic Kling
Generates a 5-second cinematic video by combining:
- - A character (person/model)
- An item (product, object, prop)
- A location (background, environment)
Internally creates a Character Sheet and Item Sheet, then feeds them into Kling for video generation.
Deployment
- - Deployment ID: INLINECODE0
- API: INLINECODE1
- Auth: INLINECODE2
Inputs
| Field | Type | Description |
|---|
| INLINECODE3 | URL | Public image URL of the character/person |
| INLINECODE4 |
URL | Public image URL of the item/product |
|
location_base | URL | Public image URL of the location/environment |
|
character_sheet_prompt | String | Character sheet prompt —
only modify the [brackets] |
|
video_prompt | String | Simple description of the 5-second scene |
|
input_seed | Integer |
-1 for random, fixed number for reproducible results |
Character Sheet Prompt Structure
The prompt has two parts — only the [brackets] part changes:
CODEBLOCK0
Rule: Replace [CLOTHING DESCRIPTION HERE] with the outfit appropriate for the scene. Everything before the brackets stays exactly as-is.
Examples:
- - INLINECODE13
- INLINECODE14
- INLINECODE15
Video Prompt Guidelines
- - Keep it simple — describe the action/interaction, not every detail
- Mention character + item + location implicitly through the action
- You can suggest 1-2 camera cuts within the 5 seconds
- Works for: ads, short films, music videos, product demos, action clips
Good examples:
- - INLINECODE16
- INLINECODE17
- INLINECODE18
Bad (too detailed):
Step 0 — Verify Which Image Is Which (MANDATORY)
ALWAYS use the image tool to identify each file before assigning roles. Never assume by order.
CODEBLOCK1
Then assign:
- -
character_base = the person/model - INLINECODE22 = the product/object they interact with
- INLINECODE23 = the place/environment/background
Step 1 — Upload Images to ComfyDeploy Storage
ALWAYS upload local files to ComfyDeploy's own storage first. NEVER use external/custom domains.
CODEBLOCK2
Step 2 — Submit Run
CODEBLOCK3
Polling for Results
CODEBLOCK4
Step 3 — Poll & Download Results
CODEBLOCK5
Step 4 — Send Results as Files
ALWAYS send as file attachments using filePath — NEVER send raw URLs.
CODEBLOCK6
Output Structure
| Node | File | Action |
|---|
| 4 | INLINECODE24 | Send as file (Character Sheet) |
| 14 |
ITEM_00001_.png | Send as file (Item Sheet) |
| 25 |
LOCATION_00001_.png | Send as file (Location Sheet) |
| 22 |
ComfyUI_00001_.mp4 |
Send as file — main output |
| 38 | text | Internal video prompt used by Kling (ignore) |
Python Helper
CODEBLOCK7
Typical Run Time
~3–5 minutes (character sheet generation + Kling video generation)
Use Cases
- - Product ads: character using/wearing the item in a branded location
- Short films: character interacting with a prop in a cinematic environment
- Music videos: artist + instrument/prop + stage/location
- Fashion: model wearing clothing item in a specific setting
- Gaming/dystopian: character in Last-of-Us style with game item in post-apocalyptic location
Notes
- - The
character_sheet_prompt fixed portion must never be modified — only the INLINECODE29 - INLINECODE30 = random each time; set a fixed integer to reproduce results
- 5 seconds is the fixed video length
- Outputs come from ComfyDeploy's built-in S3 storage — no manual upload needed
Cinematic Kling
通过结合以下元素生成一段5秒的电影级视频:
- - 角色(人物/模特)
- 物品(产品、物件、道具)
- 地点(背景、环境)
内部创建角色表(Character Sheet)和物品表(Item Sheet),然后将其输入Kling进行视频生成。
部署
- - 部署ID: e5258667-dec2-438f-84d0-f22049692483
- API: POST https://api.comfydeploy.com/api/run/deployment/queue
- 认证: Authorization: Bearer $COMFYDEPLOYAPI_KEY
输入参数
| 字段 | 类型 | 描述 |
|---|
| characterbase | URL | 角色/人物的公开图片URL |
| itembase |
URL | 物品/产品的公开图片URL |
| location_base | URL | 地点/环境的公开图片URL |
| character
sheetprompt | 字符串 | 角色表提示词——
仅修改[括号]内的内容 |
| video_prompt | 字符串 | 5秒场景的简单描述 |
| input_seed | 整数 | -1表示随机,固定数字可复现结果 |
角色表提示词结构
提示词分为两部分——仅[括号]部分需要修改:
创建一张照片级真实的角色表。包含一张左对齐的特写肖像(肖像中必须可见服装),无边框,中性表情,同时包含一张展示角色正面、右侧面、左侧面和背面的全身视图。角色放置在白色背景上。不要包含任何文字。无边框,无柔和渐变。[此处填写服装描述]
规则: 将[此处填写服装描述]替换为适合场景的服装。括号之前的所有内容保持原样。
示例:
- - [他们穿着量身定制的黑色西装搭配白衬衫,不打领带,奢华编辑风格。]
- [他们穿着《最后生还者》风格的脏污破损衣物,反乌托邦美学。]
- [他们穿着红色耐克运动套装和白色运动鞋,运动风格。]
视频提示词指南
- - 保持简洁——描述动作/互动,而非每个细节
- 通过动作隐含地提及角色 + 物品 + 地点
- 可在5秒内建议1-2次镜头切换
- 适用于:广告、短片、音乐视频、产品演示、动作片段
优秀示例:
- - 角色穿着绿色沙克鞋在篮筐中扣篮的简短电影级片段。
- 角色走进沙漠地点,从沙中捡起物品,举向镜头。快速切换到物品特写。
- 产品展示:角色在城市地点转身,慢动作将物品抛向镜头。
不佳示例(过于详细):
- - ❌ 镜头从f/1.8光圈开始,黄金时刻光线角度47度,角色精确向前移动3步...
第0步——确认每张图片对应内容(必须执行)
始终使用image工具在分配角色前识别每个文件。切勿按顺序臆断。
image(images=[file1, file2, file3], prompt=对于每张图片,简要说明它是:人物、产品/物体,还是地点/环境)
然后分配:
- - characterbase = 人物/模特
- itembase = 他们互动的产品/物体
- location_base = 地点/环境/背景
第1步——将图片上传至ComfyDeploy存储
始终先将本地文件上传到ComfyDeploy自己的存储。切勿使用外部/自定义域名。
bash
source ~/clawd/.env
uploadtocomfy() {
curl -s -X POST https://api.comfydeploy.com/api/file/upload \
-H Authorization: Bearer $COMFYDEPLOYAPI_KEY \
-F file=@$1 | jq -r .file_url
}
URLCHAR=$(uploadto_comfy /path/to/character.jpg)
URLITEM=$(uploadto_comfy /path/to/item.jpg)
URLLOC=$(uploadto_comfy /path/to/location.jpg)
返回:https://comfy-deploy-output.s3.us-east-2.amazonaws.com/inputs/img_XXXX.jpg
第2步——提交运行
bash
RUN_ID=$(curl -s -X POST https://api.comfydeploy.com/api/run/deployment/queue \
-H Content-Type: application/json \
-H Authorization: Bearer $COMFYDEPLOYAPI_KEY \
-d {
\deployment_id\: \e5258667-dec2-438f-84d0-f22049692483\,
\inputs\: {
\characterbase\: \$URLCHAR\,
\itembase\: \$URLITEM\,
\locationbase\: \$URLLOC\,
\charactersheetprompt\: \创建一张照片级真实的角色表。包含一张左对齐的特写肖像(肖像中必须可见服装),无边框,中性表情,同时包含一张展示角色正面、右侧面、左侧面和背面的全身视图。角色放置在白色背景上。不要包含任何文字。无边框,无柔和渐变。[服装描述]\,
\video_prompt\: \视频场景描述\,
\input_seed\: -1
}
} | jq -r .run_id)
echo 运行ID:$RUN_ID
轮询结果
bash
while true; do
RESULT=$(curl -s https://api.comfydeploy.com/api/run/$RUN_ID \
-H Authorization: Bearer $COMFYDEPLOYAPI_KEY)
STATUS=$(echo $RESULT | jq -r .status)
echo 状态:$STATUS
if [ $STATUS = success ]; then
echo $RESULT | jq .outputs
break
elif [ $STATUS = failed ]; then
echo 失败!
break
fi
sleep 10
done
第3步——轮询并下载结果
bash
轮询直至成功
while true; do
RESULT=$(curl -s https://api.comfydeploy.com/api/run/$RUN_ID \
-H Authorization: Bearer $COMFY
DEPLOYAPI_KEY)
STATUS=$(echo $RESULT | jq -r .status)
[ $STATUS = success ] && break
[ $STATUS = failed ] && echo 失败 && break
sleep 15
done
将输出下载到允许的目录
mkdir -p ~/clawd/output/cinematic-kling
BASE
URL=https://comfy-deploy-output.s3.us-east-2.amazonaws.com/outputs/runs/$RUNID
curl -sL $BASE
URL/CS2
00001.png -o ~/clawd/output/cinematic-kling/character-sheet.png
curl -sL $BASE
URL/ITEM00001_.png -o ~/clawd/output/cinematic-kling/item-sheet.png
curl -sL $BASE
URL/LOCATION00001_.png -o ~/clawd/output/cinematic-kling/location-sheet.png
curl -sL $BASE
URL/ComfyUI00001_.mp4 -o ~/clawd/output/cinematic-kling/video.mp4
第4步——以文件形式发送结果
始终使用filePath以文件附件形式发送——切勿发送原始URL。
message(action=send, channel=telegram, target=USER_ID, filePath=~/clawd/output/cinematic-kling/character-sheet.png, message=角色表)
message(action=send, channel=telegram, target=USER_ID, filePath=~/clawd/output/cinematic-kling/item-sheet.png, message=物品表)
message(action=send, channel=telegram, target=USER_ID, filePath=~/clawd/output/cinematic-kling/location-sheet.png, message=地点表)
message(action=send, channel=telegram, target=USER_ID, filePath=~/clawd/output/cinematic-kling/video.mp4, message=🎬 视频)
输出结构
| 节点 | 文件 | 操作 |
|---|
| 4 | CS200001.png | 以文件形式发送(角色表) |
| 14 |
ITEM00001_.png | 以文件形式发送(物品表) |
| 25 | LOCATION
00001.png | 以文件形式发送(地点表) |
| 22 | ComfyUI
00001.mp4 |
以文件形式发送——