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

KIE • Download File

URL In, Path Out (and the Suffix Trap)

By felipederosilva·Created 2 months ago·Updated 4 days ago· 3
KIE • Download File
  • config
  • local_path
◄url►
◄suffix►

Image and video get their own download nodes because ComfyUI has native types for them. Everything else - lyrics files, JSON, MIDI, an archive, a caption file - has to land on disk as a path, and that's what this node is for. Two widgets, one string output, no re-encoding.

What you'd use it for

The pack's Suno and audio utilities produce text artifacts: timestamped lyrics, MIDI transcriptions, lyrics task details. The audio nodes cover the audio. When KIE's response includes a file rather than a URL you can decode into a media type, this is how you get it onto disk where another node - or you - can pick it up.

It's also the general escape hatch: any URL that isn't an image or a video, downloaded to a filesystem path you can then feed to a loader that takes a path. Because the fetch is unauthenticated in the common case, it works for non-KIE URLs too.

How it works

url is required. suffix is required too, but can be empty, and it's the field that bites people.

The logic, exactly:

  • If suffix is empty, the extension is taken from the URL's path - and if that path has no usable extension, it falls back to .bin.
  • If suffix is non-empty, it's used only when it starts with a dot and the rest is alphanumeric. Otherwise it silently becomes .bin.

So .srt works. srt does not - you get a .bin file, which every downstream loader will refuse with a confusing error. Always include the dot.

The download itself has the usual two-stage behaviour: a plain GET first (no key needed, any reachable host), and if that fails it asks KIE's Common API to convert the URL into a short-lived direct download link and retries. Bytes are archived under output/KIE-Results/files/ with a content-addressed filename and the resolved suffix, so repeated downloads of the same URL don't pile up duplicates, and the file survives temp-folder cleanup. If the output directory isn't writable it falls back to a temp path instead of failing.

Output: local_path - a STRING. Wire it into any node that takes a file path, or copy it out of the node's output panel and open the file yourself. That's the payoff: it's a path, not a media object, so it goes anywhere.

Install

ComfyUI Manager → ComfyUI-KIE-Nodes-Next. The README says Registry publishing is prepared but not shipped yet:

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. Registered from the pack's base mappings, so it's there immediately - the live catalog sync that builds the model nodes doesn't gate it. Python 3.10+, no GPU, nothing to download.

Common issues

You got a .bin file. Your suffix was missing the leading dot, or had a stray character that isn't alphanumeric. .srt, .json, .mid, .txt - dot plus alphanumerics.

404, or the fallback converter errored. Generated KIE links are short-lived; if the URL is stale, the archive under output/KIE-Results/files/ is your durable copy. If it's a non-KIE host refusing scripted GETs, KIE's converter can't help.

Where did it go? local_path is the answer - it points inside ComfyUI's output directory, under KIE-Results/files/. The filename is a content hash, not the original name, so expect kie_<sha256>.srt rather than something readable.

The path exists but another node can't load it. Some loaders only list files they can see in their own configured folders. A path is still usable if the node accepts one; if it wants a dropdown selection, you may need to copy the file into the input folder yourself.

Slow or failing on a big file. The HTTP timeout defaults to 90 seconds and is adjustable through the advanced connection override; retries on transient HTTP failures are automatic (4 by default).

CategoryKIE Next/Utility/Media

Inputs (3)

NameTypeDefaultDescription
urlSTRING—
suffixSTRING—
configoptKIE_CONFIG—

Outputs (1)

NameTypeDescription
local_pathSTRING—