Nodes/KIE.ai Nodes Next/KIE • Upload File
ComfyUI Node

KIE • Upload File

For the files that aren't images, video or audio

By felipederosilva·Created about a month ago·Updated a day ago· 3
KIE • Upload File
  • config
  • url
◄local_path►
◄upload_pathcomfyui/uploads►

The other upload nodes want an IMAGE, a VIDEO or an AUDIO object because that's what ComfyUI's graph can carry. This one wants a path - which is the point. It's the node for a file the graph has no type for: a LUT, a reference document, a 3D asset, a MIDI file, an audio format that isn't a standard AUDIO object.

The author's own description puts it well: useful for the file, audio and API families that aren't represented by a native Comfy media type. If you've ever needed to hand a KIE endpoint something that isn't pixels or sound, this is the bridge.

How it works

You give it a path on the machine running ComfyUI, and it streams the file to KIE's upload service, returning the hosted URL. The path is expanded (so ~ works) and made absolute, and if the file isn't there the node fails immediately with File does not exist: <path> - no confusing provider error, no silent empty upload. Small mercies.

upload_path decides where the file lands in KIE's storage namespace. The default, comfyui/uploads, is fine and keeps your files grouped with whatever the rest of the pack uploads. Change it if you're organising a project and want the files somewhere you'll recognise later.

Inputs and outputs

local_path is required and is a single-line string widget: the absolute path to the file on the ComfyUI host. This is the one place in this pack where you type a filesystem path, and it's worth being deliberate - it's resolved on the server side, so a path that's valid on your laptop means nothing if ComfyUI is running in a container somewhere else. On a Docker or remote setup, put the file somewhere inside the container's visible filesystem (ComfyUI's input folder is the obvious choice) rather than on your host desktop.

upload_path is the remote storage prefix, defaulting to comfyui/uploads. config is optional and expects a KIE_CONFIG connection from the pack's advanced connection node - you can leave it unwired, since the saved API key is used by default and KIE_API_KEY takes priority on headless installs.

One output: url, a string. Feed it into whatever endpoint field wants a file URL, or into the $image_url / $video_url / $audio_url placeholders in KIE • Universal Market Task (Advanced) if the provider is happy with the format even though ComfyUI doesn't have a type for it.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
cd ComfyUI-KIE-Nodes-Next
pip install -r requirements.txt

Restart ComfyUI, then set your API key once under Settings → KIE.ai Nodes Next → Connection - the pack validates it against KIE before replacing anything, then shows a masked fingerprint and a CONNECTED status with your balance. ComfyUI Manager does the same job if you search "KIE.ai Nodes Next". Dependencies are requests, Pillow, numpy, PyYAML; there are no model files, since everything remote bills per call.

Realistic caveats

The URL you get back is a hosted copy on someone else's storage, not a permanent home. Treat it as valid for the run, not for the quarter.

Because this node bypasses ComfyUI's media types entirely, nothing validates the file for you. If an endpoint documents a format or size limit, the provider is the one that will tell you, and its message may well be vague. Read the endpoint's own docs before uploading something exotic.

And if you're using this to send a file that a different node in the pack could have uploaded as a proper media type, don't. The IMAGE, VIDEO and AUDIO upload nodes give you native sockets and consistent behaviour; this one exists for the cases they can't cover, and using it for the cases they can just adds a path string to your workflow and a mystery to your debugging.

CategoryKIE Next/Utility/Media

Inputs (3)

NameTypeDefaultDescription
local_pathSTRING—
upload_pathSTRINGcomfyui/uploads—
configoptKIE_CONFIG—

Outputs (1)

NameTypeDescription
urlSTRING—