LoRA Upload
Dragging a .safetensors past the 413 wall
You have a LoRA file and you want it in ComfyUI's loras folder. Core ComfyUI does have an upload path, and it's fine for a 2 MB PNG - but shove a 500 MB or 2 GB .safetensors through it and, behind nginx, a RunPod proxy or a hosted instance, you run into the body-size limit. 413 Request Entity Too Large is one of the most-repeated questions in r/comfyui; it usually shows up as people trying to upload video, but the same wall stops any large file dead, and the failure is opaque enough that it looks like a ComfyUI bug. This node exists because of it. The author's own note: version 0.5 divides each upload into 512 KiB requests, which sidesteps the single-request limit that used to produce "Server/proxy rejected the upload."
The node is the UI
info_schema here is genuinely empty: no inputs, no outputs, registered as an output node. Nothing to wire, nothing to feed. What you get is a drop zone reading "Drop LoRA files here", a Choose LoRA files… button, an Upload status line, and a read-only Destination display. Drop one file or ten; each one reports a live percentage in the node.
How the upload survives the proxy
The browser does the work in pieces:
initwith filename and size. The server creates a hidden temp file under.orels-uploadsin the first registeredloraspath and returns anupload_idplus a 512 KiBchunk_size.chunkrequests, in strict order, each carryingX-Orels-Upload-IDandX-Orels-Upload-Offsetheaders.finish. The server reassembles and validates the result as real safetensors - reads the 8-byte header length, parses the JSON header, checks each tensor's dtype, shape and byte count, and rejects gaps, overlaps or trailing bytes.
Then it publishes, and the no-overwrite rules are strict by design. If an identical file already exists (same size, same SHA-256) on any registered loras path, it's kept and you're told so. If a different file with the same name exists, that's a hard error and nothing is overwritten - rename and try again. Otherwise the temp file is hard-linked into place atomically, which is why a crash mid-publish can't leave a half-written LoRA sitting where your loader will find it.
The limits are real: .safetensors only, a flat filename (no folder separators, max 200 UTF-8 bytes), 8 GiB ceiling, chunks must arrive in order, and sessions go stale after 24 hours. And the browser tab has to stay open - this is a browser-driven upload, not a background job. Drop the file again and it starts over.
After it lands
The node tells you to refresh model lists and select the file in your LoRA loader, and it means it - the dropdowns are cached, so press R in the canvas (or the refresh button) before wondering why your brand-new LoRA isn't listed. This node doesn't load anything; it puts the file where a LoRA loader can see it. Pair it with whatever loader you already use, and remember the architecture lock-in that applies to every LoRA: a Flux LoRA isn't going to do anything on an SDXL checkpoint. Wrong base, wrong results.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/DarkOrel/Orels-Nodes orels-nodes
python -m pip install -r orels-nodes/requirements.txt
Just huggingface_hub and filelock - the upload path uses no extra libraries, it's plain routes plus a safetensors header parser. Restart ComfyUI, hard-refresh the browser, and clear out stale duplicate copies of the pack while you're in there.
Where it bites
- "A different file with this name already exists." Rename before dropping. Trained LoRAs are almost always called
last.safetensorsorepoch_10.safetensors, so this happens more than you'd think. - "Upload session expired. Drop the file again." A long stall or a network blip breaks the ordered chunks. The client cancels the session so the temp file gets cleaned up.
- "Invalid or empty safetensors file." The header and offsets didn't add up - you're uploading a truncated download or a file that was never safetensors to begin with. Re-download the source file.
- RunPod and other containers. The upload writes into the container's
loraspath. If that isn't on a mounted persistent volume, your LoRA dies with the pod. Upload to the persistent path, or budget for re-uploading after every restart.
The chunking costs you speed - thousands of small requests instead of one big one - but it's the difference between an upload that completes behind a proxy and one that never leaves the browser.
Inputs (0)
No inputs
Outputs (0)
No outputs