Allow nested transformer block names for quantization, lora targeting, quantizing
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user