Extraltodeus / LoadLoraWithTags

Save/Load trigger words for loras from a json and auto fetch them on civitai if they are missing. Optional prompt input to auto append them (togglable). Actual alphabetical order and print trigger words to terminal. Also bypass toggle to disable without aiming the sliders at 0.
56 stars 8 forks source link

Way to get tags from metadata of lora without needing to load a model #9

Open ewebgh33 opened 2 months ago

ewebgh33 commented 2 months ago

As title says, is there a way to get tags out, without having to load a model into VRAM?

Setting up a workflow Tried these nodes Tried to queue a text dispay to show the tags from metadata Error: connect model and clip Why?

Why is the model needed to queue to the output of the lora's metadata tags? Loading models is slow - reading metadata should be fast and have nothing to do with what model I have loaded (or not).

It would be really great if tags could be output without having to process the whole chain up to the lora loader.

I was looking at your nodes because I want an integrated lora loader / tag reader to get the trigger words out of loras. With other nodes, the loader is one node, and the metadata reader is a separate node (so I have to choose the lora in two places).

Also Is there a way to get out JUST the keywords / trigger words, not a list of prompts etc? I have folders of loras, and all of them have been processed with the CivitAI Lora Helper extension, which adds json for each Lora containing the trigger words, prompt examples, etc. I guess your node is pulling from two locations - civit, and lora metadata. And I guess lora metadata is NOT the same as the data in the JSON which lists trigger words. As I have already queried Civit for all loras, and now have the data locally, I don't want to have a connection to civit each time I load a lora. While this is good functionality (and I like that I can set to false so it won't connect to internet), it would also be good to check the json that is on the drive with each lora, and pull trigger words from that.

Interested in your thoughts.

Extraltodeus commented 2 months ago

Hello! The node is pretty simple. It gets tags from Civitai and save them in the root of your ComfyUI folder in a file named loratags.json

Check the forks of this project, somebody made a version with added functionnalities which may suit your needs better. I don't intend to modify this one much as I am not too big on loras. I was just annoyed at not remembering the tags.