KohakuBlueleaf / a1111-sd-webui-lycoris

An extension for stable-diffusion-webui to load lycoris models.
Apache License 2.0
861 stars 116 forks source link

can you explain what dyn is and what values ​​can be? #35

Closed nikolaiusa closed 1 year ago

nikolaiusa commented 1 year ago

dyn | How many row you want to utilize when using dylora, if you set to 0, it will disable the dylora

i use lbw here I understand - the weights of the text, the unet and the weights of all blocks

<lyco:"lora name":1:1:lbw=1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, 0,0,0,0,0,0,0,0>

But I don't understand what is dyn...

13? - 20? -1000? Please help maybe it's the Network Rank (Dimension) at which the locon was made?
KohakuBlueleaf commented 1 year ago

if you are not using dylora model, you can simply ignore dyn. for dylora, we use larger matrix to train but will only utilize few of them. And the training method can ensure that you don't need to use svd or other deomposition method to "resize".

And the dyn value is to indicate "What size you want", and you can refer it as the "rank" or "dim" for dylora. It should be 1~n, which n is the original size of dylora.

if you use dyn value for non dylora model like locon or lora. It will break your model. (or, it should)

nikolaiusa commented 1 year ago

what parameters for Kohya DyLoRA are you using? I make lora, lokon, with these settings they work, but dylora does not work... I do different options, a my-dylora.safetensors file is created, but it does not affect the image in any way. I see the output in the console but dilora does not change the output:

Apply LyCORIS model: 000test Text encoder weight: 1.0 Unet weight: 1.0 DyLoRA Dim: 4 I used different parameters, optimizers like this network_dim=32 network_alpha=16 conv_dim=32 conv_alpha=16 unit=8 Can you tell me if I missed something? I:\KOHYA_GUI\kohya_ss>git rev-parse HEAD 30b054b29b4611e19d0c13a63fff402ed0bef4cc
KohakuBlueleaf commented 1 year ago

If your dylora is from kohya's sd-script but not LyCORIS. I think you should use additional-network.

KohakuBlueleaf commented 1 year ago

I don't think my extension will support kohya dylora It may need some convertion

TheOnlyHolyMoly commented 1 year ago

@vladmandic as info/reminder for you if such errors should come up, so you dont have to spend time on troubleshooting.

vladmandic commented 1 year ago

@TheOnlyHolyMoly thanks for the heads up