Sequential and Parallel processing of Hypernetworks#4334
Closed
aria1th wants to merge 15 commits intoAUTOMATIC1111:masterfrom
Closed
Sequential and Parallel processing of Hypernetworks#4334aria1th wants to merge 15 commits intoAUTOMATIC1111:masterfrom
aria1th wants to merge 15 commits intoAUTOMATIC1111:masterfrom
Conversation
Contributor
|
Really cool. Do the weights have to add to 1.0? or are they scaled relative to one another - for example are a 3.0 weight on one and 1.0 weight on another automatically scaled to 0.75 and 0.25 respectively? |
Collaborator
Author
|
@captin411 Currently no, you have to set values sum to 1.0. I'm not even getting any proper results with non-1 sum, so I'll add auto normalization very soon. Within 20 minutes, hold on! And finished |
Collaborator
Author
why those k-v pair was shuffled? revert assertion
fix and cleanup
Fixes and reduces memory usage too
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This allows processing multiple HN sequentially, or in parallel.
How?
.hns file extension can be used for
Hypernetwork Structures. This structure cannot be trained..hns file uses standard python syntaxes. Only str, list, set, dict, and tuple is allowed.
Example file
[{('a-1', 0.45):0.5, ('ta', 0.45):0.5}, 'p']
Definition
Tuples ( ) are only used to specify Hypernetwork Strength.
('HYPER', 0.1)
Apply HYPER hypernetwork with 0.1 strength('HYPER')
Equals to Singletons, 'HYPER', {'HYPER'}, ['HYPER'], or ('HYPER, 0.1)Set are used when parallel processing with equal weighted sum is desired.
{"HN A", "HN B", "HN C"}
Process HN A(x)+ HN B(x)+ HN C(x) then do averageDictionaries (or, Maps) are used when parallel processing with Custom weights are desired.
NOTE: Weights sum should be 1, or it will produce weird results.
{"HN A": 0.1, "HN B" : 0.2, "HN C": 0.7}
Process HN A(x)*0.1 + HN B(x)*0.2 + HN C(x)* 0.7String-covered dictionaries / etc
To do some complex processing, dictionaries can be covered by ' or ".
{'{"First A" : 0.5, "First B" : 0.5}' : 0.2, "Next" : 0.8}
Process First A and First B as Parallel. Then get the result, do the weighted sum with Next as 0.2, 0.8As you expect, you can see those files in selection menu, and do processing as if its normal Hypernetwork File.
Fixed compatibility with 3.7 and tested.
Needs check for memory managements