summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/clip/embeddings.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/models/clip/embeddings.py b/models/clip/embeddings.py
index 2b23bd3..7c7f2ac 100644
--- a/models/clip/embeddings.py
+++ b/models/clip/embeddings.py
@@ -86,6 +86,9 @@ def patch_managed_embeddings(
86 alpha: int = 8, 86 alpha: int = 8,
87 dropout: float = 0.0 87 dropout: float = 0.0
88) -> ManagedCLIPTextEmbeddings: 88) -> ManagedCLIPTextEmbeddings:
89 if isinstance(text_encoder.text_model.embeddings, ManagedCLIPTextEmbeddings):
90 return text_encoder.text_model.embeddings
91
89 text_embeddings = ManagedCLIPTextEmbeddings( 92 text_embeddings = ManagedCLIPTextEmbeddings(
90 text_encoder.config, 93 text_encoder.config,
91 text_encoder.text_model.embeddings, 94 text_encoder.text_model.embeddings,