AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
141.13k stars 26.69k forks source link

[Bug]: Model Merg not working as expected. #7520

Open Hivemind11 opened 1 year ago

Hivemind11 commented 1 year ago

Is there an existing issue for this?

What happened?

while testing merges I noticed that it doesn't interpolate correctly.

Steps to reproduce the problem

make a merge between two models with weights from 0.1 to 0.9

What should have happened?

the two models near the ends 0.1 and 0.9 weights should look similar to the initial models.

Commit where the problem happens

226d840e84c5f306350b0681945989b86760e616

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

xformers

List of extensions

no

Console logs

Don't think it's necessary.

Additional information

See the xy plot

https://i.imgur.com/WNt8CUm.jpg

I am generating an xy plot with random seed and interpolating between two models from 0.1 to 0.9. in this case a model called Z.2 and a model called A.5 What I expected was that the ending Model B.9 would be similar to that of A.5 But its not. so I reversed the order of the way the models were merged and made series C and they are completely different. you can notice that series B and series C seem to interpolate smoothly from the intial model to 0.1 but 0.9 is not like the last model.

I think that the model is only interpolating half as much as it should be. so that 0.9 is actually more like 0.45

DearDhruv commented 1 year ago

True, I feel the same way. Mostly I use the Add Difference for merge. Somehow it is not giving the correct results from the past few days.

ClashSAN commented 1 year ago

@DearDhruv check your previous commit of webui with git reflog model merging should always have been deterministic, when using the same seeds, if not submit an issue.

you can install another webui folder, then git checkout (your commit hash) to use the older version and check for differneces