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

Stopped working after updates #10

Open LizardKing777 opened 7 months ago

LizardKing777 commented 7 months ago

For some reason it stopped working when I did an update. It gets all the way to the progress bar and then gives me a wall of code that ends with this: "/stable-diffusion-webui/extensions/sd-webui-lora-masks/scripts/lora_masksloracompvis.py", line 111, in forward mask = self.mask_dic[area]


    KeyError: 1344"

Then stops rendering.

Have tried turning off other LORA affecting items like Block Weight, Composable Lora and Dynamic Lora Weights. When I don't give it a mask, the rendering proceeds even if the extension activates or replaces the network, so it looks as if it's something to do with how its reading the mask. I've tried indexing the mask (using png) to 256 colors, all that changes it the Key Error becomes 384.

This is one of my favourite extensions - is there a way to fix this?
LizardKing777 commented 7 months ago

Found a solution. Add the changes from this file to the equivalent code in scripts/lora_masks_lora_compvis.py

If you're like me, change lora_module.lora_down.weight.data.cuda to lora_module.lora_down.weight.data.cpu to make it work without a GPU.

https://github.com/siliconflow/sd-webui-onediff-LoRA/commit/a8414b1a0c98fe1914880c9254a471f94b894a67