sd-scripts icon indicating copy to clipboard operation
sd-scripts copied to clipboard

Find Trigger Words from Dreambooth / Lora

Open scor2 opened this issue 2 years ago • 2 comments

Some Dreambooth and Lora has Trigger Words and it doesn't activate without them.

https://civitai.com/models/4219/one-piece-wano-saga-style-lora (For example, this Lora needs "WANOSTYLE" to activate.

But it is hard to remember all trigger words, and often I can't remeber them.

Is there any way to extract Trigger Words from Dreambooth and Lora?

scor2 avatar Feb 08 '23 10:02 scor2

I agree that is indeed a problem.

It would be difficult in principle, but it may be possible to interrogate. It is very interesting, and I will look into it when I can find the time.

kohya-ss avatar Feb 08 '23 23:02 kohya-ss

@kohya-ss What do you think about encouraging this format for sharing? For example, this Textual Inversion embedding is a picture, made here: https://github.com/dfaker/embedding-to-png-script |:---:| |21charturnerv2|

-It can still function and be loaded as a TI. -In github, save png and use, since GH keeps metadata.

Maybe you can encourage this for TI? ..i don't know about loRA files.

ClashSAN avatar Feb 18 '23 14:02 ClashSAN

この問題の解決方法はもう既にありましたのかな?

suwadaimyojin avatar May 02 '23 14:05 suwadaimyojin

この問題の解決方法はもう既にありましたのかな?

networks/lora_interrogatorとして実装しました。確実ではありませんが、場合によっては分かると思います。使用法はpython networks/lora_interrogator.py --helpでご参照ください。

Maybe you can encourage this for TI? ..i don't know about loRA files.

I think it is possible for TI, but it needs a time to investigate. I have no time for that. Sorry for that. About LoRA, it is technically possible, but LoRA models (safetensors) are widely used, so it seems difficult in fact.

kohya-ss avatar May 07 '23 01:05 kohya-ss