cubiq / ComfyUI_IPAdapter_plus

GNU General Public License v3.0
3.14k stars 237 forks source link

[HELP] using with instantID, 'CrossAttentionPatch' object has no attribute 'add' #563

Closed shaoq closed 1 month ago

shaoq commented 1 month ago

I use ipadater advance with instantid, but come out this error:

!!! Exception during processing!!! 'CrossAttentionPatch' object has no attribute 'add' Traceback (most recent call last): File "/home/jiehua/文档/projects/github/ComfyUI/execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "/home/jiehua/文档/projects/github/ComfyUI/execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "/home/jiehua/文档/projects/github/ComfyUI/execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) File "/home/jiehua/文档/projects/github/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/IPAdapterPlus.py", line 711, in apply_ipadapter work_model, face_image = ipadapter_execute(work_model, ipadapter_model, clip_vision, ipa_args) File "/home/jiehua/文档/projects/github/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/IPAdapterPlus.py", line 404, in ipadapter_execute set_model_patch_replace(model, patch_kwargs, ("input", id, index)) File "/home/jiehua/文档/projects/github/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus/IPAdapterPlus.py", line 153, in set_model_patch_replace to["patches_replace"]["attn2"][key].add(ipadapter_attention, **patch_kwargs) AttributeError: 'CrossAttentionPatch' object has no attribute 'add'

anyone can fixed it ??

shaoq commented 1 month ago

it is ok without instantid, but always error with instantid advance

shaoq commented 1 month ago

when i checkout cbe0d5b (commit id), it's ok with instantID, so i think there are some error code ( in CrossAttentionPatch) in lasted commit

cubiq commented 1 month ago

please read https://github.com/cubiq/ComfyUI_IPAdapter_plus/issues/108

shaoq commented 1 month ago

i have updated instantid, pulid, ipadapter code to lastest version pulid with ipadapter is ok, run successfully, but instantid with ipadapter still come error

cubiq commented 1 month ago

that error can be only caused by an outdated version, the extension is probably not updated (even if the manager says it is)

shaoq commented 1 month ago

that error can be only caused by an outdated version, the extension is probably not updated (even if the manager says it is)

Yes, you are right. i forget update the instantid code to the lastest. it works well now, thanks