Nodes/ComfyUI-Kling-Direct/Kling Raw File Loader
ComfyUI Node

Kling Raw File Loader

Get any file out of ComfyUI's input folder as a plain path

By IxMxAMAR·Created 5 months ago·Updated 2 months ago· 4
Kling Raw File Loader
    • file_path
    filename

    This is the pack's most boring node and one of its more useful ones. KlingDirect_RawFileLoader doesn't generate anything, doesn't call any API, doesn't even need an API key - it just turns any file sitting in ComfyUI's input folder into a STRING file path you can wire elsewhere. That's the entire job, and it exists because this whole pack talks in URLs and file paths rather than tensors.

    Drop an mp3, an mp4, a PNG, whatever, into ComfyUI/input, and the filename dropdown lists it. Pick it, and the node outputs the full path on disk (file_path). Compared to ComfyUI's built-in LoadImage/LoadVideo nodes, which decode media into tensors, this one is deliberately raw - no decoding, no resizing, no format assumptions. It hands the path to whichever node wants a path.

    Where it plugs in

    The Kling pack's URL-hungry nodes are the obvious targets, and this loader is the bridge for local media:

    • Raw File Loader → Cloud Uploader: upload the file to a public paste-bin host (catbox, 0x0, tmpfiles…) and get a URL that Kling's API can actually fetch. That's the standard way to feed local video to lip-sync or motion-control.
    • Raw File Loader → Raw File Saver: copy or re-download a local file to the output folder under a new name.
    • Raw File Loader → Asset Upload: push the file to Kling's materials API and get an asset_id back.

    Its one input, filename, is a dropdown populated from the input directory, so there's nothing to type and nothing to misconfigure. Output is a single file_path (STRING). That's it - a utility node with one job.

    Install

    It ships in ComfyUI-Kling-Direct: ComfyUI Manager → search "Kling Direct" → install, or git clone https://github.com/IxMxAMAR/ComfyUI-Kling-Direct into ComfyUI/custom_nodes, then restart. It's pure local code - no authentication, no credits, no model downloads. The pack's heavier dependencies (requests, Pillow, numpy, torch, opencv-python) are all already in ComfyUI.

    The gotcha worth knowing

    The dropdown only lists files present in the input folder when the node populates its widget. Drop a new file in while ComfyUI is running and you may need to refresh the node list or restart to see it. Also note the output is an absolute filesystem path, not a URL - Kling's cloud can't fetch it. If your destination node expects a http(s):// URL, pair this with the Cloud Uploader rather than wiring the path straight into an API node and wondering why the job 403s.

    Thin node, thin article - but when you're halfway through a Kling workflow and realize your source video is a local file, this is the two-second fix that keeps the graph from stalling.

    CategoryKling AI/Config

    Inputs (1)

    NameTypeDefaultDescription
    filenameCOMBOSelect any file from the ComfyUI input directory.

    Outputs (1)

    NameTypeDescription
    file_pathSTRING