Commit
•
6fcafb6
1
Parent(s):
b3d9998
Update handler.py
Browse files- handler.py +2 -2
handler.py
CHANGED
@@ -30,8 +30,8 @@ class EndpointHandler:
|
|
30 |
)
|
31 |
state_dict = load_file(embedding_path)
|
32 |
|
33 |
-
self.pipe.load_textual_inversion(state_dict["
|
34 |
-
self.pipe.load_textual_inversion(state_dict["
|
35 |
|
36 |
def __call__(self, data: Any) -> List[List[Dict[str, float]]]:
|
37 |
"""
|
|
|
30 |
)
|
31 |
state_dict = load_file(embedding_path)
|
32 |
|
33 |
+
self.pipe.load_textual_inversion(state_dict["text_encoders_1"], token=["<s0>", "<s1>"], text_encoder=self.pipe.text_encoder, tokenizer=self.pipe.tokenizer)
|
34 |
+
self.pipe.load_textual_inversion(state_dict["text_encoders_0"], token=["<s0>", "<s1>"], text_encoder=self.pipe.text_encoder_2, tokenizer=self.pipe.tokenizer_2)
|
35 |
|
36 |
def __call__(self, data: Any) -> List[List[Dict[str, float]]]:
|
37 |
"""
|