aszc-dev / ComfyUI-CoreMLSuite

A set of custom nodes for ComfyUI that allow you to use Core ML models in your ComfyUI workflows.
GNU General Public License v3.0
131 stars 12 forks source link

Bug with loading a lora #17

Closed cchance27 closed 12 months ago

cchance27 commented 1 year ago

Whenever I try to load a lora when it gets to the sampler I get an error....


INFO:coreml_suite.logger:Batch size: 1
INFO:coreml_suite.logger:Width: 512, Height: 512
INFO:coreml_suite.logger:ControlNet support: False
INFO:coreml_suite.logger:Attention implementation: SPLIT_EINSUM
INFO:coreml_suite.logger:LoRAs used:
INFO:coreml_suite.logger:  epiCRealismHelper.safetensors - strength: 1.0
ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
  File "/Users/chris/AI/ComfyUI/execution.py", line 153, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/AI/ComfyUI/execution.py", line 83, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/AI/ComfyUI/execution.py", line 76, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/chris/AI/ComfyUI/custom_nodes/ComfyUI-CoreMLSuite/coreml_suite/nodes.py", line 273, in convert
    converter.convert(
  File "/Users/chris/AI/ComfyUI/custom_nodes/ComfyUI-CoreMLSuite/coreml_suite/converter.py", line 300, in convert
    ref_pipe.set_adapters([adapter_name], adapter_weights=[strength])
  File "/Users/chris/AI/ComfyUI/venv/lib/python3.11/site-packages/diffusers/loaders.py", line 2476, in set_adapters
    self.unet.set_adapters(adapter_names, adapter_weights)
  File "/Users/chris/AI/ComfyUI/venv/lib/python3.11/site-packages/diffusers/loaders.py", line 723, in set_adapters
    raise ValueError("PEFT backend is required for `set_adapters()`.")
ValueError: PEFT backend is required for `set_adapters()`.```
aszc-dev commented 1 year ago

Yes, there's a new required package (peft backend). Please run pip install -r requirements.txt to install the packages. This should solve this issue.

aszc-dev commented 1 year ago

BTW, I believe that there can potentially be more people with such problem. May I ask how you updated the repo? Did you use the manager or manually execute 'git pull'?

cchance27 commented 1 year ago

i had installed from git, i'll try with an updated requirement pull and install

cchance27 commented 12 months ago

that seemed to work me past this specfic error closing this

rovo79 commented 11 months ago

I just ran into this same issue, though been updating CoreMLSuite through ComfyUI Manager. I originally installed from GIT; pip install -r requirements.txt resolved it for me.

I only just started testing out loading LORAs.