kijai / ComfyUI-CogVideoXWrapper

981 stars 59 forks source link

LoRA issue "not in the list of present adapters: set()" #280

Open scottmudge opened 16 hours ago

scottmudge commented 16 hours ago

Using CogVideoX-5b-I2V, latest repo tip, latest tip of ComfyUI, and latest version of diffusers. LoraSelect node connected to (Down)load CogVideo Model node.

Error:

2024-11-21T12:14:44.812171 - [{'path': 'C:\\Comfy\\models\\CogVideo\\loras\\ExVideo-CogVideoX-LoRA-129f-v1.safetensors', 'strength': 1.0, 'name': 'ExVideo-CogVideoX-LoRA-129f-v1', 'fuse_lora': True}]2024-11-21T12:14:44.813704 - 
2024-11-21T12:14:53.439639 - Merging rank 64 LoRA weights from C:\Comfy\models\CogVideo\loras\ExVideo-CogVideoX-LoRA-129f-v1.safetensors with strength 1.0
2024-11-21T12:14:53.450858 - !!! Exception during processing !!! Adapter name(s) {'C:\\Comfy\\models\\CogVideo\\loras\\ExVideo-CogVideoX-LoRA-129f-v1'} not in the list of present adapters: set().
2024-11-21T12:14:53.452894 - Traceback (most recent call last):
  File "C:\Comfy\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 "C:\Comfy\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 "C:\Comfy\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "C:\Comfy\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Comfy\custom_nodes\ComfyUI-CogVideoXWrapper\model_loading.py", line 274, in loadmodel
    pipe.set_adapters(adapter_list, adapter_weights=adapter_weights)
  File "C:\Comfy\venv\Lib\site-packages\diffusers\loaders\lora_base.py", line 539, in set_adapters
    raise ValueError(
ValueError: Adapter name(s) {'C:\\Comfy\\models\\CogVideo\\loras\\ExVideo-CogVideoX-LoRA-129f-v1'} not in the list of present adapters: set().
kijai commented 16 hours ago

Seems specific to that LoRA, doesn't want to load with the diffusers lora loading code for some reason...

scottmudge commented 16 hours ago

Yeah looks like their example (https://huggingface.co/ECNU-CILab/ExVideo-CogVideoX-LoRA-129f-v1) is using diffsynth:

https://github.com/modelscope/DiffSynth-Studio?tab=readme-ov-file

I don't see diffusers in their requirements, and skimming their model loading code (https://github.com/modelscope/DiffSynth-Studio/blob/main/diffsynth/models/model_manager.py#L365) I don't see it either. Maybe it's implicitly being called downstream by another library, not sure.

kijai commented 14 hours ago

Yeah looks like their example (https://huggingface.co/ECNU-CILab/ExVideo-CogVideoX-LoRA-129f-v1) is using diffsynth:

https://github.com/modelscope/DiffSynth-Studio?tab=readme-ov-file

I don't see diffusers in their requirements, and skimming their model loading code (https://github.com/modelscope/DiffSynth-Studio/blob/main/diffsynth/models/model_manager.py#L365) I don't see it either. Maybe it's implicitly being called downstream by another library, not sure.

I'm pretty sure I had this one working at one point, before I moved to the diffusers LoRA loading... it was more manual merging method I used, maybe need to dig that back up.