I've made an Extension "Embedding Merge"! #7659
Replies: 4 comments 7 replies
-
I've added it to the index |
Beta Was this translation helpful? Give feedback.
-
I've updated the extension, now it supports entering tokens by their indices! This allows to merge things of different lengths by adding some non-zero padding to the shortest term. But my personal experiments didn't show any strong benefit from using this. The syntax: (2653 is the index of token "word ", 3306 is "hello " and 1002 is "world ")
Such concatenation has the highest priority since it directly composes the string before any other operations. |
Beta Was this translation helpful? Give feedback.
-
Please help! I've often used this extension to simplify work in WebUI by combining frequently used tokens into one embedding, but recently the extension stopped working - instead of a normally working embedding in the "Embeddings" folder there is a file _EmbeddingMerge_temp.pt, opening it with WinPAR I see that where there should be data there is NUL NUL NUL NUL.... I am using the fully updated version of WebUI. i find this extension very useful and necessary, and it is very sad that i can't use it anymore. Help! |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for your extension, it's really very useful to me, but I have a question. How can I compile this prompt: (pixel art:1.5), pixelated? Once the file is created it is as if the round brackets and the :1.5 disappear from the token |
Beta Was this translation helpful? Give feedback.
-
Here is the repo: https://github.com/klimaleksus/stable-diffusion-webui-embedding-merge
It creates a tab titled "EM" where you can check text tokenization to see characteristics of individual token vectors:
Also it intercepts your txt2img and img2img prompts at runtime, to let you use new special syntax for merging words or phrases together!
For example, writing something like this:
Might give you an image like that:
Full generate info…
Detailed documentation is available both at the main page of repository, and also inside the extension itself on its tab.
EmbeddingMerge plays nicely with other extensions like Dynamic Prompts and with custom scripts, notably X/Y/Z plot:
Since my approach is heavily dependent on a few WebUI internals, there is high chance that someday this extension will stop working – in that case, drop an Issue on my repo and I'll try to fix things up!
Also it means that it will work properly only on latest WebUI commits, every time.
Beta Was this translation helpful? Give feedback.
All reactions