Spaces:
Runtime error
Runtime error
Update ip_adapter/ip_adapter.py
Browse files- ip_adapter/ip_adapter.py +2 -1
ip_adapter/ip_adapter.py
CHANGED
@@ -272,7 +272,8 @@ class IPAdapterXL(IPAdapter):
|
|
272 |
|
273 |
image_prompt_embeds = torch.cat(image_prompt_embeds_list).mean(dim=0)
|
274 |
image_prompt_embeds = image_prompt_embeds.mean(dim=0, keepdim=True)
|
275 |
-
uncond_image_prompt_embeds = torch.cat(uncond_image_prompt_embeds_list
|
|
|
276 |
|
277 |
with torch.inference_mode():
|
278 |
prompt_embeds, negative_prompt_embeds, pooled_prompt_embeds, negative_pooled_prompt_embeds = self.pipe.encode_prompt(
|
|
|
272 |
|
273 |
image_prompt_embeds = torch.cat(image_prompt_embeds_list).mean(dim=0)
|
274 |
image_prompt_embeds = image_prompt_embeds.mean(dim=0, keepdim=True)
|
275 |
+
uncond_image_prompt_embeds = torch.cat(uncond_image_prompt_embeds_list, dim=0)
|
276 |
+
uncond_image_prompt_embeds = uncond_image_prompt_embeds.mean(dim=0, keepdim=True)
|
277 |
|
278 |
with torch.inference_mode():
|
279 |
prompt_embeds, negative_prompt_embeds, pooled_prompt_embeds, negative_pooled_prompt_embeds = self.pipe.encode_prompt(
|