Fix unload of bundled emb

This commit is contained in:
Kohaku-Blueleaf 2023-10-22 17:57:59 +08:00
parent 891ccb767c
commit 9adeed18f1

View File

@ -266,6 +266,7 @@ def load_networks(names, te_multipliers=None, unet_multipliers=None, dyn_dims=No
already_loaded[net.name] = net already_loaded[net.name] = net
for emb_name, embedding in net.bundle_embeddings.items(): for emb_name, embedding in net.bundle_embeddings.items():
if embedding.loaded: if embedding.loaded:
embedding.loaded = None
emb_db.register_embedding_by_name(None, shared.sd_model, emb_name) emb_db.register_embedding_by_name(None, shared.sd_model, emb_name)
loaded_networks.clear() loaded_networks.clear()