ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

[FLUX] SimpleTune + LoRA + ComfyUI + Load Flux Lora = Error

Open DefinitlyEvil opened this issue 1 year ago • 2 comments

Expected Behavior

lora to load.

Actual Behavior

error'ed out.

Steps to Reproduce

Train a LoRA using SimpleTune, put LoRA in xlabs/loras folder, use Load Flux LoRA node.

Debug Logs

Is model already patched? False
!!! Exception during processing !!! list index out of range
Traceback (most recent call last):
  File ".\ComfyUI\execution.py", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".\ComfyUI\execution.py", line 198, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File ".\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".\ComfyUI\custom_nodes\x-flux-comfyui\nodes.py", line 133, in loadmodel
    checkpoint, lora_rank = load_flux_lora(os.path.join(dir_xlabs_loras, lora_name))
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".\ComfyUI\custom_nodes\x-flux-comfyui\nodes.py", line 75, in load_flux_lora
    a1 = sorted(list(checkpoint[list(checkpoint.keys())[0]].shape))[0]
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range


### Other

_No response_

DefinitlyEvil avatar Sep 26 '24 16:09 DefinitlyEvil

Use the regular load lora node.

comfyanonymous avatar Sep 27 '24 03:09 comfyanonymous

Use the regular load lora node.

Hi, thanks. I tried it but it did not bring any effects. Probably the training didn't take effect or smth.

DefinitlyEvil avatar Sep 27 '24 17:09 DefinitlyEvil