Skip to content
ljleb edited this page Jun 8, 2023 · 26 revisions

A: GhostMix civitai

B: Lyriel civitai

C: Realistic Vision v2.0 civitai

alpha: 0.5

beta: 0.5

M: resulting merged model with weights_clip = False

wc: resulting merged model with weights_clip = True

a cat as a DJ at the turntables
Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 1897848000, Size: 512x716

weighted_sum

$$M = (1 - \alpha)\times A + \alpha B$$

A B M wc
A-00000-1897848000-d7465e52e1-512x712 B-00001-1897848000-ec6f68ea63-512x712 weighted_sum-00002-1897848000-1dd5f6541e-512x712 00013-1897848000-58631ab33c-512x712

add_difference

Note, in this case C is SD 1.5 base model hf

$$M = A + \alpha (B - C)$$

A B C M wc
A-00000-1897848000-d7465e52e1-512x712 B-00001-1897848000-ec6f68ea63-512x712 v15-00005-1897848000-e1441589a6-512x712 add_difference-00004-1897848000-644917aa08-512x712 00000-1897848000-7bc4550f85-512x712

weighted_subtraction

$$ M = \frac{(A - \alpha \times \beta \times B)}{(1 - \alpha \times \beta)} $$

A B M wc
A-00000-1897848000-d7465e52e1-512x712 B-00001-1897848000-ec6f68ea63-512x712 weighted_subtraction-00003-1897848000-62c7196409-512x712 00014-1897848000-04d532f764-512x712

sum_twice

$$M = (1-\beta)\left[(1 - \alpha) \times A + \alpha B \right]+\beta C$$

A B C M wc
A-00000-1897848000-d7465e52e1-512x712 B-00001-1897848000-ec6f68ea63-512x712 C-00006-1897848000-21c6d51e3e-512x712 sum_twice-00007-1897848000-c035585f1d-512x712 00001-1897848000-f08437c423-512x712

triple_sum

$$M = (1 - \alpha - \beta) \times A + \alpha B + \beta C$$

A B C M wc
A-00000-1897848000-d7465e52e1-512x712 B-00001-1897848000-ec6f68ea63-512x712 C-00006-1897848000-21c6d51e3e-512x712 triple_sum-00008-1897848000-b111708d33-512x712 00000-1897848000-11782b2c94-512x712

similarity_add_difference

$$ M=M(\alpha, \beta, A, B, C) $$

A B C M wc
A-00000-1897848000-d7465e52e1-512x712 B-00001-1897848000-ec6f68ea63-512x712 C-00006-1897848000-21c6d51e3e-512x712 similarity_add_difference-00009-1897848000-8d1769fa10-512x712 00000-1897848000-101e38e86c-512x712

transmogrify_distribution

$$ M = M(A, B) $$

A B M wc
A-00000-1897848000-d7465e52e1-512x712 B-00001-1897848000-ec6f68ea63-512x712 transmogrify-00010-1897848000-d8d919b3ad-512x712 00000-1897848000-4d51a768e7-512x712

tensor_sum

$$ M = M(\alpha, \beta, A, B) $$

A B M wc
A-00000-1897848000-d7465e52e1-512x712 B-00001-1897848000-ec6f68ea63-512x712 tensor_sum-00011-1897848000-51f6fff508-512x712 00012-1897848000-229a1c0931-512x712

multiply_difference

$$ M = C + S(|(A - C)^{1 - \alpha} (B - C)^\alpha|, (1 - \beta)\times A + \beta B - C) $$

Where $S(v, u)$ copies the signs of $u$ and applies them to $v$ element-wise.

More information here.

A B C M wc
43510-1897848000-a cat as a DJ at the turntables 43511-1897848000-a cat as a DJ at the turntables 43512-1897848000-a cat as a DJ at the turntables 44106-1897848000-a cat as a DJ at the turntables 44110-1897848000-a cat as a DJ at the turntables