Update invokeai/app/invocations/latent.py

Co-authored-by: Ryan Dick <ryanjdick3@gmail.com>
This commit is contained in:
Lincoln Stein 2024-06-01 08:54:28 -04:00 committed by Kent Keirsey
parent 68d628dc14
commit 756108f6bd

View File

@ -711,9 +711,8 @@ class DenoiseLatentsInvocation(BaseInvocation):
) -> Optional[List[IPAdapterData]]:
"""If IP-Adapter is enabled, then this function loads the requisite models and adds the image prompt conditioning data."""
ip_adapter_data_list = []
assert len(ip_adapters) == len(image_prompts)
for single_ip_adapter, (image_prompt_embeds, uncond_image_prompt_embeds) in zip(
ip_adapters, image_prompts, strict=False
ip_adapters, image_prompts, strict=True
):
ip_adapter_model = exit_stack.enter_context(context.models.load(single_ip_adapter.ip_adapter_model))