Files
automatic/modules
CalamitousFelicitousness 84683a1d84 refactor(anima): migrate to generic native_loader
Replaces anima_lora.py's bespoke try_load_lora / group_keys /
resolve_network_key with thin wrappers binding native_loader's generics
to anima's prefix tuples and resolve_targets, mirroring flux2 / zimage /
chroma / ernie. The hand-rolled apply_lora_alphas bake-with-balance
pass goes away; alpha / scale / dora_scale flow through NetworkWeights.w
to NetworkModule.calc_scale at apply time.

native_loader gains an optional network_prefix kwarg (str or
Callable[[prefix_used], str], default "lora_transformer_") used when
constructing network_key. Anima passes a callable picking
lora_transformer_ / lora_llm_adapter_ / lora_te_ per matched prefix.
Single-component siblings keep the default and are unchanged.

network.NetworkModule.apply_weight_decompose grows a dual-path DoRA
convention detector. The pre-fix implementation only handled per-input
dora_scale (DoRA paper / kohya, shape (1, in)), silently broadcasting
per-output LyCORIS / PEFT dora_scale (shape (out, 1)) into an incoherent
element-wise rescaling. Detection is structural: (out, 1, ...) routes
to per-output; everything else (including the square-weight 1D ambiguity)
defaults to per-input for legacy compat. Pre-existing bug surfaced by
the LoKR+DoRA LyCORIS files Anima now loads.

Behavior changes:

- LoHA via the generic try_load_loha (NetworkModuleHada); covers
  scenery-anima-base and any other LyCORIS .hada_w* export.
