mirror of
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
synced 2026-11-05 00:17:25 +00:00
[GH-ISSUE #273] Embedding suggestions not working under Diffusers backend. [SDNext] #189
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
low priority
low priority
pull-request
question
waiting for feedback
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DominikDoom/a1111-sd-webui-tagcomplete#189
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @paypah on GitHub (Feb 6, 2024).
Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/273
Having this issue for a bit on Vlad's fork SDNext. Started after a certain merge from dev a little while back but I'm not sure exactly when anymore. Current master and dev branch seems to have this issue for me. Was holding out that it might fix itself as I had another issue regarding embeddings that Vlad fixed.
Embeddings as suggestions are not coming up when trying to invoke them. Loras seem to be still working fine. TAC works when using A1111 but the code base is so different at this point, probably not worth mentioning, but at least that would mean its not an issue with a certain embedding?
It looks like in the temp folder under
emb.txtnone of the embeddings are getting written to it. For comparison since the Lora suggestions load, it's file is populated.@DominikDoom commented on GitHub (Feb 7, 2024):
Tag Autocomplete currently acquires the embedding list from the webui's internal dictionary, for performance and to make the version display work. The issue with that is that this dictionary only gets populated once a model was loaded.
For whatever reason, for the last few versions of SD.Next (both dev and stable) the "Model autoload on server start" option just doesn't work anymore, so the model gets only loaded once you click Generate or change to a different one (or obviously if this option has been disabled on purpose).
This means the embedding info isn't available to Tag autocomplete at startup.
There is a workaround:
Model loaded in 5.35 { load=0.10 create=3.62 apply=0.36 vae=0.37 move=0.63 embeddings=0.23 }, as you can see embeddings get loaded alongside there.For the long term, I am investigating if there is some elegant way to use the list shown in the extra networks tab as a placeholder until the model info is available, so at least the names will be listed even if the version info will be missing. Alongside that, an automatic check for changes when starting an embedding completion could also be an option, but I have to be careful there as some people have gigantic embedding collections which could be bad for performance.
@paypah commented on GitHub (Feb 7, 2024):
Yeah I remember the
Model autoload on server startoption wasn't working for me for awhile.. but it's been working as of current dev now (for me at least).The initial embedding load on model autoload skips 99% (1 loaded vs 73 skipped) but after doing an Extra Networks refresh it shows normally. Even with that "1" embedding loaded, it doesn't show up in the emb.txt file. For refreshing extra networks, I can see the lora.txt file updating on each refresh but the embedding one still isn't. Just on initial model loads will show via "Date Modified" that it's at least accessing the embedding txt file, but not doing anything with it.
A random side note, in the TAC settings, the refresh TAC temp files is missing the refresh button?
@DominikDoom commented on GitHub (Feb 7, 2024):
Hm strange, if the embeddings get loaded by the model it should definitely be available to TAC afterwards. At least if it's normal SD1/2/XL embeddings, I haven't tried if it works with diffusers admittedly. Which type of model and embed are you using?
As for the refresh button in settings, it is explicitly hidden by SD.Nexts CSS, with a custom rule that targets only its ID and nothing else, for almost as long as it exists. Guess Vlad didn't like that method and wanted to hide it, or maybe there were issues with it on SD.Next compared to vanilla a1111. But no clue why it only targets the refresh button instead of the full setting. Might also just be an oversight. Either way, it's out of my control.
@paypah commented on GitHub (Feb 7, 2024):
I've moved back to SD1.5 models and embeds, however IIRC when I had some XL models/embeds it was the same. You know what, I didn't even think to check the Original backed. It is a Diffusers based issue. Embeddings are loading fine via Original backend, but not on Diffusers. I switched over to Diffusers awhile back and have been using it exclusively since.
Ah okay! I wasn't sure if it was necessary to add in but just wanted to mention it in case it had any bearing haha.
@DominikDoom commented on GitHub (Feb 9, 2024):
They should load now. The reload workaround still applies in case it is needed.
The problem was a bit tricky to find, but it was actually two things combined:
@paypah commented on GitHub (Feb 10, 2024):
Sounds good! Thanks for taking a look into it!
I already have embeddings organized by folder so shouldn't take more than a moment to append the version to their names haha.