Open chevyriet opened 10 months ago
Bad practice temporary solution I used for this:
Here's how I built it(sdapi/v1/refresh-embeddings)in api.py, after refreshing the query in the api updated(sdapi/v1/embeddings), but the ui content is not updated.All this is for reference only:
self.add_api_route("/sdapi/v1/refresh-embeddings", self.refresh_embeddings, methods=["POST"])
def refresh_embeddings(self): sd_hijack.model_hijack.embedding_db.load_textual_inversion_embeddings(force_reload=True)
This should be fine to close as done now. @AUTOMATIC1111 @chevyriet
Is there an existing issue for this?
What would your feature do ?
I am currently running 2 instances of the WebUI locally, and that (for performance reasons) both use different hardware for different tasks. I interact with those via a backend communicating with the API. When I create an embedding on one instance it needs a manual refresh (e.g. refreshing the browser window, using the button in the UI etc) before the other instance can use it.
As far as I know its currently possible to do something like refreshing via the API only for Checkpoints and VAE's, not for embeddings.
An API endpoint for refreshing the embeddings would be a big problem solver for not only my use-case but lots of others in terms of automation.
Proposed workflow
In my case:
Additional information
No response