Comfy-Org / Comfy-Org/ComfyUI

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

Open
#5,071 2 comments 0 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### 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

```powershell
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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.