Skip to content

[bug]: Unsupported lora format with some Anima loras #9264

@PFJackalope33

Description

@PFJackalope33

Is there an existing issue for this problem?

  • I have searched the existing issues

Install method

Invoke's Launcher

Operating system

Linux

GPU vendor

Nvidia (CUDA)

GPU model

NVIDIA GeForce RTX 3060 Lite Hash Rate

GPU VRAM

12GB

Version number

6.13.0

Browser

No response

System Information

OS: Linux Mint 22.1 x86_64
CPU: AMD Ryzen 7 3700X (16) @ 3.600GHz
GPU: NVIDIA GeForce RTX 3060 Lite Hash Rate

What happened

I keep getting this error when loading certain Anima Loras like this one: https://civitai.com/models/2662268/toony-e621 and trying to use it with Anima Base and finetunes.

ValueError: Unsupported lora format: dict_keys(['k_norm.diff', 'q_norm.diff'])

Other Anima loras seem to work just fine for me in Invoke and the lora causing this is works on ComfyUI just fine but not in invoke.

[2026-06-02 22:59:10,573]::[InvokeAI]::ERROR --> Error while invoking session cfa9b9ce-f907-4cbf-b15c-e9a44d6158c6, invocation 930daf1c-b0e8-403d-bf24-90d542e90df0 (anima_text_encoder): Unsupported lora format: dict_keys(['k_norm.diff', 'q_norm.diff'])
[2026-06-02 22:59:10,573]::[InvokeAI]::ERROR --> Traceback (most recent call last):
  File "/home/MYNAME/InvokeAI/.venv/lib/python3.12/site-packages/invokeai/app/services/session_processor/session_processor_default.py", line 130, in run_node
    output = invocation.invoke_internal(context=context, services=self._services)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/MYNAME/InvokeAI/.venv/lib/python3.12/site-packages/invokeai/app/invocations/baseinvocation.py", line 244, in invoke_internal
    output = self.invoke(context)
             ^^^^^^^^^^^^^^^^^^^^
  File "/home/MYNAME/InvokeAI/.venv/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/MYNAME/InvokeAI/.venv/lib/python3.12/site-packages/invokeai/app/invocations/anima_text_encoder.py", line 88, in invoke
    qwen3_embeds, t5xxl_ids, t5xxl_weights = self._encode_prompt(context)
                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/MYNAME/InvokeAI/.venv/lib/python3.12/site-packages/invokeai/app/invocations/anima_text_encoder.py", line 136, in _encode_prompt
    exit_stack.enter_context(
  File "/home/MYNAME/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/lib/python3.12/contextlib.py", line 526, in enter_context
    result = _enter(cm)
             ^^^^^^^^^^
  File "/home/MYNAME/.local/share/uv/python/cpython-3.12.9-linux-x86_64-gnu/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/home/MYNAME/InvokeAI/.venv/lib/python3.12/site-packages/invokeai/backend/patches/layer_patcher.py", line 39, in apply_smart_model_patches
    for patch, patch_weight in patches:
                               ^^^^^^^
  File "/home/MYNAME/InvokeAI/.venv/lib/python3.12/site-packages/invokeai/app/invocations/anima_text_encoder.py", line 214, in _lora_iterator
    lora_info = context.models.load(lora.lora)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/MYNAME/InvokeAI/.venv/lib/python3.12/site-packages/invokeai/app/services/shared/invocation_context.py", line 397, in load
    return self._services.model_manager.load.load_model(model, submodel_type)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/MYNAME/InvokeAI/.venv/lib/python3.12/site-packages/invokeai/app/services/model_load/model_load_default.py", line 71, in load_model
    ).load_model(model_config, submodel_type)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/MYNAME/InvokeAI/.venv/lib/python3.12/site-packages/invokeai/backend/model_manager/load/load_default.py", line 89, in load_model
    cache_record = self._load_and_cache(model_config, submodel_type)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/MYNAME/InvokeAI/.venv/lib/python3.12/site-packages/invokeai/backend/model_manager/load/load_default.py", line 134, in _load_and_cache
    loaded_model = self._load_model(config, submodel_type)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/MYNAME/InvokeAI/.venv/lib/python3.12/site-packages/invokeai/backend/model_manager/load/model_loaders/lora.py", line 172, in _load_model
    model = lora_model_from_anima_state_dict(state_dict=state_dict, alpha=None)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/MYNAME/InvokeAI/.venv/lib/python3.12/site-packages/invokeai/backend/patches/lora_conversions/anima_lora_conversion_utils.py", line 297, in lora_model_from_anima_state_dict
    layer = _make_layer_patch(values)
            ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/MYNAME/InvokeAI/.venv/lib/python3.12/site-packages/invokeai/backend/patches/lora_conversions/anima_lora_conversion_utils.py", line 147, in _make_layer_patch
    return any_lora_layer_from_state_dict(layer_dict)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/MYNAME/InvokeAI/.venv/lib/python3.12/site-packages/invokeai/backend/patches/layers/utils.py", line 35, in any_lora_layer_from_state_dict
    raise ValueError(f"Unsupported lora format: {state_dict.keys()}")
ValueError: Unsupported lora format: dict_keys(['k_norm.diff', 'q_norm.diff'])

What you expected to happen

The loras having this issue like the one I linked are known to work in ComfyUI. It does not appear to be an issue with the lora itself but possible with Invoke.

How to reproduce the problem

No response

Additional context

No response

Discord username

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions