Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:CosineA and CosineB #40

Open
wants to merge 11 commits into
base: dev
Choose a base branch
from
Open

feat:CosineA and CosineB #40

wants to merge 11 commits into from

Conversation

WhiteWipe
Copy link

-Added CosineA and -CosineB
-Will add Train Difference soon

@WhiteWipe WhiteWipe changed the title CosineA and CosineB Feat:CosineA and CosineB Jul 11, 2023
@WhiteWipe WhiteWipe changed the title Feat:CosineA and CosineB feat:CosineA and CosineB Jul 11, 2023
@s1dlx
Copy link
Owner

s1dlx commented Jul 11, 2023

thanks for the PR

we also have this in bayes
s1dlx/sd-webui-bayesian-merger#67
which is a cuda implementation of the same technique (?)
possibly it's worth checking if there's any major difference betwee the two

-Optimized smooth add from MariaWitch's in Bayesian Merger
-Fixed some simple math in cosine similarity calculators
-Added experimental extended merge methods based on the new ones 😄
@WhiteWipe
Copy link
Author

Done, also added some experimental methods like for an example cosA_similarity_smooth_add_trained_difference with alpha 0.5, beta 0.5, abyssorangemix3, counterfeit3 and sd v1.5:
image

@WhiteWipe
Copy link
Author

Model A:
image
Model B:
image
Model C:
image

@WhiteWipe
Copy link
Author

There's currently a lot of them. What could be done are probably switches that automatically replace weighted sums in functions with cosA/cosB, difference with train difference and adding the model resulted from a difference back into a normal model with smoothadd.

WhiteWipe and others added 7 commits July 11, 2023 19:10
-Formatting
-Also switched train_diff's multiplier into it instead of making other functions multiply the result manually, for convinience
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants