Closed DooDip closed 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.)
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.
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.
Now it will set weight to 1 when preferred weight is 0.
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!
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!
Nice! Glad to hear that it fixed. Feel free to open another issue if you meet other problem.
Thanks for your report ;D
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 `detailsSo it might not be a problem. I'm running it again without Lora-Block-Weights enabled to see what happens.