Merge remote-tracking branch 'origin/master' into group-nodes

This commit is contained in:
pythongosssss 2023-11-09 18:50:23 +00:00
commit 1a78c1351b
2 changed files with 13 additions and 1 deletions

View File

@ -131,6 +131,18 @@ def load_lora(lora, to_load):
loaded_keys.add(b_norm_name) loaded_keys.add(b_norm_name)
patch_dict["{}.bias".format(to_load[x][:-len(".weight")])] = (b_norm,) patch_dict["{}.bias".format(to_load[x][:-len(".weight")])] = (b_norm,)
diff_name = "{}.diff".format(x)
diff_weight = lora.get(diff_name, None)
if diff_weight is not None:
patch_dict[to_load[x]] = (diff_weight,)
loaded_keys.add(diff_name)
diff_bias_name = "{}.diff_b".format(x)
diff_bias = lora.get(diff_bias_name, None)
if diff_bias is not None:
patch_dict["{}.bias".format(to_load[x][:-len(".weight")])] = (diff_bias,)
loaded_keys.add(diff_bias_name)
for x in lora.keys(): for x in lora.keys():
if x not in loaded_keys: if x not in loaded_keys:
print("lora key not loaded", x) print("lora key not loaded", x)

View File

@ -16,7 +16,7 @@ function sanitizeNodeName(string) {
'`': '', '`': '',
'=': '' '=': ''
}; };
return String(string).replace(/[&<>"'`=\/]/g, function fromEntityMap (s) { return String(string).replace(/[&<>"'`=]/g, function fromEntityMap (s) {
return entityMap[s]; return entityMap[s];
}); });
} }