raise error if layer cannot be loaded
Co-authored-by: Fabio Peruzzo <39661245+Xuzzo@users.noreply.github.com>
This commit is contained in:
parent
0fd03c7552
commit
b4c27a6fab
@ -86,7 +86,7 @@ class WeightHandler:
|
|||||||
visited[parentKey]={}
|
visited[parentKey]={}
|
||||||
visited[parentKey][splitKey]=weight
|
visited[parentKey][splitKey]=weight
|
||||||
if not 'weight' in target:
|
if not 'weight' in target:
|
||||||
continue
|
raise ValueError(f"LoRA weights for layer {parentKey} cannot be loaded into the model.")
|
||||||
if 'lora_A' in visited[parentKey] and 'lora_B' in visited[parentKey]:
|
if 'lora_A' in visited[parentKey] and 'lora_B' in visited[parentKey]:
|
||||||
lora_a=visited[parentKey]['lora_A']
|
lora_a=visited[parentKey]['lora_A']
|
||||||
lora_b=visited[parentKey]['lora_B']
|
lora_b=visited[parentKey]['lora_B']
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user