lifeisboringsoprogramming / sd-webui-lora-masks

Apply unlimited masks to unlimited LoRA models
GNU Affero General Public License v3.0
47 stars 4 forks source link

How can you change it so that weight range is from -5 to 5?? (You also might be able to help with something else too in comment) #4

Closed JS1989git closed 1 year ago

JS1989git commented 1 year ago

Hello. First of all - easily the most useful extension I've used outside of controlnet. Kudos for that.

But I've recently needed to control loras greater than the -1 to 2 range provided. What do I need to do to edit that? I tried editing the .py file changing the -1 value (min value) to -5 in all instances and then compiling another file from that to replace the one in the pycache folder. I don't know if that should have worked or not, I am just learning a lot of these things and really just trying things to see what works and what doesn't. And it didn't work. I tried it again in "additional networks" and that didn't work either.

What do I need to do/edit in order to change that max/min range because I am at a loss.

And the other thing was a post that I made here: https://github.com/IDEA-Research/DWPose/issues/49

I imagine the solution to your lora masks extension is similar to that one. But yeah, I couldn't figure out what to do on that either and still really would like to have the rest of the dw pose models... :\

lifeisboringsoprogramming commented 1 year ago

You can edit the minimum and maximum values on line 74

image

JS1989git commented 1 year ago

You can edit the minimum and maximum values on line 74

image

How do I do this though? Because I tried editing that and the ui still only goes to -1 and 2.

I also then compiled it with cmd "-m compile_py lora_masks.py" in the directory the .py file is in replacing the compiled file in the sub directory, that still didn't work.

I am sorry, I know I am missing something basic, but I can't figure it out... >< Would you possibly be so kind as to walk me through the steps that get the ui to change so that is displays the correct range when I edit that line?

JS1989git commented 1 year ago

Figured it out eventually with some help: You need to delete the ui-config.json file in the webui folder so that the default values are used instead of the saved ones. I backed up my json file first and then also manually edited the json to change the range values in both lora masks and additional networks (because I don't trust things to not be adversely affected that I'd discover later XD) and THAT did work finally.