ROCm LoRA Loader
A LoRA loader that sweeps VRAM before and after the load
- model
- clip
- MODEL
- CLIP
ROCm LoRA Loader is the stock Load LoRA node wrapped in memory hygiene. Same file dropdown, same strength sliders, same MODEL/CLIP outputs - the difference is that it runs a gentle memory cleanup before, during and after applying the LoRA, and it logs the whole thing. If you've ever watched a big LoRA slam into a nearly-full VRAM heap and OOM, you know why that wrapper exists.
It lives in ROCm Ninodes/Loaders and drops into a workflow where any LoRA loader does: after your checkpoint/diffusion loader, before your KSampler.
How it works
The mechanism is reassuringly boring. It loads the LoRA file with ComfyUI's load_torch_file and applies it with load_lora_for_models - the exact same calls the stock node makes, so the applied weights are identical. Around that, it runs gentle_memory_cleanup() (empty cache, synchronize, garbage collect) at a few points during the load, and reports allocated vs reserved memory plus fragmentation before and after.
Why does that matter on AMD? LoRA loading spikes memory while the weights are unpacked and patched in, and on unified-memory APUs like gfx1151 fragmentation is the usual killer - reserved memory climbs, allocations start failing even when you have "enough" free. The cleanup is gentle on purpose: the pack's own docs note that hammering the allocator aggressively on mature ROCm drivers can hurt more than it helps. If a load fails anyway, it does an emergency cleanup and re-raises the error so you at least see what happened.
The inputs that matter
- model - the MODEL you want patched (required).
- lora_name - dropdown of everything in your
lorasfolder. - strength_model / strength_clip - the strength of the LoRA on the model and on CLIP, both default 1.0. Range goes to −10…10; negatives invert the LoRA, which is occasionally useful but rarely what you want.
- clip (optional) - wire it if your LoRA touches CLIP/text encoder, and the CLIP output will carry the patched version.
Outputs are MODEL and CLIP - chain them back into the sampler (or into another LoRA loader if you stack).
Installing it
Part of the ROCm Ninodes pack: ComfyUI Manager, search rocm-ninodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/iGavroche/rocm-ninodes.git
then restart; v1.x installs run uv run python tools/upgrade_to_v2.py first. Dependencies (numpy, Pillow, psutil, gguf, safetensors) are handled by Manager; the real requirement is a ROCm PyTorch build. The pack downloads no LoRAs for you.
The honest version
If your LoRA loads already work, this node changes nothing about your results - it's a hygiene pass plus transparency, not a quality upgrade. Reach for it when you're stacking several LoRAs on a big model and the third or fourth one keeps dying with an OOM, or when you're on an AMD box and want to watch fragmentation creep. That's the scenario it was built for, and it does that job cleanly.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | The model to apply LoRA to | |
| lora_name | COMBO | LoRA file to load | |
| strength_model | FLOAT | 1.00-10–10 | Strength of LoRA effect on model |
| strength_clip | FLOAT | 1.00-10–10 | Strength of LoRA effect on CLIP |
| clipopt | CLIP | CLIP model to apply LoRA to |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| CLIP | CLIP | — |