Index LoRA Loader (TJ)
Sweep your LoRA library by number — the loader that plays well with queue loops
- model
- clip
- MODEL
- CLIP
- lora_name
- current_index
- total_count
Index LoRA Loader (TJ) lets you pick a LoRA by position number instead of by scrolling a dropdown, and that one choice makes automated sweeping possible. Connect a Queue Loop's index output to the index input and each queue iteration loads a different LoRA from your folder - LoRA #1 on pass 1, #2 on pass 2, and so on. It's the loader half of a "test every LoRA in this folder against the same prompt" workflow, which is a job ComfyUI makes surprisingly awkward with normal loaders.
How it works
The node keeps a numbered list of LoRAs from your models/loras folder (and subfolders - folder_filter narrows the list to one subfolder if you want to sweep only part of your collection). index is 1-based: 1 is the first LoRA in the active list. Because you can connect index to a loop, the selection becomes data rather than a hand-picked widget.
The list itself isn't a flat list of one - you get up to 20 lora_N + strength_N slots, so the "index" selects a combination of up to 20 LoRAs applied together. [none] slots are excluded from the active count and skipped, which is how you build a sweep of "one or two LoRAs at a time." Each slot's strength applies to both model and clip.
overflow_mode decides what happens when the index runs past the end of the list, and this is the setting that determines whether your sweep dies or loops:
ERROR- raise an error. Safest, but it stops the queue.CLAMP- hold at the last index, so later passes just repeat the final LoRA.LOOP- wrap around to the start and keep going.BYPASS- stop applying LoRAs entirely; pass the raw model/clip through.
Inputs and outputs that matter
model,clip- what gets patched.index- which combination to load (connect Queue Loop's index here).folder_filter- restrict to a subfolder.overflow_mode- the end-of-list policy.lora_1…lora_20,strength_1…strength_20- the combos being indexed.- Wireless:
get_name_model,get_name_clip,get_name_index,auto_set.
Outputs: MODEL, CLIP (patched), plus lora_name (which one is active), current_index, and total_count - the last two are exactly what a Queue Loop needs to size itself.
Install
ComfyUI Manager → Install Custom Nodes → search TJ_NODE, or:
cd ComfyUI/custom_nodes
git clone https://github.com/designloves2/ComfyUI-TJ_NODE
Restart ComfyUI. No extra dependencies or models. Category: ✨ TJ_Node/Loaders.
The pairing you'll actually use
The pack ships a purpose-built companion, Index LoRA Loader Counter (TJ), which reports how many LoRAs are active in your loader without a graph link - wire its total_count into Queue Loop's queue_count and the sweep runs exactly as many passes as there are LoRAs. You can't do that by connecting the loader directly to the Queue Loop's count input, because that would create a circular dependency and ComfyUI refuses to run it; the Counter exists precisely to sidestep that. Set overflow_mode to CLAMP or LOOP as a belt-and-suspenders in case your index ever overshoots, and you've got a hands-off LoRA test harness.
Inputs (49)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| clip | CLIP | — | |
| index | INT | 11–20 | 1부터 시작. 첫 번째 LoRA는 index 1. |
| auto_set | BOOLEAN | false | — |
| folder_filter | COMBO | (all) | 폴더를 선택하면 해당 폴더의 LoRA를 슬롯에 자동으로 채웁니다. 슬롯은 이후에도 직접 수정 가능합니다. |
| overflow_mode | COMBO | ERROR | 4 options: ERROR, CLAMP, LOOP, BYPASS |
| get_name_model | COMBO | (none) | 1 options: (none) |
| get_name_clip | COMBO | (none) | 1 options: (none) |
| get_name_index | COMBO | (none) | 1 options: (none) |
| lora_1 | COMBO | [none] | 슬롯 1. [none]이면 활성 목록에서 제외합니다. |
| strength_1 | FLOAT | 1.00-20–20 | 슬롯 1의 LoRA 강도. model/clip 양쪽에 동일하게 적용됩니다. |
| lora_2 | COMBO | [none] | 슬롯 2. [none]이면 활성 목록에서 제외합니다. |
| strength_2 | FLOAT | 1.00-20–20 | 슬롯 2의 LoRA 강도. model/clip 양쪽에 동일하게 적용됩니다. |
| lora_3 | COMBO | [none] | 슬롯 3. [none]이면 활성 목록에서 제외합니다. |
| strength_3 | FLOAT | 1.00-20–20 | 슬롯 3의 LoRA 강도. model/clip 양쪽에 동일하게 적용됩니다. |
| lora_4 | COMBO | [none] | 슬롯 4. [none]이면 활성 목록에서 제외합니다. |
| strength_4 | FLOAT | 1.00-20–20 | 슬롯 4의 LoRA 강도. model/clip 양쪽에 동일하게 적용됩니다. |
| lora_5 | COMBO | [none] | 슬롯 5. [none]이면 활성 목록에서 제외합니다. |
| strength_5 | FLOAT | 1.00-20–20 | 슬롯 5의 LoRA 강도. model/clip 양쪽에 동일하게 적용됩니다. |
| lora_6 | COMBO | [none] | 슬롯 6. [none]이면 활성 목록에서 제외합니다. |
| strength_6 | FLOAT | 1.00-20–20 | 슬롯 6의 LoRA 강도. model/clip 양쪽에 동일하게 적용됩니다. |
| lora_7 | COMBO | [none] | 슬롯 7. [none]이면 활성 목록에서 제외합니다. |
| strength_7 | FLOAT | 1.00-20–20 | 슬롯 7의 LoRA 강도. model/clip 양쪽에 동일하게 적용됩니다. |
| lora_8 | COMBO | [none] | 슬롯 8. [none]이면 활성 목록에서 제외합니다. |
| strength_8 | FLOAT | 1.00-20–20 | 슬롯 8의 LoRA 강도. model/clip 양쪽에 동일하게 적용됩니다. |
| lora_9 | COMBO | [none] | 슬롯 9. [none]이면 활성 목록에서 제외합니다. |
| strength_9 | FLOAT | 1.00-20–20 | 슬롯 9의 LoRA 강도. model/clip 양쪽에 동일하게 적용됩니다. |
| lora_10 | COMBO | [none] | 슬롯 10. [none]이면 활성 목록에서 제외합니다. |
| strength_10 | FLOAT | 1.00-20–20 | 슬롯 10의 LoRA 강도. model/clip 양쪽에 동일하게 적용됩니다. |
| lora_11 | COMBO | [none] | 슬롯 11. [none]이면 활성 목록에서 제외합니다. |
| strength_11 | FLOAT | 1.00-20–20 | 슬롯 11의 LoRA 강도. model/clip 양쪽에 동일하게 적용됩니다. |
| lora_12 | COMBO | [none] | 슬롯 12. [none]이면 활성 목록에서 제외합니다. |
| strength_12 | FLOAT | 1.00-20–20 | 슬롯 12의 LoRA 강도. model/clip 양쪽에 동일하게 적용됩니다. |
| lora_13 | COMBO | [none] | 슬롯 13. [none]이면 활성 목록에서 제외합니다. |
| strength_13 | FLOAT | 1.00-20–20 | 슬롯 13의 LoRA 강도. model/clip 양쪽에 동일하게 적용됩니다. |
| lora_14 | COMBO | [none] | 슬롯 14. [none]이면 활성 목록에서 제외합니다. |
| strength_14 | FLOAT | 1.00-20–20 | 슬롯 14의 LoRA 강도. model/clip 양쪽에 동일하게 적용됩니다. |
| lora_15 | COMBO | [none] | 슬롯 15. [none]이면 활성 목록에서 제외합니다. |
| strength_15 | FLOAT | 1.00-20–20 | 슬롯 15의 LoRA 강도. model/clip 양쪽에 동일하게 적용됩니다. |
| lora_16 | COMBO | [none] | 슬롯 16. [none]이면 활성 목록에서 제외합니다. |
| strength_16 | FLOAT | 1.00-20–20 | 슬롯 16의 LoRA 강도. model/clip 양쪽에 동일하게 적용됩니다. |
| lora_17 | COMBO | [none] | 슬롯 17. [none]이면 활성 목록에서 제외합니다. |
| strength_17 | FLOAT | 1.00-20–20 | 슬롯 17의 LoRA 강도. model/clip 양쪽에 동일하게 적용됩니다. |
| lora_18 | COMBO | [none] | 슬롯 18. [none]이면 활성 목록에서 제외합니다. |
| strength_18 | FLOAT | 1.00-20–20 | 슬롯 18의 LoRA 강도. model/clip 양쪽에 동일하게 적용됩니다. |
| lora_19 | COMBO | [none] | 슬롯 19. [none]이면 활성 목록에서 제외합니다. |
| strength_19 | FLOAT | 1.00-20–20 | 슬롯 19의 LoRA 강도. model/clip 양쪽에 동일하게 적용됩니다. |
| lora_20 | COMBO | [none] | 슬롯 20. [none]이면 활성 목록에서 제외합니다. |
| strength_20 | FLOAT | 1.00-20–20 | 슬롯 20의 LoRA 강도. model/clip 양쪽에 동일하게 적용됩니다. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| CLIP | CLIP | — |
| lora_name | STRING | — |
| current_index | INT | — |
| total_count | INT | — |