invoke-ai/InvokeAI · error · ValueError

The Anima ControlNet-LLLite model '{lllite_field.control_mod

Error message

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.

What it means

_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.

Source

Thrown at invokeai/app/invocations/anima_denoise.py:298

        `collect` node whose output order follows graph node ids (random
        UUIDs), not user intent, and composition is weakly order-sensitive
        (each adapter's delta sees the perturbations of adapters applied after
        it). Sorting makes the cascade deterministic and reproducible.
        """
        if control_lllite is None:
            lllite_fields: list[AnimaLLLiteField] = []
        elif isinstance(control_lllite, AnimaLLLiteField):
            lllite_fields = [control_lllite]
        elif isinstance(control_lllite, list):
            lllite_fields = control_lllite
        else:
            raise ValueError(f"Unsupported control_lllite type: {type(control_lllite)}")

        seen_keys: set[str] = set()
        for lllite_field in lllite_fields:
            key = lllite_field.control_model.key
            if key in seen_keys:
                raise ValueError(
                    f"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."
                )
            seen_keys.add(key)
        return sorted(lllite_fields, key=lambda f: f.control_model.key)

    def _build_lllite_cond_image(
        self,
        context: InvocationContext,
        lllite_field: AnimaLLLiteField,
        lllite_model: AnimaControlNetLLLite,
        latents: torch.Tensor,
        patch_spatial: int = 2,
    ) -> torch.Tensor:
        """Build one adapter's LLLite conditioning image tensor (once per generation).

        The cond image is sized from the ACTUAL latent H/W (mirroring the DiT's

View on GitHub (pinned to 0b6a024f2f)

Solutions

  1. Remove the duplicate LLLite control input from the workflow
  2. Use a different LLLite model for the second control input
  3. Deduplicate by control_model.key in custom code before invoking

Example fix

// before
fields = [f1, f2]  # f1.control_model.key == f2.control_model.key
// after
fields = list({f.control_model.key: f for f in [f1, f2]}.values())
Defensive patterns

Strategy: validation

Validate before calling

keys = [f.control_model.key for f in lllite_fields]
if len(keys) != len(set(keys)):
    raise ValueError('duplicate LLLite model keys in control inputs')

Type guard

def has_no_duplicate_lllite(fields: list[AnimaLLLiteField]) -> bool:
    keys = [f.control_model.key for f in fields]
    return len(keys) == len(set(keys))

Try / catch

try:
    lllite = _normalize_control_lllite(control_lllite)
except ValueError as e:
    if 'more than one' in str(e):
        dedupe_by_model_key(control_lllite); return
    raise

Prevention

When it happens

Trigger: 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).

Common situations: Duplicating a ControlNet-LLLite node in the workflow canvas and connecting both outputs; building the field list programmatically in a custom node without deduplication.

Related errors


AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29). Data as JSON: /api/errors/05ffa50cc13043a7. Report an issue: GitHub.