Open CaptainVarghoss opened 7 months ago
thank your for your feedback!
I've just tested using a SD1.5 model as follow:
..(snip)..
config hash = a0b03d5f552ec770ff274d77a1c86af6c46b198013c4e165ae5dd7505d3038a6
- mm_use [True, False, False, False]
- model_a blessingMix_V1Fp16-vae.safetensors [267ad1beb5]
- base_model None
- max_models 4
- models ['f222-Fp32.safetensors [f300684443]']
- modes ['Sum(lerp)']
- calcmodes ['Normal']
- usembws [['ALL']]
- weights ['0']
- alpha [0.5]
- adjust
- use elemental [False]
- elementals [':time_embed:1,:out:0.6']
model_a = blessingMix_V1Fp16-vae
Loading from file F:\webui\webui\stable-diffusion-webui\models\Stable-diffusion\blessingMix_V1Fp16-vae.safetensors...
isxl = False
compact_mode = True
Loading model f222-Fp32...
Loading from file F:\webui\webui\stable-diffusion-webui\models\Stable-diffusion\f222-Fp32.safetensors...
mode = Sum(lerp), mbw mode, alpha = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
Stage #1/3: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 882/882 [00:00<00:00, 294231.78it/s]
Check uninitialized #2/3: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 882/882 [00:00<00:00, 147045.72it/s]
Save unchanged weights #3/3: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 251/251 [00:00<?, ?it/s]
Clip is fine
- merge processing in 0.2s (prepare: 0.2s).
- precalculated hash = e118c4736f0874a22f97b653b268ae69da0f6999356851c0c7c5dedea33eb287
Saving...
isxl = False
Clip is fine
- check contiguous...
Successfully model saved! - F:\webui\webui\stable-diffusion-webui\models\Stable-diffusion\tmpx1.fp16.safetensors
Done!
- post process in 9.3s (precalculate hash: 6.2s, save model: 3.0s).
(...snip)
as your suggest, all weights are 0.0 and generated images are almost same.
(merged model result)
(non merged)
you can enable "save model" in the Settings->Model-Mixer
and you can test your merged model by SuperMerger's Analysis functionality.
and what you mean different preview? you mean, the live preview is different from the saved image??
(I guess, something was wrong with other extensions)
I was using this extension to fix a merge that had contiguous tensor errors in other extensions and programs (thanks for that!)
During my testing I was attempting to simply pass through an existing model with no actual merging, so I set the multiplier on model B to 0. Clicked generate, confirmed a merge didn't change anything, then saved the checkpoint.
Switched to the new checkpoint and generated the same image using the same seed and prompt, and the image is different.
My first assumption was that something in the contiguous repair had changed the model but after more testing, it seems like no matter what model I use, merging it with nothing shows a preview image differing from what actually saves to file.
This leads me to believe that something IS being merged or changed during 'live' generation, but it's not saved with the checkpoint.
I've attached 3 images with metadata intact.
First is before merger.![20231213_215022_1352062077](https://github.com/wkpark/sd-webui-model-mixer/assets/130285881/476a9579-b9ff-470b-8164-05d61e1173b0)
Second is the preview of merging the checkpoint with itself (B) set to 0 alpha (should produce identical checkpoint and images).![20231213_215137_1352062077](https://github.com/wkpark/sd-webui-model-mixer/assets/130285881/1e8b99f5-4a7d-4ab4-8b54-74a694c2e530)
Third is generated after checkpoint is saved after step 2 above.![20231213_215807_1352062077](https://github.com/wkpark/sd-webui-model-mixer/assets/130285881/a93af09b-cef5-40d7-bc60-1cb9179341bc)
The first and third images are
identicalnearly identical despite the different preview before merge.EXTRA NOTE: While writing this up and re-testing everything to make sure I was testing properly I found that the first and third images ARE in-fact different but they shouldn't be, and even if they are supposed to be different they still don't match the non-saved merge.
tl;dr - The image displayed testing a merge is not the image generated after saving that merge. Expected behavior is that these match exactly.