Skip to content

Commit

Permalink
fix #938
Browse files Browse the repository at this point in the history
  • Loading branch information
lllyasviel committed Nov 14, 2023
1 parent f80f159 commit c9a5e72
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion fooocus_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = '2.1.805'
version = '2.1.806'
14 changes: 10 additions & 4 deletions modules/lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,13 @@ def load_dangerous_lora(lora, to_load):
patch_dict["{}.bias".format(to_load[x][:-len(".weight")])] = (diff_bias,)
loaded_keys.add(diff_bias_name)

for x in lora.keys():
if x not in loaded_keys:
return {}
return patch_dict
remaining_keys = [x for x in lora.keys() if x not in loaded_keys]

if len(remaining_keys) == 0:
return patch_dict

if len(remaining_keys) < 8:
print(f'LoRA loaded with extra keys: {remaining_keys}')
return patch_dict

return {}
4 changes: 4 additions & 0 deletions update_log.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2.1.806

* fix some lora problems related to clip.

# 2.1.805

* Responsive UI for small screens.
Expand Down

0 comments on commit c9a5e72

Please sign in to comment.