Files
automatic/test
CalamitousFelicitousness 18bbe288b0 fix(lora): apply full-diff norm targets and map z-image's renamed modules
A full-weight extraction on Z-Image bound 308 modules and applied 172 of
them, silently dropping the rest, and left 71 more unmapped.

assign_network_names_to_compvis_modules puts every transformer module in
network_layer_mapping but skips stamping network_layer_name on norms,
which is the attribute the apply pass keys off. try_load_full bound those
modules through the mapping and they then never applied; stamp them
loader-locally, as try_load_norm already does.

Z-Image also names three module groups differently from the diffusers
tree: the qk-norms (q_norm/k_norm vs norm_q/norm_k), and the patch
embedder and final layer, which live in ModuleDicts keyed by
"{patch_size}-{f_patch_size}" and so carry a key the checkpoint has no
notion of. Read that key from the live model rather than hardcoding it.
The counts close exactly: 68 qk-norms plus 3 non-block targets are the 71
that went unmapped.
2026-07-14 08:06:45 +01:00
..
2026-02-10 14:31:53 +01:00
2026-04-21 19:24:24 +02:00
2026-04-01 10:29:08 +02:00
2026-07-04 15:26:36 +02:00