通用名称选择器
The model-list picker — enumerate any ComfyUI folder and pull one name out
- 名称列表
- 选择数量
- 下标名称
LamCommonNames (通用名称选择器, "generic name selector") is a utility that enumerates one of ComfyUI's model folders and hands you the list - plus an easy way to grab a single entry by index. Instead of a hard-coded drop-down of checkpoints, you get the full filename list as data, which is exactly what you want when a workflow needs to iterate over your models or pick one programmatically.
Why it exists: ComfyUI loaders (checkpoint, LoRA, VAE, ControlNet, …) all read their file lists from the same internal registry. This node exposes that registry generically, so one node covers all eleven of them instead of eleven separate loaders. That's the pack's loop-friendly philosophy again - enumerate, index, iterate.
How it works
You pick a name type and it asks ComfyUI for the filename list of that category - the same list a loader's drop-down would show. It returns the whole list, the count, and (if you give it an index) the single name at that position.
The inputs and outputs
- name_type (enum, 11 choices) - which registry to read. The list:
ckpt_name,clip_name,clip_vision_name,control_net_name,gligen_name,lora_name,sampler_name,scheduler,style_model_name,unet_name,vae_name. Samplers and schedulers are enumerable here too, which is handy since those don't live in folders. - i (INT, optional) - an index into the list, if you want one specific entry.
Outputs:
- 名称列表 (LIST) - every name in the category.
- 选择数量 (INT) - how many there are.
- 下标名称 (*) - the name at index
i. This is the one you'd wire into a loader's filename input, or into a loop to run through several models.
Install
Standard pack install, zero extra dependencies:
cd ComfyUI/custom_nodes
git clone https://github.com/yanlang0123/ComfyUI_Lam
and restart. No models, no patch.
Common issues
- Empty list - the folder is genuinely empty, or ComfyUI hasn't scanned it yet after you dropped files in. Restart ComfyUI so it re-scans the model directory.
- 下标名称 comes back wrong - off-by-one thinking: the list is 0-indexed, so the first model is index 0. Combined with a loop, this is the classic way to batch-run every LoRA you own.
- "sampler_name" doesn't show your files - samplers/schedulers are built into ComfyUI, not folders; the list reflects what the backend supports, not your disk.
It's a small node, but it's the difference between a static picker and a workflow that can drive itself over your whole model library.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| name_type | COMBO | 11 options: ckpt_name, clip_name, clip_vision_name, control_net_name, gligen_name, lora_name, +5 | |
| iopt | INT | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| 名称列表 | LIST | — |
| 选择数量 | INT | — |
| 下标名称 | * | — |