CCalamitousFelicitousnessfix(lora): apply full-diff norm targets and map z-image's renamed modules
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Restructure FP16 clamp patch into pipelines/z_image/patch_fp16.py subpackage | 4 个月前 | |
linting Signed-off-by: vladmandic <mandic00@live.com> | 4 个月前 | |
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. | 1 个月前 |