ZHO-ZHO-ZHO / ComfyUI-InstantID

Unofficial implementation of InstantID for ComfyUI
1.36k stars 78 forks source link

Load LoRA with InstantID Nodes #156

Open Zeeshanzt opened 1 week ago

Zeeshanzt commented 1 week ago

I have tried loading the SDXL LoRAs with these custom nodes, but it ends up giving the error 'StableDiffusionXLInstantIDPipeline' object has no attribute 'model' How to load LoRAs in combination with these nodes. like this (P.S: ignore the flux lora here in the picture, i used sdxl lora when this error came) Here are the logs 2024-11-19T18:11:46.387973 - got prompt 2024-11-19T18:11:51.288966 - !!! Exception during processing !!! 'StableDiffusionXLInstantIDPipeline' object has no attribute 'model' 2024-11-19T18:11:51.302407 - Traceback (most recent call last): File "/workspace/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 "/workspace/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 "/workspace/ComfyUI/execution.py", line 169, in _map_node_over_list process_inputs(input_dict, i) File "/workspace/ComfyUI/execution.py", line 158, in process_inputs results.append(getattr(obj, func)(**inputs)) File "/workspace/ComfyUI/nodes.py", line 665, in load_lora_model_only return (self.load_lora(model, None, lora_name, strength_model, 0)[0],) File "/workspace/ComfyUI/nodes.py", line 651, in load_lora model_lora, clip_lora = comfy.sd.load_lora_for_models(model, clip, lora, strength_model, strength_clip) File "/workspace/ComfyUI/comfy/sd.py", line 39, in load_lora_for_models key_map = comfy.lora.model_lora_keys_unet(model.model, key_map) File "/usr/local/lib/python3.10/dist-packages/diffusers/configuration_utils.py", line 142, in getattr raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'") AttributeError: 'StableDiffusionXLInstantIDPipeline' object has no attribute 'model'

2024-11-19T18:11:51.312342 - Prompt executed in 4.71 seconds

image