fix safetensors embeddings

This commit is contained in:
Vladimir Mandic
2024-04-11 13:34:01 -04:00
parent 5500b8af8e
commit 94cab41e58
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -1,6 +1,6 @@
# Change Log for SD.Next
## Update for 2024-04-09
## Update for 2024-04-11
- **Features**:
- **Gallery**: list, preview, search through all your images and videos!
@@ -65,6 +65,7 @@
- enumerate diffusers model with multiple variants
- diffusers skip non-models on enum
- face-hires compatibility with control modules
- loading safetensors embeddings
- css fixes
## Update for 2024-03-19
@@ -199,6 +199,8 @@ class EmbeddingDatabase:
embeddings_dict[k] = f.get_tensor(k)
else: # fallback for sd1.5 pt embeddings
embeddings_dict["clip_l"] = self.load_from_file(embedding.filename, embedding.filename)
if 'emb_params' in embeddings_dict and 'clip_l' not in embeddings_dict:
embeddings_dict["clip_l"] = embeddings_dict["emb_params"]
if 'clip_l' not in embeddings_dict:
raise ValueError('Invalid Embedding, dict missing required key `clip_l`')
if 'clip_g' not in embeddings_dict and model_type == "SDXL" and shared.opts.diffusers_convert_embed: