Skip to content

Commit

Permalink
Fix proper check for modelspec.title
Browse files Browse the repository at this point in the history
Thanks @kudou-reira
  • Loading branch information
rockerBOO committed Aug 16, 2023
1 parent 0bdb56c commit 9e4da55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lora-inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ def find_vectors_weights(vectors):
text_encoder2_weight_results = {}

print(f"model key count: {len(vectors.keys())}")
#
# print(vectors.keys())

for k in vectors.keys():
unet = "lora_unet"
Expand Down Expand Up @@ -335,7 +337,7 @@ def item(items, key, name):
f"train images: {items['ss_num_train_images']} {item(items, 'ss_num_reg_images', 'regularization images')}"
)

if items["modelspec.title"] != "":
if "modelspec.title" in items and items.get("modelspec.title", "") != "":
# item(items, "modelspec.implementation", "implementation"),
# item(items, "modelspec.resolution", "resolution"),
# item(items, "modelspec.sai_model_spec", "sai"),
Expand Down

0 comments on commit 9e4da55

Please sign in to comment.