A collection of custom nodes for ComfyUI that allow working with LoRAs and trigger words by index selection.
- Place these files in a folder named
ComfyUI-loras-loader
inside thecustom_nodes
directory of your ComfyUI installation - Restart ComfyUI
- The nodes will appear in the node menu
Loads a LoRA by its numerical index in your sorted loras folder.
- model: The base model to apply the LoRA to
- index: The numerical index of the LoRA in your alphabetically sorted loras folder
- lora_list: A dropdown showing all available LoRAs (the selection is visual only, the index determines which one is loaded)
- strength_model: The strength to apply to the model part of the LoRA
- strength_clip: The strength to apply to the CLIP part of the LoRA
- clip (optional): The CLIP model to apply LoRA to (if applicable)
- MODEL: The model with the LoRA applied
- CLIP: The modified CLIP model (if provided)
Returns a LoRA filename selected by index from a list of user-defined LoRA names. This can be connected directly to a standard "Load LoRA" node.
- index: The numerical index to select from the LoRA names list
- LoRAnames: Multiline text input with one LoRA filename per line
- lora_name: The selected LoRA filename, compatible with the standard "Load LoRA" node
Returns a text string selected by index from a list of user-defined trigger words or phrases.
- index: The numerical index to select from the trigger words list
- triggers: Multiline text input with one trigger word or phrase per line
- STRING: The selected trigger word or phrase
- Load a base model with a checkpoint loader
- Connect the model to the "LoRA Loader (by Index)" node
- Set the index to select a specific LoRA (e.g., 0 for the first LoRA alphabetically)
- Adjust strength_model and strength_clip as needed
- Use the output model for your image generation
- Create a "LoRAname (by Index)" node
- Enter your desired LoRA filenames in the multiline text field
- Connect its output to a standard "Load LoRA" node's lora_name input
- Change the index to dynamically select different LoRAs
- Connect your model and adjust strength as needed
- Create a "Trigger Words (by Index)" node
- Enter your trigger words/phrases in the multiline text field
- Connect its output to a text input in your workflow
- Change the index to dynamically select different trigger words