Skip to content

Tensor dimension mismatch in BNK_CutoffRegionsToConditioning_ADV #32

@Lookplanes

Description

@Lookplanes

I am encountering a RuntimeError in ComfyUI while using the BNK_CutoffRegionsToConditioning node(Also the same for advanced version) from the ComfyUI_Cutoff custom nodes. The error message is: RuntimeError: The size of tensor a (154) must match the size of tensor b (77) at non-singleton dimension 1

Image

The detailed error message is below:

2025-03-30T16:10:23.543043 - Prompt executed in 0.66 seconds
2025-03-30T16:13:12.978835 - got prompt
2025-03-30T16:13:12.981917 - Failed to validate prompt for output 426:
2025-03-30T16:13:12.981917 - * (prompt):
2025-03-30T16:13:12.981917 - - Required input is missing: text
2025-03-30T16:13:12.981917 - * ShowText|pysssss 426:
2025-03-30T16:13:12.982950 - - Required input is missing: text
2025-03-30T16:13:12.982950 - Output will be ignored
2025-03-30T16:13:13.041679 - Failed to validate prompt for output 468:
2025-03-30T16:13:13.041679 - * (prompt):
2025-03-30T16:13:13.042194 - - Required input is missing: images
2025-03-30T16:13:13.042194 - * PreviewImage 468:
2025-03-30T16:13:13.042194 - - Required input is missing: images
2025-03-30T16:13:13.042194 - Output will be ignored
2025-03-30T16:13:13.740282 - !!! Exception during processing !!! The size of tensor a (154) must match the size of tensor b (77) at non-singleton dimension 1
2025-03-30T16:13:13.742615 - Traceback (most recent call last):
File "E:\comfyui\ComfyUI_windows_portable_nvidia_new\ComfyUI_windows_portable\ComfyUI\execution.py", line 327, 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 "E:\comfyui\ComfyUI_windows_portable_nvidia_new\ComfyUI_windows_portable\ComfyUI\execution.py", line 202, 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 "E:\comfyui\ComfyUI_windows_portable_nvidia_new\ComfyUI_windows_portable\ComfyUI\execution.py", line 174, in _map_node_over_list
process_inputs(input_dict, i)
File "E:\comfyui\ComfyUI_windows_portable_nvidia_new\ComfyUI_windows_portable\ComfyUI\execution.py", line 163, in process_inputs
results.append(getattr(obj, func)(**inputs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\comfyui\ComfyUI_windows_portable_nvidia_new\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Cutoff\cutoff.py", line 300, in finalize
return finalize_clip_regions(clip_regions, mask_token, strict_mask, start_from_masked, token_normalization, weight_interpretation)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\comfyui\ComfyUI_windows_portable_nvidia_new\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Cutoff\cutoff.py", line 258, in finalize_clip_regions
region_emb *= region_masking
RuntimeError: The size of tensor a (154) must match the size of tensor b (77) at non-singleton dimension 1

I am unsure if this error is due to incorrect usage on my part or a potential bug in the code itself. Sorry for any inconvenience I caused.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions