Skip to content

Commit

Permalink
fix issues with list hypernetworks
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyongliang committed Feb 23, 2023
1 parent 0ab83c1 commit cf29601
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/hypernetworks/hypernetwork.py
Expand Up @@ -271,10 +271,9 @@ def list_hypernetworks(path):
name = os.path.splitext(os.path.basename(filename))[0]
# Prevent a hypothetical "None.pt" from being listed.
if name != "None":
res[name + f"({sd_models.model_hash(filename)})"] = filename
res[name] = filename
return res


def load_hypernetwork(filename):
path = shared.hypernetworks.get(filename, None)
# Prevent any file named "None.pt" from being loaded.
Expand Down

0 comments on commit cf29601

Please sign in to comment.