Allow nested transformer block names for quantization, lora targeting, quantizing

This commit is contained in:
Jaret Burkett
2026-06-13 14:33:16 -06:00
parent 17c9279828
commit c8cd78b1a4
4 changed files with 20 additions and 4 deletions

View File

@@ -370,7 +370,10 @@ class LoRASpecialNetwork(ToolkitNetworkMixin, LoRANetwork):
transformer_block_names = base_model.get_transformer_block_names()
if transformer_block_names is not None:
if not any([name in lora_name for name in transformer_block_names]):
# match against clean_name (dotted) so block names can be
# dotted paths (e.g. "model.language_model.layers"); lora_name
# has dots replaced with "$$"/"_" and wouldn't match.
if not any([block_name in clean_name for block_name in transformer_block_names]):
skip = True
else:
if self.is_pixart: