Random Unet Loader (LoraManager)
The dice-rolling sibling for modern diffusion models
- MODEL
- model_name
If you came from SD1.5 or SDXL, "UNet loader" sounds like a niche thing. It isn't - it's how the modern stack works. Flux, SD3, PixArt and friends don't ship one fat checkpoint file with the text encoder and VAE bundled in; they ship the diffusion model separately, and you load it with an UNet loader, then wire in a separate CLIP/text encoder and VAE. Random Unet Loader (LoraManager) is that loader plus a superpower: it can ignore your pick and grab a random diffusion model from your whole pool on every run, optionally filtered by base model.
Same story as its checkpoint sibling, aimed at the newer architecture. You've got a dozen Flux or SD3 diffusion models and one prompt you keep testing - this node rolls the dice across them so you actually discover which one sings, and its model_name output tells you what won.
How it works
The node lists diffusion models from the LoRA Manager scanner cache, which covers your normal models/unet folder plus any extra model folders you've registered in the manager. With select_at_random on, it picks a random entry each queue run - the node's IS_CHANGED hook returns a non-cacheable value so ComfyUI doesn't "helpfully" skip the re-run. With it off, it's just a nicer UNet loader.
Inputs:
unet_name- the diffusion model to load when randomization is off.select_at_random- toggle random pick-every-run.base_model- restrict the random pool (e.g. "Flux" vs "SD3");Anyuses everything.weight_dtype-default,fp8_e4m3fn,fp8_e4m3fn_fast,fp8_e5m2. The fp8 options load the weights quantized to 8-bit;_fastis the one people reach for when they want the speedup and can live with the slight quality trade.defaultfollows whatever's in the file. If you don't know what this does, leave it on default.
Outputs: MODEL (the denoiser, wired into your sampler) and model_name - the loaded model's name, invaluable when randomization is on and you need to record or display what actually ran.
One more capability worth calling out: it handles GGUF diffusion models too. The loader detects a .gguf file and loads it through the ComfyUI-GGUF machinery, wrapping it in a GGUFModelPatcher so it behaves like a first-class model. That does mean the ComfyUI-GGUF custom node has to be installed - otherwise the GGUF path raises an error telling you so.
Install
It's a node in willmiao/ComfyUI-Lora-Manager. ComfyUI Manager: Manager → Custom Node Manager → search lora-manager → Install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/willmiao/ComfyUI-Lora-Manager
cd ComfyUI-Lora-Manager
pip install -r requirements.txt
# restart ComfyUI
Nothing heavy downloads with the pack itself. The scanner needs to finish indexing before the random pool reflects your collection, and if you want the GGUF path, install city96/ComfyUI-GGUF separately.
Where people get burned
The failure modes mirror the checkpoint loader, with one extra twist. Random model + random seed means you can't reproduce a good roll - lock the seed for A/B testing. A fresh download may not be in the scanner cache yet, so the pool lags reality; refresh or restart after adding models. An empty pool for your chosen base_model errors cleanly - change the filter or turn randomization off. And if you're on a workflow that bundles everything into one checkpoint file, you don't need this node at all - the Random Checkpoint Loader in the same pack is the one that matches your world. Use the UNet loader when you've already separated model from text encoder, which is the default state for Flux and friends.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| unet_name | COMBO | The name of the diffusion model to load. | |
| weight_dtype | COMBO | The dtype to use for the model weights. | |
| select_at_random | BOOLEAN | false | Ignore unet_name and pick a random diffusion model from the pool (optionally filtered by base_model) on every run. |
| base_model | COMBO | Any | Restrict random selection to this base model. 'Any' uses the full pool. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | The model used for denoising latents. |
| model_name | STRING | The name of the diffusion model that was loaded (useful when select_at_random is enabled). |