{"record":{"id":"05ffa50cc13043a7","repo":"invoke-ai/InvokeAI","slug":"the-anima-controlnet-lllite-model-lllite-field-c","errorCode":null,"errorMessage":"The Anima ControlNet-LLLite model '{lllite_field.control_model.name}' is used by more than one control input. Each LLLite model can only be applied once per generation — remove the duplicate, or select a different model for it.","messagePattern":"The Anima ControlNet-LLLite model '(.+?)' is used by more than one control input\\. Each LLLite model can only be applied once per generation — remove the duplicate, or select a different model for it\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"invokeai/app/invocations/anima_denoise.py","lineNumber":298,"sourceCode":"        `collect` node whose output order follows graph node ids (random\n        UUIDs), not user intent, and composition is weakly order-sensitive\n        (each adapter's delta sees the perturbations of adapters applied after\n        it). Sorting makes the cascade deterministic and reproducible.\n        \"\"\"\n        if control_lllite is None:\n            lllite_fields: list[AnimaLLLiteField] = []\n        elif isinstance(control_lllite, AnimaLLLiteField):\n            lllite_fields = [control_lllite]\n        elif isinstance(control_lllite, list):\n            lllite_fields = control_lllite\n        else:\n            raise ValueError(f\"Unsupported control_lllite type: {type(control_lllite)}\")\n\n        seen_keys: set[str] = set()\n        for lllite_field in lllite_fields:\n            key = lllite_field.control_model.key\n            if key in seen_keys:\n                raise ValueError(\n                    f\"The Anima ControlNet-LLLite model '{lllite_field.control_model.name}' is used by more than \"\n                    \"one control input. Each LLLite model can only be applied once per generation — remove the \"\n                    \"duplicate, or select a different model for it.\"\n                )\n            seen_keys.add(key)\n        return sorted(lllite_fields, key=lambda f: f.control_model.key)\n\n    def _build_lllite_cond_image(\n        self,\n        context: InvocationContext,\n        lllite_field: AnimaLLLiteField,\n        lllite_model: AnimaControlNetLLLite,\n        latents: torch.Tensor,\n        patch_spatial: int = 2,\n    ) -> torch.Tensor:\n        \"\"\"Build one adapter's LLLite conditioning image tensor (once per generation).\n\n        The cond image is sized from the ACTUAL latent H/W (mirroring the DiT's","sourceCodeStart":280,"sourceCodeEnd":316,"githubUrl":"https://github.com/invoke-ai/InvokeAI/blob/0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06/invokeai/app/invocations/anima_denoise.py#L280-L316","documentation":"_normalize_control_lllite rejects lists containing two AnimaLLLiteFields referencing the same control model key, since each LLLite adapter can only be applied once per generation. The message names the duplicated model and suggests removing the duplicate.","triggerScenarios":"Passing a control_lllite list where two entries share the same control_model.key (e.g. the same LLLite adapter added twice, possibly with different images).","commonSituations":"Duplicating a ControlNet-LLLite node in the workflow canvas and connecting both outputs; building the field list programmatically in a custom node without deduplication.","solutions":["Remove the duplicate LLLite control input from the workflow","Use a different LLLite model for the second control input","Deduplicate by control_model.key in custom code before invoking"],"exampleFix":"// before\nfields = [f1, f2]  # f1.control_model.key == f2.control_model.key\n// after\nfields = list({f.control_model.key: f for f in [f1, f2]}.values())","handlingStrategy":"validation","validationCode":"keys = [f.control_model.key for f in lllite_fields]\nif len(keys) != len(set(keys)):\n    raise ValueError('duplicate LLLite model keys in control inputs')","typeGuard":"def has_no_duplicate_lllite(fields: list[AnimaLLLiteField]) -> bool:\n    keys = [f.control_model.key for f in fields]\n    return len(keys) == len(set(keys))","tryCatchPattern":"try:\n    lllite = _normalize_control_lllite(control_lllite)\nexcept ValueError as e:\n    if 'more than one' in str(e):\n        dedupe_by_model_key(control_lllite); return\n    raise","preventionTips":["Deduplicate LLLite fields by control_model.key before invocation","Avoid duplicating ControlNet-LLLite nodes feeding one denoise node","Add a graph-time lint that flags repeated control models"],"tags":["python","controlnet","anima","validation","duplicate-model"],"backgroundTag":"duplicate-model-reference","analyzedSha":"0b6a024f2ff6a86bfb953dcdb9cc504ef7397a06","analyzedAt":"2026-08-29T04:46:49.967Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}