Giter Site home page Giter Site logo

Comments (6)

DominikDoom avatar DominikDoom commented on June 26, 2024 1

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:

  1. SD.Next uses a different embedding database in the Diffusers backend, so I was only ever reading from the one populated by the original backend. But even with the correct reference:
  2. When loading embeddings in diffusers mode, they aren't assigned a vector shape (either deliberately or as a bug, idk) so my comparison to find out for which SD version they are just skipped them
    • Since I can't show the version info with my normal method, they are currently just listed as "Embedding" with no v1/2/XL beforehand and no color change.
    • I might be able to fix this in a hacky way, but don't really want to spend so much effort on info that is only omitted in this specific scenario. So you'll have to remember or organize by file name which embeds are for SD 1.5, sorry.

from a1111-sd-webui-tagcomplete.

DominikDoom avatar DominikDoom commented on June 26, 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:

  1. Load the model you want to use, either by changing to another one and back or by starting a generation.
  2. After it is loaded, the log should contain something like 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.
  3. Open the Extra networks menu and click the refresh button (doesn't matter which tab you are in)
    • This will force Tag autocomplete to reload all extra network references and will successfully write to the emb.txt temp file.
  4. After the file was populated once, on subsequent cold starts the file should not be overwritten to empty on startup, unless you refresh extra networks without having a model loaded. But it will also not show newly added embeddings until refreshed again.

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.

from a1111-sd-webui-tagcomplete.

paypah avatar paypah commented on June 26, 2024

Yeah I remember the Model autoload on server start option 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?

from a1111-sd-webui-tagcomplete.

DominikDoom avatar DominikDoom commented on June 26, 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.

from a1111-sd-webui-tagcomplete.

paypah avatar paypah commented on June 26, 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.

from a1111-sd-webui-tagcomplete.

paypah avatar paypah commented on June 26, 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.

from a1111-sd-webui-tagcomplete.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.