1inkusFace commited on
Commit
e1306b4
·
verified ·
1 Parent(s): 6b5f6ae

Update ip_adapter/ip_adapter.py

Browse files
Files changed (1) hide show
  1. ip_adapter/ip_adapter.py +1 -2
ip_adapter/ip_adapter.py CHANGED
@@ -204,7 +204,6 @@ class IPAdapterXL(IPAdapter):
204
  pil_image_4=None,
205
  pil_image_5=None,
206
  prompt=None,
207
- prompt_2=None,
208
  negative_prompt=None,
209
  text_scale=1.0,
210
  ip_scale=1.0,
@@ -284,7 +283,7 @@ class IPAdapterXL(IPAdapter):
284
 
285
  with torch.inference_mode():
286
  prompt_embeds, negative_prompt_embeds, pooled_prompt_embeds, negative_pooled_prompt_embeds = self.pipe.encode_prompt(
287
- prompt+prompt_2, num_images_per_prompt=num_samples, do_classifier_free_guidance=True, negative_prompt=negative_prompt)
288
  prompt_embeds = prompt_embeds * text_scale
289
  prompt_embeds = torch.cat([prompt_embeds, image_prompt_embeds], dim=1)
290
  negative_prompt_embeds = torch.cat([negative_prompt_embeds, uncond_image_prompt_embeds], dim=1)
 
204
  pil_image_4=None,
205
  pil_image_5=None,
206
  prompt=None,
 
207
  negative_prompt=None,
208
  text_scale=1.0,
209
  ip_scale=1.0,
 
283
 
284
  with torch.inference_mode():
285
  prompt_embeds, negative_prompt_embeds, pooled_prompt_embeds, negative_pooled_prompt_embeds = self.pipe.encode_prompt(
286
+ prompt, num_images_per_prompt=num_samples, do_classifier_free_guidance=True, negative_prompt=negative_prompt)
287
  prompt_embeds = prompt_embeds * text_scale
288
  prompt_embeds = torch.cat([prompt_embeds, image_prompt_embeds], dim=1)
289
  negative_prompt_embeds = torch.cat([negative_prompt_embeds, uncond_image_prompt_embeds], dim=1)