- Kohya lora_te_ prefix recognized. The legacy resolver only matched
  BFL text_encoders.qwen3_06b.transformer.model. and silently dropped
  lora_te_layers_N_* keys (41% of BlueArcStyle's bases were unloaded).
- LoKR+DoRA LyCORIS files now apply correctly; the per-output dora_scale
  is honored instead of silently scrambled.

Adds test/test-anima-native-adapters.py: 37 offline tests across all
five prefixes (LoRA + LoHA), every COSMOS_2_FLAT_RENAME entry, DoRA
threading, marker disambiguation, try_load_chain dispatch, calc_updown
sanity, and both DoRA conventions (per-input / per-output / 1D ambiguous).
Adapter mock mirrors AnimaLLMAdapter's real module tree.
2026-05-22 00:22:32 +01:00
..
2026-03-24 06:15:26 -07:00
2026-02-19 09:15:37 +01:00
2026-05-11 08:36:49 +02:00
2026-05-19 11:56:20 +02:00
2026-05-09 09:38:54 +02:00
2026-05-16 08:53:54 +02:00
2026-02-19 11:09:13 +01:00
2026-05-18 21:38:09 +03:00
2026-02-19 11:09:13 +01:00
2026-05-11 08:36:49 +02:00
2026-05-11 08:13:57 +02:00
2026-04-12 18:54:22 +02:00
2026-05-11 08:36:49 +02:00
2026-05-11 08:36:49 +02:00
2026-05-13 18:37:12 -07:00
2026-03-24 06:07:34 -07:00
2026-05-11 08:36:49 +02:00
2026-03-24 06:07:34 -07:00
2026-05-17 08:37:13 +02:00
2026-02-19 15:28:24 +01:00
2026-02-19 11:09:13 +01:00
2026-02-19 11:09:13 +01:00
2024-12-20 18:58:29 -05:00
2026-04-12 19:07:20 +02:00
2026-05-17 10:41:09 -07:00
2026-04-09 13:48:54 +02:00
2026-04-28 11:00:19 +02:00
2026-05-17 11:14:55 -07:00
2026-05-11 08:13:48 +02:00
2026-02-19 15:28:24 +01:00
2026-05-16 07:19:52 +02:00
2026-05-16 07:19:52 +02:00
2026-04-29 07:59:43 +02:00
2026-05-11 08:13:57 +02:00
2026-02-19 11:13:44 +01:00
2026-04-26 20:21:00 -07:00
2026-02-19 09:46:42 +01:00
2026-05-11 08:13:57 +02:00
2026-02-19 11:09:13 +01:00
2026-05-05 17:02:17 +02:00
2026-05-19 11:56:20 +02:00
2026-02-19 12:21:46 +01:00
2026-04-12 19:07:20 +02:00
2026-02-19 09:46:42 +01:00
2026-05-18 19:33:16 +02:00
2026-05-18 19:33:16 +02:00
2026-03-24 15:01:07 +01:00
2026-02-19 11:09:13 +01:00
2026-05-10 21:45:58 +02:00
2026-02-19 11:09:13 +01:00
2026-02-19 11:09:13 +01:00
2026-02-19 11:09:13 +01:00
2026-02-19 09:15:37 +01:00
2026-05-09 13:32:29 +02:00
2026-02-19 09:46:42 +01:00
2026-02-19 11:09:13 +01:00
2026-02-19 11:13:44 +01:00
2026-04-18 12:10:03 +02:00
2026-02-19 11:09:13 +01:00
2026-05-19 11:56:20 +02:00
2026-05-10 21:45:58 +02:00
2026-05-07 07:20:20 +02:00
2026-05-17 10:21:39 -07:00
2026-05-10 08:55:44 +02:00
2026-05-19 11:56:20 +02:00
2026-05-08 14:44:00 +02:00
2026-03-24 05:48:19 -07:00
2026-02-19 09:15:37 +01:00
2026-02-19 15:28:24 +01:00
2026-03-05 20:06:09 -08:00
2025-10-16 19:39:05 -04:00
2026-02-19 11:09:13 +01:00
2026-05-08 10:16:17 +02:00
2026-04-09 13:48:54 +02:00
2026-05-11 08:36:49 +02:00
2026-05-17 10:21:01 -07:00
2026-05-13 11:47:33 +02:00
2026-03-13 14:44:58 +01:00
2026-02-19 09:15:37 +01:00
2026-03-13 15:05:47 +01:00
2026-03-13 15:05:47 +01:00
2026-02-19 09:46:42 +01:00
2026-04-15 12:32:21 +00:00
2026-02-19 09:15:37 +01:00
2026-02-19 11:09:13 +01:00
2026-02-21 09:32:36 +01:00
2026-05-10 08:55:44 +02:00
2025-03-30 15:04:17 -04:00
2026-04-15 09:44:32 +02:00
2026-03-13 11:49:41 +01:00
2026-05-17 10:40:28 -07:00
2026-02-19 09:15:37 +01:00
2026-02-19 09:46:42 +01:00
2026-02-19 09:46:42 +01:00
2026-05-08 14:44:00 +02:00
2026-05-11 08:13:57 +02:00
2026-02-19 09:15:37 +01:00
2025-11-02 06:29:19 -05:00
2026-02-19 11:09:13 +01:00
2026-05-14 13:16:26 +02:00
2026-04-29 07:59:43 +02:00
2026-05-19 11:56:20 +02:00
2026-05-21 09:23:10 +02:00
2026-02-19 11:36:20 +01:00
2026-05-16 08:53:54 +02:00
2026-02-19 11:36:20 +01:00
2026-02-19 11:09:13 +01:00
2026-05-21 09:23:10 +02:00
2026-02-19 15:28:24 +01:00
2026-05-11 08:13:48 +02:00
2026-02-19 11:09:13 +01:00
2026-05-21 12:02:01 +02:00
2026-03-24 06:07:34 -07:00
2025-11-08 14:54:34 -08:00
2026-04-06 01:06:19 -07:00
2026-05-11 09:34:17 +02:00
2026-04-06 01:06:19 -07:00
2026-04-06 01:06:19 -07:00
2026-03-24 06:08:15 -07:00
2026-04-26 03:14:48 +01:00
2026-02-19 09:46:42 +01:00