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

[WebUI Forge] Cannot reload embeddings instantly #297

Open
bluenyx opened this issue Aug 11, 2024 · 3 comments
Open

[WebUI Forge] Cannot reload embeddings instantly #297

bluenyx opened this issue Aug 11, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@bluenyx
Copy link

bluenyx commented Aug 11, 2024

WebUI : forge - [f2.0.1v1.10.1-previous-222-g33187c26]
python: 3.11.9
torch: 2.4.0+cu124
gradio: 4.40.0

Tag Autocomplete: Cannot reload embeddings instantly: 'StableDiffusionModelHijack' object has no attribute 'embedding_db'
And, I have easynegative, but it's not added.

image
image
image

DominikDoom added a commit that referenced this issue Aug 11, 2024
Resolves some symptoms of #297, but doesn't fix the underlying cause
@DominikDoom
Copy link
Owner

DominikDoom commented Aug 11, 2024

It seems webui forge had a pretty big backend rewrite which broke many extensions.
I tried my best to add fallbacks for its changes, and it should be partially fixed now, but some things are still different from before.

The main things to consider:

  • Like some other implementations (maybe also dependent on settings), the SD model now gets loaded not on startup, but on demand (i.e. once you click generate)
    • TAC uses the webui's internal model database to fast-reload embeddings and figure out if they're SD1/SD2/SDXL, so before the model is loaded, embeddings will show up as "unknown". This is not fixable. Once the model was loaded for the first time, it should show the correct types.
    • This also means that newly added embeddings will only show up after a model switch/reload
    • In some cases, TAC might need a manual refresh (e.g. clicking the refresh button in the Extra networks gallery tabs or using this button in the TAC settings:
      image
  • With this update, forge doesn't include the full file path in the embedding object I access anymore
    • As a result, TAC's setting to sort extra networks by modification date won't work
    • And it also isn't possible anymore to prefix the folder name of the embedding (e.g. negative/...) to only show embeddings of that subfolder (this was possible before, even though the folder prefixes weren't shown in the completion UI)

There might be more changes in the future, as some things in forge still seem broken in general right now and its rewrite isn't finished yet. For example, multiple API endpoints don't work and the TI embeddings extra network tab also doesn't show only the embeddings matching the currently loaded model, but all of them.

Depending on how these are fixed, my workaround might get broken again, so I'm leaving this issue open for the meantime.

@DominikDoom DominikDoom added the bug Something isn't working label Aug 11, 2024
@DominikDoom DominikDoom changed the title Cannot reload embeddings instantly [WebUI Forge] Cannot reload embeddings instantly Aug 11, 2024
@Hazitos
Copy link

Hazitos commented Sep 4, 2024

I am having a very similar bug but with my UI itself not loading certain aspects like, checkpoints, loras, embeddings and even reloading the UI seems to to not work anymore, it just freezes and never finishes. I'll be making a separate bug report about this.

@GeminiSquishGames
Copy link

Interesting. This doesn't even work in forge for me and hasn't for a few months. Same with prompt-all-in-one... but not only them. They really dropped the ball I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants