laksjdjf / cgem156-ComfyUI

色々なカスタムノードを詰め込んだ。
GNU General Public License v3.0
49 stars 6 forks source link

Error while trying to merge two loras: mismatch tensor #14

Open zBilalz opened 3 months ago

zBilalz commented 3 months ago

The error I received:

Error occurred when executing LoraMerger|cgem156:

The size of tensor a (64) must match the size of tensor b (32) at non-singleton dimension 1

File "C:\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(*slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI\custom_nodes\cgem156-ComfyUI\scripts\lora_merger\merge.py", line 46, in lora_merge lora = self.merge(lora_1, lora_2, mode, rank, threshold, device, dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\name\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI\custom_nodes\cgem156-ComfyUI\scripts\lora_merger\merge.py", line 98, in merge up = up_1 + up_2

afbeelding

laksjdjf commented 3 months ago

add mode can only be used between LoRAs of the same rank; try svd mode.

zBilalz commented 3 months ago

add mode can only be used between LoRAs of the same rank; try svd mode.

Working now, thanks