Nodes/Fetch File Node/FetchFileNode
ComfyUI Node

FetchFileNode

A URL and a Path — That's the Whole Node (and It Fixes RunPod)

By ultrafro·Created 2 years ago·Updated 2 years ago· 0
FetchFileNode
  • overwrite_local_file_if_exists
  • status
urlhttps://example.com/file.txt
output_pathoutput/file.txt

FetchFileNode takes a URL and an output path, downloads the file, and puts it on disk. That's the entire feature list, and honestly that's the appeal. The author's own framing is the honest one: it exists to make RunPod (or any throwaway cloud GPU) setup happen inside the workflow instead of in a terminal you have to babysit.

If you've ever spun up a fresh pod, SSH'd in, and wget'd a 6 GB checkpoint while watching the timer tick down, you know the pain. ComfyUI users already complain that they spend their lives "downloading models and installing missing nodes 90% of the time." On cloud GPUs that's worse - every pod is a clean slate. This node is the "everything happens in the workflow" answer: drop a few of them into your graph, one per model file, and when the workflow runs, your models are there waiting for it.

How it works

The mechanism is simple enough to read in one sitting. The node changes its working directory up two levels from its own install folder - that lands you at the ComfyUI root - so output_path is interpreted relative to your ComfyUI install, not the node's directory. That's why models/checkpoints/something.safetensors lands exactly where the CheckpointLoader expects it.

Then it just does requests.get(url) and writes the bytes. No streaming, no resume, no progress bar, no auth headers. The whole file is buffered in memory before it touches disk, which is worth knowing if you're pulling a multi-gigabyte model - your RAM takes a hit. Fine on a RunPod box with 32+ GB; mildly alarming on a 16 GB laptop.

The genuinely thoughtful bit is the default: overwrite_local_file_if_exists is False. If the target file already exists, the node short-circuits and reports File already exists instead of downloading it again. That makes the node idempotent - re-running a workflow that already fetched its models is a no-op, and your pod won't re-download five checkpoints every time you queue.

The inputs and outputs that matter

  • url (STRING) - a direct download link. The author's example is Google Cloud Storage; any public URL that requests can fetch works. There's no way to pass headers or a token, so private GCS buckets need a signed URL.
  • output_path (STRING) - path relative to your ComfyUI root, like models/loras/my_lora.safetensors.
  • overwrite_local_file_if_exists (BOOL, default false) - leave it off and the node skips existing files.

The single output, status, is a STRING - something like File fetched and saved successfully or Error: .... Wire it into any string input (a display node, a text field) to see what happened. The node is marked as an output node, so it always executes on queue - another reason the skip-if-exists default matters.

Installing it

No model downloads, no heavy dependencies - the pack's only real dependency is requests, which ComfyUI already ships. Easiest route:

  • ComfyUI Manager → Install Custom Nodes → search for comfy_fetch_file_node → Install → restart.

Or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/ultrafro/comfy_fetch_file_node

Then restart ComfyUI. You'll find FetchFileNode under File Operations in the node menu.

Where people get burned

Two gotchas from reading the source, neither documented in the README. First, the node never creates directories - it calls open(output_path, 'wb') directly. Point it at a folder that doesn't exist and you get an Error: ... status and no file. Create the folder once in the terminal (or via a script) and you're fine. Second, no auth and no resume: for a genuinely huge download over flaky wifi you're better off with aria2c in the shell. This node is a workflow-convenience tool, not a download manager.

And the usual custom-node caveat that's worth repeating for a node that writes files: it will happily write whatever you point it at, so only paste URLs you trust. Workflows are code; treat them accordingly.

CategoryFile Operations

Inputs (3)

NameTypeDefaultDescription
urlSTRINGhttps://example.com/file.txt
output_pathSTRINGoutput/file.txt
overwrite_local_file_if_existsoptBOOLfalse

Outputs (1)

NameTypeDescription
statusSTRING