Nodes/ComfyUI API Toolkit/Kling Raw File Saver
ComfyUI Node

Kling Raw File Saver

Save any URL or file path to disk without decoding it first

By IxMxAMAR·Created 5 months ago·Updated 2 months ago· 1
Kling Raw File Saver
    • saved_path
    url_or_path
    filename_prefixkling_save
    formatauto

    The general-purpose version of the pack's file-saving story. Give this node a URL or a local path, and it writes the file to your ComfyUI output folder - as bytes, untouched, no decoding into tensors along the way. It's the tool you use when you just want Kling's result on disk and you'd rather not have ComfyUI chew a video through its image pipeline to get it there. It's an output node, so it's the natural end of a branch.

    Three inputs:

    • url_or_path - a URL (http/https) or a local file path. If it's a URL, the node streams it down; if it's a local path, it copies the file. Empty string just returns an empty saved_path rather than erroring.
    • filename_prefix - default kling_save. A random suffix gets appended to keep names unique.
    • format - auto (detect from the URL/file extension), or force .mp4, .mp3, .png, .jpg. If auto can't figure out an extension, it guesses: .mp4 if "video" appears in the URL, otherwise .png.

    The single output is saved_path - the absolute path where the file landed, which you can pipe into a next step or just read off. Because it streams (for URLs, it chunks the download), it handles large files without loading them into memory - the same OOM-avoidance philosophy as the Fast Video Saver, minus the video-specific framing.

    Installing it

    Bundled in ComfyUI-API-Toolkit. Manager: search "API Toolkit". Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/IxMxAMAR/ComfyUI-API-Toolkit
    pip install -r requirements.txt
    

    Restart ComfyUI. Requires only requests.

    Gotchas

    The download is a plain requests.get, so a flaky host or an expired Kling asset URL (tasks expire after roughly 72 hours) means a failed save - re-queue or re-fetch. And note the asymmetry with the rest of the pack: it saves files, not ComfyUI assets. If you've already got the result as an IMAGE or AUDIO tensor, you don't need this node - the standard Save nodes and the video nodes' own video_file output handle that. Where it shines is the in-between case: you've got a URL string from another node and you want the raw file, exactly as the API delivered it, without ComfyUI deciding what an mp4 is.

    CategoryAPI Toolkit/Kling AI/Config

    Inputs (3)

    NameTypeDefaultDescription
    url_or_pathSTRINGURL or local file path to save.
    filename_prefixSTRINGkling_savePrefix for the saved filename.
    formatCOMBOautoOutput format. 'auto' detects from URL.

    Outputs (1)

    NameTypeDescription
    saved_pathSTRING