invoke-ai/InvokeAI · error · ValueError
Unsupported IP-Adapter type: {type(self.ip_adapter)}
Error message
Unsupported IP-Adapter type: {type(self.ip_adapter)} What it means
FluxDenoise._normalize_ip_adapter_fields expects the ip_adapter input to be either a single IPAdapterField, a list of them, or None. Any other Python type (str, dict, wrong field class) reaching _run_diffusion raises this ValueError because FLUX cannot interpret the IP-Adapter input shape.
Source
Thrown at invokeai/app/invocations/flux_denoise.py:903
# Prepare mask conditioning.
mask = mask[:, 0, :, :]
# Rearrange mask to a 16-channel representation that matches the shape of the VAE-encoded latent space.
mask = einops.rearrange(mask, "b (h ph) (w pw) -> b (ph pw) h w", ph=8, pw=8)
mask = pack(mask)
# Merge image and mask conditioning.
img_cond = torch.cat((cond_img, mask), dim=-1)
return img_cond
def _normalize_ip_adapter_fields(self) -> list[IPAdapterField]:
if self.ip_adapter is None:
return []
elif isinstance(self.ip_adapter, IPAdapterField):
return [self.ip_adapter]
elif isinstance(self.ip_adapter, list):
return self.ip_adapter
else:
raise ValueError(f"Unsupported IP-Adapter type: {type(self.ip_adapter)}")
def _prep_ip_adapter_image_prompt_clip_embeds(
self,
ip_adapter_fields: list[IPAdapterField],
context: InvocationContext,
device: torch.device,
) -> tuple[list[torch.Tensor], list[torch.Tensor]]:
"""Run the IPAdapter CLIPVisionModel, returning image prompt embeddings."""
clip_image_processor = CLIPImageProcessor()
pos_image_prompt_clip_embeds: list[torch.Tensor] = []
neg_image_prompt_clip_embeds: list[torch.Tensor] = []
for ip_adapter_field in ip_adapter_fields:
# `ip_adapter_field.image` could be a list or a single ImageField. Normalize to a list here.
ipa_image_fields: list[ImageField]
if isinstance(ip_adapter_field.image, ImageField):
ipa_image_fields = [ip_adapter_field.image]
elif isinstance(ip_adapter_field.image, list):View on GitHub (pinned to 0b6a024f2f)
Solutions
- Connect an IP-Adapter invocation (which outputs IPAdapterField) or a list of them to the flux_denoise ip_adapter input.
- Re-create the workflow in the current InvokeAI version instead of editing an old exported graph JSON.
- If writing a custom node, declare the output type as IPAdapterField and return IPAdapterField or list[IPAdapterField].
Example fix
// before: ip_adapter input wired from a generic model loader output // after from invokeai.app.invocations.ip_adapter import IPAdapterInvocation # wire IPAdapterInvocation.ip_adapter -> FluxDenoiseInvocation.ip_adapter
Defensive patterns
Strategy: type-guard
Validate before calling
from invokeai.app.invocations.ip_adapter import IPAdapterField assert ip_adapter_input is None or isinstance(ip_adapter_input, (IPAdapterField, list)) and all(isinstance(f, IPAdapterField) for f in (ip_adapter_input if isinstance(ip_adapter_input, list) else [ip_adapter_input]))
Type guard
def is_valid_ip_adapter_input(v) -> bool:
if v is None or isinstance(v, IPAdapterField):
return True
return isinstance(v, list) and all(isinstance(f, IPAdapterField) for f in v) Try / catch
try:
result = flux_denoise.invoke(context)
except ValueError as e:
if str(e).startswith("Unsupported IP-Adapter type"):
log.error("ip_adapter input must be IPAdapterField or list[IPAdapterField]")
else:
raise Prevention
- Only wire IP-Adapter invocation outputs into flux_denoise.ip_adapter.
- Validate graph connections after importing shared workflow JSONs.
- Keep custom node output types annotated as IPAdapterField.
When it happens
Trigger: Graph wiring passes a non-IPAdapterField value (e.g. a raw model field, image field, or deprecated IP-Adapter invocation output) into the ip_adapter input of the FLUX Denoise invocation.
Common situations: Loading an old workflow JSON created before the ip_adapter field was typed as IPAdapterField; custom nodes emitting the wrong output type; manual graph edits connecting an incompatible output to ip_adapter.
Related errors
- Unsupported IP-Adapter image type: {type(ip_adapter_field.im
- FLUX IP-Adapter only supports a single image prompt (receive
- IP-Adapter masks are not yet supported in Flux.
- Unknown lora: {lora_key}!
- LoRA model is in unsupported FLUX format
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/cc364ddc6089f2be.
Report an issue: GitHub.