ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

5 dimensions? Yeah right, I can handle three, maybe four, but once you go quantum I'm out

Open serget2 opened this issue 2 months ago • 2 comments
trafficstars

Custom Node Testing

Expected Behavior

To make some qwen images

Actual Behavior

I did manage to make some images with this but randomly it throws this out:

FaceDetailer

Expected NHWC tensor, but found 5 dimensions

Apparently my comfyUI makes contact with the twilight zone? Or the outer Limits? The multiverse?

Steps to Reproduce

Press queue prompt wait and hope it happens to you I guess?

Apparently that cropped refined and cropped_enhanced alpha from the facedetailer are the bits causing trouble? Sometimes they work sometimes they don;t, no idea what it does except make 2 black images and two images that are the same but different but still same?

Image

Debug Logs

2025-09-07T14:52:38.520022 - Requested to load WanVAE
2025-09-07T14:52:38.708015 - loaded completely 723.5501098632812 242.02829551696777 True
2025-09-07T14:52:38.833655 - [Impact Pack] vae decoded in 0.3s2025-09-07T14:52:38.833655 - 
2025-09-07T14:52:38.835652 - !!! Exception during processing !!! Expected NHWC tensor, but found 5 dimensions
2025-09-07T14:52:38.836652 - Traceback (most recent call last):
  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 496, in execute
    output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs)
  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 315, in get_output_data
    return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs)
  File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Lora-Manager\py\metadata_collector\metadata_hook.py", line 165, in async_map_node_over_list_with_metadata
    results = await original_map_node_over_list(
  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 289, in _async_map_node_over_list
    await process_inputs(input_dict, i)
  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 277, in process_inputs
    result = f(**inputs)
  File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\impact_pack.py", line 646, in doit
    enhanced_img, cropped_enhanced, cropped_enhanced_alpha, mask, cnet_pil_list = FaceDetailer.enhance_face(
  File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\impact_pack.py", line 600, in enhance_face
    DetailerForEach.do_detail(image, segs, model, clip, vae, guide_size, guide_size_for_bbox, max_size, seed, steps, cfg,
  File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\impact_pack.py", line 360, in do_detail
    enhanced_image, cnet_pils = core.enhance_detail(cropped_image, model, clip, vae, guide_size, guide_size_for_bbox, max_size,
  File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\core.py", line 402, in enhance_detail
    refined_image = utils.tensor_resize(refined_image, w, h)
  File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\utils.py", line 129, in tensor_resize
    _tensor_check_image(image)
  File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\utils.py", line 204, in _tensor_check_image
    raise ValueError(f"Expected NHWC tensor, but found {image.ndim} dimensions")
ValueError: Expected NHWC tensor, but found 5 dimensions

2025-09-07T14:52:38.838753 - Prompt executed in 276.36 seconds


## Attached Workflow
Please make sure that workflow does not contain any sensitive information such as API keys or passwords.

Workflow too large. Please manually upload the workflow from local file system.


## Additional Context
(Please add any additional context or steps to reproduce the error here)

Other

No response

serget2 avatar Sep 07 '25 12:09 serget2