mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
handle case of no IP adapters requested
This commit is contained in:
parent
1c59fce6ad
commit
7391c126d3
@ -678,6 +678,9 @@ class DenoiseLatentsInvocation(BaseInvocation):
|
|||||||
) -> List[Tuple[torch.Tensor, torch.Tensor]]:
|
) -> List[Tuple[torch.Tensor, torch.Tensor]]:
|
||||||
"""Run the IPAdapter CLIPVisionModel, returning image prompt embeddings."""
|
"""Run the IPAdapter CLIPVisionModel, returning image prompt embeddings."""
|
||||||
# ip_adapter could be a list or a single IPAdapterField. Normalize to a list here.
|
# ip_adapter could be a list or a single IPAdapterField. Normalize to a list here.
|
||||||
|
if ip_adapter is None:
|
||||||
|
return []
|
||||||
|
|
||||||
if not isinstance(ip_adapter, list):
|
if not isinstance(ip_adapter, list):
|
||||||
ip_adapter = [ip_adapter]
|
ip_adapter = [ip_adapter]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user