[GH-ISSUE #316] Alias/Chant question. #221

Closed
opened 2026-10-30 21:21:12 +00:00 by bsakaguchi · 4 comments
Owner

Originally created by @ShockWave2048 on GitHub (Feb 16, 2025).
Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/316

Hi DominikDoom!
How to pass some lora value to alias, for example "<my_alias_for_lora:0.4> -> <lora:LORA_NAME:0.4>, lora_tag_1, lora_tag_2, ...."?
Thanks for answer!

Originally created by @ShockWave2048 on GitHub (Feb 16, 2025). Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/316 Hi [DominikDoom](https://github.com/DominikDoom)! How to pass some lora value to alias, for example "\<my_alias_for_lora:**0.4**\> -> \<lora:LORA_NAME:**0.4**\>, lora_tag_1, lora_tag_2, ...."? Thanks for answer!
Author
Owner

@DominikDoom commented on GitHub (Feb 16, 2025):

I recommend the built-in webui functionality to set activation keywords. TAC will respect these settings and add the keywords specified there to either the start or end of the prompt automatically when you choose the lora from the <... completion list. It will also use the set preferred weight. You can add these through the webui's extra network gallery:
Image
Image

The only downside to that approach is that you can't give it a custom alias but have to use the real lora name.
If the alias is a must have for you, you can also add it as a chant, but these will not work together with the existing lora features from the webui or lora-specific features from TAC like the preview thumbnails in the completion list.

Something like this:

{
      "name": "my_alias_for_lora",
      "terms": "lora,topic,test",
      "content": "<lora:LORA_NAME:0.4>, lora_tag_1, lora_tag_2, ...",
      "color": 3
},

would make the chant searchable by both the name and each of the words in terms (like search keywords), and use the content for what's inserted into the prompt. But the weight would be static and need to be adjusted after inserting.

<!-- gh-comment-id:2661441096 --> @DominikDoom commented on GitHub (Feb 16, 2025): I recommend the built-in webui functionality to set activation keywords. TAC will respect these settings and add the keywords specified there to either the start or end of the prompt automatically when you choose the lora from the `<...` completion list. It will also use the set preferred weight. You can add these through the webui's extra network gallery: ![Image](https://github.com/user-attachments/assets/9f1f6ec8-8e98-41c3-8fd0-898ecf8f42d1) ![Image](https://github.com/user-attachments/assets/8ea23118-1bd6-4a34-8cd3-924f10613b0c) The only downside to that approach is that you can't give it a custom alias but have to use the real lora name. If the alias is a must have for you, you can also add it as a chant, but these will not work together with the existing lora features from the webui or lora-specific features from TAC like the preview thumbnails in the completion list. Something like this: ```json { "name": "my_alias_for_lora", "terms": "lora,topic,test", "content": "<lora:LORA_NAME:0.4>, lora_tag_1, lora_tag_2, ...", "color": 3 }, ``` would make the chant searchable by both the name and each of the words in terms (like search keywords), and use the content for what's inserted into the prompt. But the weight would be static and need to be adjusted after inserting.
Author
Owner

@ShockWave2048 commented on GitHub (Feb 16, 2025):

I don't need to unpack the string in the prompt (before rendering), I just need an alias that sits in the prompt without changes, but substitutes the lora, tags and weight when starting the inference. I don't need a preset weight, I need exactly the weight that i set in the alias. Not preferred weight.

<!-- gh-comment-id:2661486344 --> @ShockWave2048 commented on GitHub (Feb 16, 2025): I don't need to unpack the string in the prompt (before rendering), I just need an alias that sits in the prompt without changes, but substitutes the lora, tags and weight when starting the inference. I don't need a preset weight, I need exactly the weight that i set in the alias. Not preferred weight.
Author
Owner

@DominikDoom commented on GitHub (Feb 16, 2025):

Ah, I see, I misunderstood. But that's not really what this extension is for, then. TAC is only concerned about direct user input, what you want is more in the direction of a prompt preprocessor.

The built-in webui style menu would work to keep it out of the prompt, but that doesn't allow custom weighting.
Other than that, there are a few extensions around for preprocessing. Something like dynamic promps, wildcards, style variables, etc. But I don't personally know any that allow passing the weight from the alias there either - it might be possible with some of them, I just don't know any of them well enough to give you a direct answer.
But I would still recommend you look around in that direction, maybe you'll find something.

<!-- gh-comment-id:2661546464 --> @DominikDoom commented on GitHub (Feb 16, 2025): Ah, I see, I misunderstood. But that's not really what this extension is for, then. TAC is only concerned about direct user input, what you want is more in the direction of a prompt preprocessor. The built-in webui style menu would work to keep it out of the prompt, but that doesn't allow custom weighting. Other than that, there are a few extensions around for preprocessing. Something like dynamic promps, wildcards, style variables, etc. But I don't personally know any that allow passing the weight from the alias there either - it might be possible with some of them, I just don't know any of them well enough to give you a direct answer. But I would still recommend you look around in that direction, maybe you'll find something.
Author
Owner

@ShockWave2048 commented on GitHub (Feb 16, 2025):

Thank you for your detailed answer!

<!-- gh-comment-id:2661554542 --> @ShockWave2048 commented on GitHub (Feb 16, 2025): Thank you for your detailed answer!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DominikDoom/a1111-sd-webui-tagcomplete#221
No description provided.