yolain / ComfyUI-Easy-Use

In order to make it easier to use the ComfyUI, I have made some optimizations and integrations to some commonly used nodes.
GNU General Public License v3.0
547 stars 35 forks source link

Error occurred when executing easy imageDetailTransfer: The size of tensor a (1360) must match the size of tensor b (1365) at non-singleton dimension 2 #241

Open 0002kgHg opened 3 days ago

0002kgHg commented 3 days ago

In my workflow, I only want to use ic-light to change the lighting and shading of the character's face. However, simply using the background removal node will also keep the character's body, which is not what I want. Therefore, as shown in the image below, I used yolo or G-dino for head recognition and then connected ic-light. However, after ksampler generated the image, I wanted to use the Easy Use image detail transfer node, but it failed. In the past, when I used those background removal nodes, there were no errors. I am not sure if this is an issue with ic-light or with the image transfer node, or if the output images and masks from the background removal nodes differ from those of the detection nodes.

Error occurred when executing easy imageDetailTransfer:

The size of tensor a (1360) must match the size of tensor b (1365) at non-singleton dimension 2

File "/comfyui/execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "/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 "/comfyui/execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "/comfyui/custom_nodes/ComfyUI-Easy-Use/py/image.py", line 958, in transfer new_image = torch.lerp(target_tensor, new_image, mask)

企业微信截图_17201689238374

yolain commented 3 days ago

You need to make sure that the target image and source image and mask size are the same.

0002kgHg commented 3 days ago

You need to make sure that the target image and source image and mask size are the same.

Yes, I know, but just by looking at the dimensions, they appear to be the same.

企业微信截图_17201720707954

yolain commented 3 days ago

Are the sizes generated by the sampler also calibrated?