Comfyui-Kling-Wrapper Clothing Dupe
Kling's Clothing Dupe, wired into your workflow
- source_video
- product_image_1
- product_image_2
- product_image_3
- product_image_4
- product_image_5
- model_image_1
- model_image_2
- model_image_3
- model_image_4
- model_image_5
- bgm
- video_url
- watermark_video_url
- task_id
- result_json
If you sell clothes online, you already know the grind: shoot the model once, shoot the product flat-lay, then spend a day cutting the model's video down to match the item. Kling's Clothing Dupe endpoint exists to collapse that into one pass - and this node is how you get it inside ComfyUI instead of the Kling web app.
Fair warning up front: this is not a local node. There are no weights, no VRAM requirement, no model download. The Comfyui-Kling-Wrapper Clothing Dupe node packages your video and images, ships them to Kling's POST /solutions/e-commerce/clothing_dupe endpoint, and polls GET /solutions until the task finishes. That's the whole game: a paid API call with your inputs leaving the machine. For a job this boring-but-profitable, it's usually worth it.
What you feed it
The required inputs are the shape of the request:
source_video- a ComfyUIVIDEOof a model wearing the item. Must be 5–180 seconds long, and it's the only video the API accepts.product_image_1(plus up to four more) - clean shots of the product itself. The node enforces at least one, at most five, each at least 300×300px with an aspect ratio between 1:2.5 and 2.5:1. It raises a local error before submitting if your images don't fit - no wasted API credits on malformed jobs.product_info- the text description of the product. Required, and capped at 2500 characters. This is what Kling uses to keep the garment consistent, so be specific: material, cut, color, where the logo sits.resolution(720pdefault /1080p) andaspect_ratio(auto, or anything from 9:16 to 21:9) - straightforward; leaveautounless your platform demands a fixed crop.
Everything else is optional but worth knowing: model_image_1…5 are extra references of the model (not the product - backgrounds don't count), and bgm takes a single ComfyUI AUDIO input for background music.
The voice_id dropdown is the one that trips people up: it's entirely in Chinese (活力带货女, 温柔带货女, …) because those are the official Kling voice library names. "无" means no voiceover. Pick one and the wrapper maps the Chinese label to the English voice_id Kling actually wants.
What comes out
Four outputs: video_url (the clean product video - the one you'll use), watermark_video_url (a watermarked variant, returned in case you want to share a preview), task_id (handy for debugging and billing lookups), and result_json (the full task result, if you want the raw data). The node polls every second or so and blocks until the task resolves, so expect to wait a few minutes. Wire video_url into the pack's Preview Video node to save and watch the clip.
Installing it
The usual. Via ComfyUI Manager, search "Comfyui-Kling-Wrapper", or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/magicwang1111/Comfyui-Kling-Wrapper.git
cd Comfyui-Kling-Wrapper
pip install -r requirements.txt
Dependencies are light - httpx, pyjwt, pydantic, pillow, numpy - no torch trickery on top of what ComfyUI already has. The real setup step is credentials: copy config.example.json to config.local.json in the repo root and add your Kling API key (api_key, the static Bearer token, or the older access_key/secret_key pair). Restart ComfyUI and the nodes appear under the Comfyui-Kling-Wrapper category.
Where people get burned
- This node ignores your provider setting. The pack supports Tencent VOD and Vapeur as alternate backends, but Clothing Dupe always uses official Kling credentials from
config.local.json. If you set up Vapeur and skip the official key, this node fails - by design, per the README. - Media upload reliability. Without OSS credentials, the wrapper uploads your video and images to free temporary hosts (
tmpfiles.org, thencatbox.moe). Those can be flaky or geo-blocked. If you have Aliyun OSS access keys, put them in the config and uploads become dependable. - It's metered. Every task costs Kling credits - a 1080p video with voiceover is not free. The wrapper logs
final_unit_deductionwhen the API reports billing, so watch the console to see what each run actually cost.
One more honest note: Comfy Org's official Partner Nodes also reach Kling, on prepaid credits, if you'd rather not hand a third-party pack your key. But for a drop-in node that uses your own Kling account and exposes every e-commerce option, this wrapper is the one that's actually wired for product work.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| product_info | STRING | — | |
| source_video | VIDEO | — | |
| product_image_1 | IMAGE | — | |
| resolution | COMBO | 720p | 2 options: 720p, 1080p |
| aspect_ratio | COMBO | auto | 9 options: auto, 9:16, 2:3, 3:4, 1:1, 4:3, +3 |
| voice_id | COMBO | 无 | 11 options: 无, 活力带货女, 温柔带货女, 清脆带货女, 知性带货女, 平静带货女, +5 |
| product_image_2opt | IMAGE | — | |
| product_image_3opt | IMAGE | — | |
| product_image_4opt | IMAGE | — | |
| product_image_5opt | IMAGE | — | |
| model_image_1opt | IMAGE | — | |
| model_image_2opt | IMAGE | — | |
| model_image_3opt | IMAGE | — | |
| model_image_4opt | IMAGE | — | |
| model_image_5opt | IMAGE | — | |
| bgmopt | AUDIO | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| video_url | STRING | — |
| watermark_video_url | STRING | — |
| task_id | STRING | — |
| result_json | STRING | — |