DominikDoom / a1111-sd-webui-tagcomplete

Booru style tag autocompletion for AUTOMATIC1111's Stable Diffusion web UI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Same name v1 and vXL embedding only show as v1

silveroxides opened this issue · comments

Currently if there is two embeddings with the same name but for different Stable Diffusion architectures, the v1 version is the only one shown in the list. Currently it is possible to convert v1 embeddings for use with SDXL and as such they often have same name.
I suggest that if there are more than one embedding with same name, that both be shown as separate entries rather than defaulting to v1.
references on extension that allows for creating embeddings for both v1 and vXL and a huggingface space that allows for converting v1 to vXL:
Extension stable-diffusion-webui-embedding-merge
Relevant discussion in extension
Huggingface space Embedding converter

The extension was already model-aware, there was just a bug resulting in the skipped embeddings (non-matching model version) to override the loaded ones on name collisions. This is now fixed.

It will now show either the XL or v1 version, depending on which model type you are currently using. But it still doesn't list both at the same time, since this is not supported from the webui's standpoint.

The webui has two dictionaries - loaded and skipped embeddings. They are registered using their name as the key, not by their full path - meaning that if two embeddings for the same model type have the same name, the last encountered one will override the earlier one. TAC reads from these dictionaries directly, it can only see what the webui sees. I can only show v1/2/XL separately because I combine loaded and skipped before looping through them, but this combination will also merge / override embeddings with the same key / name.

I could potentially solve this so that TAC will keep these entries separate based on their version, but it doesn't make much sense. Since the webui only ever considers the name registered in the loaded dictionary, regardless of which version you would select in the completion dropdown, it will only choose the model-matching one when you hit generate. So more than anything else, the original bug was just a visual issue - it can't result in the wrong embedding being picked by the webui.

I understand. This works great. I have 2600 embedding so you can imagine the difficulty keeping track if the one that says v1 is just a v1 or if I also have a vXL with same name. Also this solves the discussion I had in the other extension. Thank you very much.