adaface-neurips commited on
Commit
f4d87fd
1 Parent(s): 4d30abe

fix method missing arg

Browse files
Files changed (1) hide show
  1. adaface/adaface_wrapper.py +4 -1
adaface/adaface_wrapper.py CHANGED
@@ -253,7 +253,10 @@ class AdaFaceWrapper(nn.Module):
253
  self.update_text_encoder_subj_embs(adaface_subj_embs)
254
  return adaface_subj_embs
255
 
256
- def encode_prompt(self, prompt, negative_prompt, device="cuda", verbose=False):
 
 
 
257
  prompt = self.update_prompt(prompt)
258
  if verbose:
259
  print(f"Prompt: {prompt}")
 
253
  self.update_text_encoder_subj_embs(adaface_subj_embs)
254
  return adaface_subj_embs
255
 
256
+ def encode_prompt(self, prompt, negative_prompt=None, device="cuda", verbose=False):
257
+ if negative_prompt is None:
258
+ negative_prompt = self.negative_prompt
259
+
260
  prompt = self.update_prompt(prompt)
261
  if verbose:
262
  print(f"Prompt: {prompt}")