Merge branch 'main' of https://github.com/hako-mikan/sd-webui-supermerger
commit
13ad109025
|
|
@ -346,6 +346,7 @@ def load_networks(names, te_multipliers=None, unet_multipliers=None, dyn_dims=No
|
|||
|
||||
net.te_multiplier = te_multipliers[i] if te_multipliers else 1.0
|
||||
net.unet_multiplier = unet_multipliers[i] if unet_multipliers else 1.0
|
||||
print(f"dyn_dims = {dyn_dims}")
|
||||
net.dyn_dim = dyn_dims[i] if dyn_dims else 1.0
|
||||
loaded_networks.append(net)
|
||||
|
||||
|
|
|
|||
|
|
@ -417,6 +417,10 @@ def smerge(weights_a,weights_b,model_a,model_b,model_c,base_alpha,base_beta,mode
|
|||
|
||||
theta_0[key] = theta_0[key].to("cuda")
|
||||
theta_1[key] = theta_1[key].to("cuda")
|
||||
try:
|
||||
theta_2[key] = theta_2[key].to("cuda")
|
||||
except Exception as e:
|
||||
pass # Do nothing
|
||||
|
||||
weight_index = -1
|
||||
current_alpha = alpha
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ from modules.ui import create_refresh_button
|
|||
from safetensors.torch import load_file, save_file
|
||||
from scripts.kohyas import extract_lora_from_models as ext
|
||||
from scripts.kohyas import lora as klora
|
||||
from scripts.A1111 import networks as nets
|
||||
from scripts.mergers.model_util import (filenamecutter, savemodel)
|
||||
from scripts.mergers.mergers import extract_super, unload_forge
|
||||
from tqdm import tqdm
|
||||
|
|
@ -852,8 +853,7 @@ def pluslora(lnames,loraratios,settings,output,model,save_precision,calc_precisi
|
|||
return result + add
|
||||
|
||||
def newpluslora(theta_0,filenames,lweis,names, isxl,isv2, keychanger):
|
||||
import scripts.A1111.networks as nets
|
||||
nets.load_networks(names, [1]* len(names),[1]* len(names), isxl, isv2)
|
||||
nets.load_networks(names, [1]* len(names),[1]* len(names), [1]* len(names), isxl, isv2)
|
||||
|
||||
for l, loaded in enumerate(nets.loaded_networks):
|
||||
for n, name in enumerate(names):
|
||||
|
|
|
|||
Loading…
Reference in New Issue