cheald / sd-webui-loractl

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

Use of comma as breakpoints causes X/Y/Z plotter to parse prompt incorrectly. #28

Open local306 opened 7 months ago

local306 commented 7 months ago

How challenging would it be to modify the code for this extension to use a different character other than the comma to define break points?

When trying to iterate changes in strength and / or timing of a LORA network using the X/Y/Z plotter script, the comma used to define changes in values for the LORA network messes up the parsing of the prompts. Example, <loractl:network:0@0, 0.5@0.5> confuses the parser because it reads the comma in between setpoints.

ljleb commented 7 months ago

XYZ values use CSV syntax. For cases like this, you can enclose any csv value with commas by " and no space between the comma separator and the quoted values. For your example, you'd use i.e.:

"<loractl:network:0@0, 0.5@0.5>","<loractl:network:1@0, 0.25@0.6>"
local306 commented 7 months ago

@ljleb awesome! I will give this a go once my A1111 is done rebuilding. Been having issues with some error regarding tensors forming NaNs in Unet when generating stuff, but that's a different fire to put out 😅