Comfyui-Kling-Wrapper Preview Video
The node that turns Kling's URLs into files on your disk
- file_path
Every generation node in this pack outputs a url - a public download link to a video sitting on Kling's servers. A URL is not a video you own, and that's what Preview Video is for: it fetches the URL, saves the clip into your ComfyUI output folder, and shows it in the UI. One node, one job, and you'll tack it onto the end of nearly every workflow in this pack.
Without it, your Kling renders live and die in the browser. With it, they land on disk with a proper filename, ready to move, edit, or upload anywhere. It's the difference between "I have a link" and "I have a file."
How it works
One required input: video_url - the string URL that any generation node outputs (url). The node downloads the video, writes it to your output directory as an .mp4 with a timestamped filename, and returns:
file_path- the local path to the saved file, so downstream nodes (or you) can find it.
It's marked as an output node, so it terminates a branch and shows the video inline in the ComfyUI UI when the run finishes. The filename follows ComfyUI's standard save-image-style counter scheme, so repeated runs accumulate instead of overwriting.
A couple of behaviors worth knowing: the node refuses an empty video_url - if the upstream node finished without producing a downloadable URL, Preview Video raises a clear "received an empty video_url" error rather than writing a garbage file. There's also a save toggle on the node; flip it off if you just want to preview without writing a file to disk.
Wiring it up
The canonical ending for any generation workflow in this pack:
[Image2Video / Lip Sync / Avatar / Motion Control ...]
url ──────────────► Preview Video
Wire the generator's url output into video_url, run, and the clip appears in your output folder. This is also the node you chain from if you want to process the result - its file_path output can feed a video-loading node for further local work.
Install and gotchas
Standard pack install: ComfyUI Manager (search "Comfyui-Kling-Wrapper") or git clone https://github.com/magicwang1111/Comfyui-Kling-Wrapper.git into custom_nodes, pip install -r requirements.txt, restart, Kling API key in config.local.json.
The one gotcha is download reliability, which isn't really this node's fault: it fetches whatever URL the API gave you, and if that signed URL has expired (some Kling URLs are time-limited) or the upstream node failed silently, the download can come up short. If you get an empty-file or fetch error, the fix is usually to re-run the generation and download promptly. That's it - it's a utility node with a utility node's simplicity, but it's the one you'll use on literally every clip this pack produces.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| video_url | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| file_path | STRING | — |