Comfyui-Kling-Wrapper
Comfyui-Kling-Wrapper is a ComfyUI custom node pack for calling the Kling AI API directly inside ComfyUI.
It bundles image generation, text-to-video, image-to-video, multi-image video, advanced custom elements, motion control, lip sync, text/video to audio, effects, virtual try-on, image expansion, and local preview helpers under the Comfyui-Kling-Wrapper category.
Highlights
- Direct Kling API access from ComfyUI workflows
- New-system features such as
element_list, advanced custom elements, reference video, and motion control - Built-in
voice_presetdropdown for models that support native audio generation - Importable example workflows in examples/README.md
Current model visibility
The plugin keeps the visible model dropdowns aligned with models verified on the active endpoint.
Visible image generation models:
kling-v1kling-v1-5kling-v2kling-v2-newkling-v2-1kling-v3
Visible text-to-video models:
kling-v1kling-v1-6kling-v2-masterkling-v2-1-masterkling-v2-5-turbokling-v2-6kling-v3
Visible image-to-video models:
kling-v1kling-v1-5kling-v1-6kling-v2-masterkling-v2-1kling-v2-1-masterkling-v2-5-turbokling-v2-6kling-v3
Visible multi-image video models:
kling-v2-1kling-v2-5-turbokling-v3
Documented newer models such as kling-image-o1, kling-video-o1, and kling-v3-omni still exist in the internal capability map, but are hidden from the UI until live endpoint support is confirmed for normal accounts.
Important limitations
- Native
soundandvoice_presetsupport is currently only verified forkling-v2-6on the active endpoint. kling-v3,kling-v3-omni, andkling-video-o1may appear in official docs, but the current public endpoint does not expose native sound control for them through this plugin.Advanced Element Createrequires 1 frontal subject image plus 1-3 additional reference images of the same subject. Background images do not count as reference images.Advanced Element Createalso enforceselement_name <= 20characters andelement_description <= 100characters.- If you need both strong subject consistency and voiced output, the reliable flow on the current endpoint is usually: generate the bound subject video first, then add speech with
Lip Sync,TextToAudio, orVideo2Audio.
Requirements
Before using these nodes, you need a Kling API key:
Python dependencies are listed in requirements.txt.
Installation
Manual installation
-
Open your
ComfyUI/custom_nodesdirectory. -
Clone this repository:
git clone https://github.com/magicwang1111/Comfyui-Kling-Wrapper.git -
Install dependencies:
Windows (portable ComfyUI):
python -m pip install -r ComfyUI\custom_nodes\Comfyui-Kling-Wrapper\requirements.txtLinux or macOS:
cd Comfyui-Kling-Wrapper pip install -r requirements.txt -
Create
config.local.jsonin the repository root.You can copy config.example.json and fill in your Kling credentials:
{ "access_key": "", "secret_key": "", "poll_interval": 1.0, "request_timeout": 30, "area": "global" }Notes:
config.local.jsonis ignored by git and should hold your real private keys.config.example.jsonis only a template and is never read as live config.- Legacy config.ini is still accepted as a fallback for
KLINGAI_API_ACCESS_KEYandKLINGAI_API_SECRET_KEY.
-
Restart ComfyUI and search for nodes prefixed with
Comfyui-Kling-Wrapper.
Node list
Comfyui-Kling-Wrapper Image GeneratorComfyui-Kling-Wrapper Image ExpanderComfyui-Kling-Wrapper Text2VideoComfyui-Kling-Wrapper Image2VideoComfyui-Kling-Wrapper Multi Images To VideoComfyui-Kling-Wrapper Virtual Try OnComfyui-Kling-Wrapper Video ExtenderComfyui-Kling-Wrapper Lip SyncComfyui-Kling-Wrapper Lip Sync Text InputComfyui-Kling-Wrapper Lip Sync Audio InputComfyui-Kling-Wrapper EffectsComfyui-Kling-Wrapper TextToAudioComfyui-Kling-Wrapper Video2AudioComfyui-Kling-Wrapper Advanced Element CreateComfyui-Kling-Wrapper Advanced Element QueryComfyui-Kling-Wrapper Element List BuilderComfyui-Kling-Wrapper Motion ControlComfyui-Kling-Wrapper Preview VideoComfyui-Kling-Wrapper Preview Audio
Motion control notes
Motion Control now accepts reference video only from workflow inputs:
reference_video_input: connect a node that outputsVIDEOreference_video_frames+reference_video_info: connect an uploaded video loader that outputs decoded frames plus timing metadata
Direct reference-video URLs are no longer supported in this node.
The visible model_name dropdown for motion control is:
kling-v2-6kling-v3
duration is now a dropdown with:
auto35101530
When duration is set to auto, the node tries to match the uploaded reference video's duration using the connected video metadata or the VIDEO input object.
character_orientation controls whether subject orientation follows the reference image or the reference video:
image: keep orientation from the reference image while transferring motion from the videovideo: follow both motion and orientation from the reference video
Voice presets
Text2Video and Image2Video expose a voice_preset dropdown instead of requiring manual voice_list JSON.
The selected preset is converted to:
[{"voice_id":"..."}]
These presets are mainly intended for models that support native audio generation on the active endpoint, especially kling-v2-6.
Examples
Example workflows and small Python snippets live in examples/README.md.
The workflow JSON files no longer depend on a front-end Client node. Prepare config.local.json first, then import the workflow you want to run.
Official references
- Kling new-system API documentation
- Kling 3.0 series capability map
- Kling V2.6 API documentation
- Kling pricing
Notes
The nodes log final_unit_deduction when the API returns billing information. This is useful when checking the real unit cost of newer Kling endpoints and workflows.