{"record":{"id":"20301b69b42957ba","repo":"invoke-ai/InvokeAI","slug":"unsupported-anima-controlnet-lllite-adapter-expec","errorCode":null,"errorMessage":"Unsupported Anima ControlNet-LLLite adapter: expected 3 or 4 conditioning channels, got {lllite_model.cond_in_channels}.","messagePattern":"Unsupported Anima ControlNet-LLLite adapter: expected 3 or 4 conditioning channels, got (.+?)\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/anima_denoise.py","lineNumber":337,"sourceCode":"        latent_h, latent_w = latents.shape[-2], latents.shape[-1]\n\n        image_pil = context.images.get_pil(lllite_field.image_name, \"RGB\")\n        rgb_01 = to_tensor(image_pil).unsqueeze(0)  # (1, 3, H, W) in [0, 1]\n        rgb_pm1 = prepare_cond_image(rgb_01, latent_h, latent_w, patch_spatial)\n\n        if lllite_model.cond_in_channels == 4:\n            if lllite_field.mask_name is None:\n                raise ValueError(\n                    \"This Anima ControlNet-LLLite adapter is an inpainting adapter (4-channel conditioning) and \"\n                    \"requires a mask. Connect a mask (white = inpaint area) to the Anima ControlNet-LLLite node.\"\n                )\n            mask_pil = context.images.get_pil(lllite_field.mask_name, \"L\")\n            mask_01 = to_tensor(mask_pil).unsqueeze(0)  # (1, 1, H, W) in [0, 1]\n            mask_01 = prepare_mask(mask_01, latent_h, latent_w, patch_spatial)\n            return build_inpaint_cond_image(rgb_pm1, mask_01, lllite_model.inpaint_masked_input)\n\n        if lllite_model.cond_in_channels != 3:\n            raise ValueError(\n                f\"Unsupported Anima ControlNet-LLLite adapter: expected 3 or 4 conditioning channels, got \"\n                f\"{lllite_model.cond_in_channels}.\"\n            )\n        if lllite_field.mask_name is not None:\n            context.logger.warning(\n                \"The selected Anima ControlNet-LLLite adapter does not use a mask (3-channel conditioning); the \"\n                \"connected mask will be ignored.\"\n            )\n        return rgb_pm1\n\n    @staticmethod\n    def _get_lllite_multiplier(lllite_field: AnimaLLLiteField, step_index: int, total_steps: int) -> float:\n        \"\"\"Step-range gate for one LLLite adapter's multiplier.\n\n        Uses the same user-facing step-index/percent convention as\n        BaseControlNetExtension._get_weight.\n        \"\"\"\n        first_step = math.floor(lllite_field.begin_step_percent * total_steps)","sourceCodeStart":319,"sourceCodeEnd":355,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/anima_denoise.py#L319-L355","documentation":"_build_lllite_cond_image supports only 3-channel (RGB) or 4-channel (inpaint) LLLite adapters. Any other cond_in_channels value triggers a ValueError reporting the actual channel count, indicating an unsupported or incompatible adapter architecture.","triggerScenarios":"Loading a ControlNet-LLLite adapter whose cond_in_channels is neither 3 nor 4 (e.g. a depth-conditioned or custom adapter variant) and using it in Anima diffusion.","commonSituations":"Importing LLLite checkpoints trained for other model families; corrupt or non-standard adapter exports; adapter code changes altering channel count across versions.","solutions":["Use a standard RGB (3-channel) or inpaint (4-channel) Anima LLLite adapter","Re-export/retrain the adapter with 3 or 4 conditioning channels","Update InvokeAI if a newer version supports this adapter type"],"exampleFix":"// before\nlllite_model.cond_in_channels  # e.g. 8 -> unsupported\n// after\n# select an adapter with cond_in_channels in (3, 4) before wiring it into the graph","handlingStrategy":"validation","validationCode":"if lllite_model.cond_in_channels not in (3, 4):\n    raise ValueError(f'unsupported LLLite cond_in_channels: {lllite_model.cond_in_channels}')","typeGuard":"def is_supported_lllite(model) -> bool:\n    return getattr(model, 'cond_in_channels', 0) in (3, 4)","tryCatchPattern":"try:\n    cond = _build_lllite_cond_image(context, lllite_field, lllite_model, ...)\nexcept ValueError as e:\n    if 'conditioning channels' in str(e):\n        raise ModelIncompatibleError(str(e)) from e\n    raise","preventionTips":["Only use adapters trained/verified for Anima with 3- or 4-channel conditioning","Check cond_in_channels after loading an adapter, before graph execution","Keep InvokeAI updated for broader adapter support"],"tags":["python","controlnet","anima","model-compatibility","validation"],"backgroundTag":"model-compatibility-error","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}