ComfyUI Node

S3 Bucket Load LoRA

Load a LoRA straight from S3 — no copying files into ComfyUI first

By komojini·Created 3 years ago·Updated 2 years ago· 3
S3 Bucket Load LoRA
  • model
  • clip
  • MODEL
  • CLIP
remote_lora_path_or_url
strength_model1.00
strength_clip1.00
BUCKET_ENDPOINT_URL
BUCKET_ACCESS_KEY_ID
BUCKET_SECRET_ACCESS_KEY
BUCKET_NAME

The normal LoRA dance is: download the file, drop it into ComfyUI/models/loras, refresh the dropdown, then load it. This node deletes the middle steps. You give it an S3 object key (or a plain URL) and it downloads and loads the LoRA in one shot, spitting out the same MODEL and CLIP outputs any LoraLoader gives you. If you train DreamBooth LoRAs on one machine and generate on another - or rent ephemeral ComfyUI instances where the disk resets between sessions - that's exactly the annoyance this solves.

It's one of two nodes in komojini's ComfyUI_SDXL_DreamBooth_LoRA_CustomNodes pack, and the half that faces the cloud. The pack is a hobby-scale thing from a small custom-node author (the repo has a single commit, dated late 2023), and the README is literally just the title, so the source code is the documentation. Don't let that scare you: the mechanics are straightforward.

How it works

Feed it a remote_lora_path_or_url string and it takes a decision:

  • If the string already matches a file in your local loras folder, it just loads that - same as a normal loader, zero downloads.
  • Otherwise it downloads into /tmp/loras, registers that folder with ComfyUI's model search, and loads from there.
  • If the path contains checkpoint, it looks for a kohya-style pytorch_lora_weights.bin beside it and loads that - the DreamBooth training artifact this pack is built around.

Downloads go through boto3 against an S3-compatible endpoint. Credentials come from a .env file in your ComfyUI directory (the pack loads it via python-dotenv on import) or from the node's optional inputs, which override the environment each run. Region is inferred from the endpoint URL, so AWS, Backblaze B2, DigitalOcean Spaces and MinIO-style endpoints all work without you naming a region. That's the nice part - it's genuinely vendor-agnostic.

The inputs that matter

The three you'll actually touch:

  • remote_lora_path_or_url (string) - an S3 object key like user/checkpoint-500/pytorch_lora_weights.bin, or a direct download URL. A local filename works too.
  • strength_model / strength_clip (0–2, default 1) - the usual LoRA blend weights, same semantics as every other loader.

The optional bucket fields - BUCKET_ENDPOINT_URL, BUCKET_ACCESS_KEY_ID, BUCKET_SECRET_ACCESS_KEY, BUCKET_NAME - are only needed if you're not using .env. Outputs are MODEL and CLIP: MODEL into the sampler, CLIP into conditioning, exactly like any LoraLoader.

Install

Same as any custom node: ComfyUI Manager → search ComfyUI_SDXL_DreamBooth_LoRA_CustomNodes, or the manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/komojini/ComfyUI_SDXL_DreamBooth_LoRA_CustomNodes
pip install -r requirements.txt   # boto3, gdown, python-dotenv

Then restart ComfyUI. No model files to download - the LoRAs it loads are yours. One quirk worth knowing: gdown sits in requirements.txt but the shipped code never calls it; the author's only commit ("gdown error fixed") swapped it for a plain requests.get.

Where people get burned

  • Google Drive links are the flaky corner. Anything containing drive.google goes through a bare requests.get, and Drive serves a virus-scan confirmation page for anything but tiny files - so you'll get HTML written to a .safetensors, and a load error. gdown exists precisely to handle Drive's confirmation tokens, but it's commented out here. Expect Drive links to fail more than they work.
  • It re-downloads a lot. A remote path wipes /tmp/loras and fetches again on a fresh instance; loaded weights are cached in memory per node, so re-running one instance is fast, but a long queue with fresh instances re-fetches every time.
  • Stale weights. If the file on the bucket changes, an already-loaded node instance keeps serving the old weights. Bypass or recreate the node to force a fresh pull.
  • BUCKET_NAME needs to be set somewhere - even the no-credentials URL fallback builds URLs from endpoint + bucket + key.

Honest verdict: the name undersells it. It's really "download a LoRA by URL and load it," pointed at S3 first. If you never touch object storage you probably don't need it - but it's the one node in this pack I'd actually reach for.

Categorysd

Inputs (9)

NameTypeDefaultDescription
modelMODEL
clipCLIP
remote_lora_path_or_urlSTRING
strength_modelFLOAT1.000–2
strength_clipFLOAT1.000–2
BUCKET_ENDPOINT_URLoptSTRING
BUCKET_ACCESS_KEY_IDoptSTRING
BUCKET_SECRET_ACCESS_KEYoptSTRING
BUCKET_NAMEoptSTRING

Outputs (2)

NameTypeDescription
MODELMODEL
CLIPCLIP