cubiq / ComfyUI_IPAdapter_plus

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

cannot access local variable 'face_image' where it is not associated with a value #522

Closed ultimatech-cn closed 2 months ago

ultimatech-cn commented 2 months ago

Just updating to the latest version. When I am using

1714522728387

node. but got error as following:

!!! Exception during processing!!! cannot access local variable 'face_image' where it is not associated with a value
Traceback (most recent call last):
  File "E:\training\ComfyUI\execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\training\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 "E:\training\ComfyUI\execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\training\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 699, in apply_ipadapter
    return (work_model, face_image, )
            ^^^^^^^^^^
UnboundLocalError: cannot access local variable 'face_image' where it is not associated with a value

Any suggestion for that?

screan commented 2 months ago

Same issue here

cubiq commented 2 months ago

you are using the wrong method in the ipadapter weights

githubarooski commented 2 months ago

can this get better error handling then?

cubiq commented 2 months ago

yes, totally :smile: but comfy is not that flexible to understand what you are doing wrong. in your case you are just sending an empty image, the node doesn't know why and can't tell you how to fix it

ultimatech-cn commented 1 month ago

The error is gone by updating to the latest version