cheald / sd-webui-loractl

An Automatic1111 extension for dynamically controlling the weights of LoRAs during image generation
MIT License
239 stars 10 forks source link

Weight in highres fix defaults to 1 #4

Closed catboxanon closed 1 year ago

catboxanon commented 1 year ago

Currently, if a LoRA is entered in the prompt as something like <lora:name:0.5>, and highres fix is enabled, if you enable plotting the weights it can be seen it jumps back to 1 in the highres fix pass. I've had to workaround this by entering <lora:name:0.5:hr=0.5>.

This is unrelated to #2 as I'm only entering the LoRA in the main prompt, and not the separate highres fix prompt.

I also don't think tests currently account for this which may explain how it got overlooked.

cheald commented 1 year ago

Ah, good catch. The hr weights weren't defaulting to their low-res equivalents correctly.

2bd6608ca445cf7fd0384667eb9e8f35544c48cb extracts the weight setup routine to its own easily-testable function, corrects the behavior, and adds tests.