idrirap / ComfyUI-Lora-Auto-Trigger-Words

129 stars 10 forks source link

ComfyUI-Lora-Auto-Trigger-Words

This project is a fork of https://github.com/Extraltodeus/LoadLoraWithTags The aim of these custom nodes is to get an easy access to the tags used to trigger a lora. This project is compatible with Stacked Loras from https://github.com/jags111/efficiency-nodes-comfyui
When I talk about lora, I also mean lycoris too.

Install

Some of this project nodes depends on https://github.com/pythongosssss/ComfyUI-Custom-Scripts :

They get their vanilla equivalents with less features

Overall, Custom-Scripts is recommended to be able to know the content of the tag lists with the node showText

Features

Lora Trigger Words

Lora trigger words are imported from two sources :

image

Vanilla vs Advanced

Vanilla refers to nodes that have no lora preview from the menu, nor the lora list. But the features provided are the same.

image

Nodes

LoraLoader (Vanilla and Advanced)

image INPUT

FIELDS

OUTPUT

FIELDS

OUTPUT

OUTPUT

TagsFormater

image Helper to show the available tag and their indexes. Tags are sorted by training frequence. The more a tag was used, the higher in the list it is. Works for both civitai_tags_list and meta_tags_list

TagsSelector

image Allow to filter tags and apply a weight to it.
TagSelector contains four parameters.

LoraListNames

image List all the existing lora names. It is used as an input for override_lora_name

Filtering

The format is simple. It's the same as python list index, but can select multiple index or ranges of indexes separated by comas. Ex: 0, 3, 5:8, -8:

View Info

image Pythongossss's View Info... feature from ComfyUI-Custom-Scripts

Examples

Example of normal workflow

image

Example of Stacked workflow

image

Chaining Selectors and Stacked

Tags selectors can be chained to select differents tags with differents weights (tags1:0.8), tag2, (tag3:1.1). Lora Stack can also be chained together to load multiple loras into an efficient loaders. image

Side nodes I made and kept here