hako-mikan / sd-webui-supermerger

model merge extention for stable diffusion web ui
GNU Affero General Public License v3.0
752 stars 111 forks source link

Add DoRA support #373

Open lendrick opened 7 months ago

lendrick commented 7 months ago

Merging DoRAs currently fails with a Key Error.

merging C:\AI\automatic1111\models\Lora\d\36c_dora-000007.safetensors: [0.0, 0, 0, 0, 0, 0.0, 0.0, 0, 0.0, 0.0, 0, 0, 0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0] dim: [4], alpha: [2.0] merging... Traceback (most recent call last): File "C:\AI\automatic1111\extensions\sd-webui-supermerger\scripts\mergers\pluslora.py", line 426, in lmerge sd = merge_lora_models(ln, lr, settings, False, calc_precision) File "C:\AI\automatic1111\extensions\sd-webui-supermerger\scripts\mergers\pluslora.py", line 480, in merge_lora_models base_alpha = base_alphas[lora_module_name] KeyError: 'lora_te1_text_model_encoder_layers_0_mlp_fc1.dora_scal'

a-l-e-x-d-s-9 commented 4 months ago

@hako-mikan Any updates regarding merging Doras?