Yinzo / sd-webui-Lora-queue-helper

A Script that help you generate a batch of Lora, using same prompt & settings. Helpful for compare Lora, Or just switching Lora easily without switch tab.
MIT License
27 stars 2 forks source link

Lora-Queue-Helper and Lora-Block-Weights #3

Closed DooDip closed 7 months ago

DooDip commented 7 months ago

I tested out your script and it worked very well, but the Lora weights turned out to be either 1 or 0. I think because I accidentally had "Lora-Block-Weights" enabled.

Examples taken from the Stable Diffusion output text file:

"<lora:Celeb-Zh_Sjenkins_V1:0>", ZH_SJenkins,,(masterpiece, best quality, highres, high resolution:1.2), extremely detailed, realistic, intricate details

"<lora:Celeb-Melonie_Mac:1>", mlnemc,,(masterpiece, best quality, highres, high resolution:1.2), extremely detailed, realistic, intricate `details

So it might not be a problem. I'm running it again without Lora-Block-Weights enabled to see what happens.

DooDip commented 7 months ago

So far, it appears the next 10 Loras I tried have a weight of 0.

Edit: It appears the script is pulling from JSON files next to the Lora files. A lot of these have a preferred weight of 0 in the JSON file and I'm not sure why. I think this is causing the issue.

Edit2: Without a matching JSON file, the script works and applies a weight of 1. WITH a matching JSON file, it makes the weight 0, no matter what the "preferred weight" is in the JSON file.

(I am not a programmer.)

Yinzo commented 7 months ago

To be sure, the issue you encountered is it "weight of lora sometimes got 0?". This is script will load the preferred weight set in JSON file if there is a JSON file, otherwise it will set the weight to 1.

But this is indeed an issue that the prefered weight is default set as 0. I will change the script, if the preferred weight is 0, it will use 1.

Yinzo commented 7 months ago

You said:

WITH a matching JSON file, it makes the weight 0, no matter what the "preferred weight" is in the JSON file.

This is weird, you change the preferred weight in webui or change it by editting files?

You might change it on webui to prevent breaking the format of the JSON file, and remember to save it after you change on webui. No need to reload webui, the weight you set will be used at the new run. You can change it at the top right conner of lora image when you move the cursor on it, it shows a wrench emoji as a button, click it and it will shows the menu. Please try, that should work.

Yinzo commented 7 months ago

Now it will set weight to 1 when preferred weight is 0.

DooDip commented 7 months ago

Awesome! I'll give it a try. Yes, some JSON files don't have a preferred weight. Or some JSON files have a preferred weight of 0. The script runs, but nothing is changed in the picture. I'll test it out and report back. Thanks!

DooDip commented 7 months ago

Yes, it's working. All the JSON files with 0 now are changed to 1 and change the picture. Thanks! This is a great script!

Yinzo commented 7 months ago

Nice! Glad to hear that it fixed. Feel free to open another issue if you meet other problem.

Thanks for your report ;D