Nodes/lf-nodes/Diffusion model selector
ComfyUI Node

Diffusion model selector

Pick a diffusion model with a cover image and CivitAI info

By lucafoscili·Created 2 years ago·Updated 6 days ago· 35
Diffusion model selector
  • ui_widget
  • combo
  • string
  • path
  • image
  • model
diffusion_modelNone
get_civitai_infotrue
randomizefalse
filter
seed42
weight_dtypedefault

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 (default true) - 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.
  • combo and string - 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 unet folder, 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, try default first. The fp8 options are opt-in performance, not universal fixes.
Category✨ LF Nodes/Selectors

Inputs (7)

NameTypeDefaultDescription
diffusion_modelCOMBONoneDiffusion model used to generate the image ('unet' folder).
get_civitai_infoBOOLEANtrueAttempts to retrieve more info about the model from CivitAI.
randomizeBOOLEANfalseSelects a checkpoint randomly from your checkpoints directory.
filterSTRINGWhen randomization is active, this field can be used to filter checkpoint file names. Supports wildcards (*)
seedINT420–18446744073709550000Seed value for when randomization is active.
weight_dtypeCOMBOdefaultWeight 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_widgetoptLF_CARD[object Object]

Outputs (5)

NameTypeDescription
comboCombo list of diffusion models.
stringSTRINGSelected diffusion model item as a string.
pathSTRINGPath to the selected diffusion model.
imageIMAGECover image of the selected diffusion model.
modelMODELLoaded diffusion model.