Skip to content

Commit

Permalink
fix issue #103
Browse files Browse the repository at this point in the history
  • Loading branch information
wkpark committed Jan 17, 2024
1 parent 9de3aa9 commit 74f7bd8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions sd_modelmixer/hyper.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ def para_to_weights(para, weights=None, alpha=None, isxl=False):
for i in weights.keys():
nweights[i] = ",".join([("0" if float(f) == 0.0 else str(f)) for f in weights[i]])

maxid = max(alpha.keys())
nalpha = [""] * (maxid + 1)
for i in alpha.keys():
nalpha[i] = alpha[i]
nalpha = []
if len(alpha) > 0:
maxid = max(alpha.keys())
nalpha = [""] * (maxid + 1)
for i in alpha.keys():
nalpha[i] = alpha[i]

return nweights, nalpha

Expand Down

0 comments on commit 74f7bd8

Please sign in to comment.