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

Same name v1 and vXL embedding only show as v1 #290

Closed
silveroxides opened this issue Jun 10, 2024 · 2 comments
Closed

Same name v1 and vXL embedding only show as v1 #290

silveroxides opened this issue Jun 10, 2024 · 2 comments

Comments

@silveroxides
Copy link

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

@DominikDoom
Copy link
Owner

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.

@silveroxides
Copy link
Author

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.

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

No branches or pull requests

2 participants