Skip to content

Commit

Permalink
when checking LoRA, no longer treat unrecognized items as error
Browse files Browse the repository at this point in the history
  • Loading branch information
by321 committed Jan 18, 2024
1 parent 94a28ab commit 809cee9
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions safetensors_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@ def _CheckLoRA_internal(s:SafeTensorsFile)->int:
bad_unknowns.append(key)

hasError=False

if len(bad_unknowns)!=0:
print("INFO: unrecognized items:")
for x in bad_unknowns: print(" ",x)
#hasError=True

if len(set_scalar)>0:
print("missing scalar keys:")
for x in set_scalar: print(" ",x)
Expand All @@ -198,11 +204,6 @@ def _CheckLoRA_internal(s:SafeTensorsFile)->int:
for x in set_nonscalar: print(" ",x)
hasError=True

if len(bad_unknowns)!=0:
print("unrecognized items:")
for x in bad_unknowns: print(" ",x)
hasError=True

if len(bad_scalars)!=0:
print("keys expected to be scalar but are nonscalar:")
for x in bad_scalars: print(" ",x)
Expand Down

0 comments on commit 809cee9

Please sign in to comment.