Diffusion model selector
Pick a diffusion model with a cover image and CivitAI info
- ui_widget
- combo
- string
- path
- image
- model
The LF selector nodes are the pack's calling card - dropdowns that turn model-swapping from path-typing into a visual pick - and LF_DiffusionModelSelector is one of the flagship examples. It lists the diffusion models in your unet folder, shows you a cover image for the selected one, fetches info from CivitAI if it can, and actually loads the model. You pick from a card, and a ready MODEL tensor comes out the other side. No separate load node.
This is the kind of node that only makes sense in a big suite, and it's exactly the kind of thing people install lf-nodes for. When you're A/B testing checkpoints on one workflow, a dropdown with previews beats remembering filenames every time.
How it works
The diffusion_model combo is populated from your unet folder (or models/unet - wherever ComfyUI keeps diffusion models). It defaults to "None" if nothing's there. The workflow-critical settings:
get_civitai_info(defaulttrue) - tries to pull model metadata and a cover image from CivitAI for the selected model. It's a best-effort network call; if it fails (offline, unknown model), the node still works, you just lose the pretty card.randomize- instead of picking, randomly select a checkpoint on each run. Great for blind A/B testing.filter- when randomizing, a filename filter with wildcard support (*) to constrain the pool.seed(default 42) - the seed driving the random pick, so randomization is reproducible.weight_dtype-default, or force a data type:fp8_e4m3fn,fp8_e4m3fn_fast,fp8_e5m2. If the model loads fine at default, leave it; fp8 variants are for when you're VRAM-limited and know what you're doing.
Outputs
model- the loaded MODEL, ready to wire into your sampler pipeline. This is the one that matters.comboandstring- the selected item, as a combo value / string (for nodes that want the name).path- the file path of the loaded model (metadata, or downstream tools).image- the cover image from CivitAI, if retrieved. Wire it to a preview or display node.
Installing it
lf-nodes installs as a pack:
cd ComfyUI/custom_nodes
git clone https://github.com/lucafoscili/lf-nodes
restart ComfyUI, or install "LF Nodes" via ComfyUI Manager. No extra dependency for the loading itself - but get_civitai_info needs network access to CivitAI, and the fp8 dtype options assume your hardware handles fp8 (native on 40-series and newer).
Common issues
- Dropdown says "None" - your diffusion models aren't in the folder it scans. They need to be in the ComfyUI
unetfolder, or wherever your install maps diffusion models. - No cover image - CivitAI lookup failed or the model isn't known there. Cosmetic, not fatal.
- Model loads but errors - if you forced a
weight_dtype, trydefaultfirst. The fp8 options are opt-in performance, not universal fixes.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| diffusion_model | COMBO | None | Diffusion model used to generate the image ('unet' folder). |
| get_civitai_info | BOOLEAN | true | Attempts to retrieve more info about the model from CivitAI. |
| randomize | BOOLEAN | false | Selects a checkpoint randomly from your checkpoints directory. |
| filter | STRING | When randomization is active, this field can be used to filter checkpoint file names. Supports wildcards (*) | |
| seed | INT | 420–18446744073709550000 | Seed value for when randomization is active. |
| weight_dtype | COMBO | default | Weight data type for the diffusion model. 'default' will use the default data type for the model, while the others will force a specific data type. |
| ui_widgetopt | LF_CARD | [object Object] | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| combo | Combo list of diffusion models. | |
| string | STRING | Selected diffusion model item as a string. |
| path | STRING | Path to the selected diffusion model. |
| image | IMAGE | Cover image of the selected diffusion model. |
| model | MODEL | Loaded diffusion model. |