multimodalart HF staff commited on
Commit
6fcafb6
1 Parent(s): b3d9998

Update handler.py

Browse files
Files changed (1) hide show
  1. 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["text_encoders_0"], token=["<s0>", "<s1>"], text_encoder=self.pipe.text_encoder, tokenizer=self.pipe.tokenizer)
34
- self.pipe.load_textual_inversion(state_dict["text_encoders_1"], 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
  """
 
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
  """