storyicon / comfyui_segment_anything

Based on GroundingDino and SAM, use semantic strings to segment any element in an image. The comfyui version of sd-webui-segment-anything.
Apache License 2.0
757 stars 84 forks source link

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb2 in position 0: invalid start byte #92

Open Cxcer opened 3 weeks ago

Cxcer commented 3 weeks ago

use AMD Radeon RX6600

!!! Exception during processing !!! 'utf-8' codec can't decode byte 0xb2 in position 0: invalid start byte
Traceback (most recent call last):
  File "G:\Soft\AI-Paint\ComfyUI_windows\ComfyUI\execution.py", line 317, 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 "G:\Soft\AI-Paint\ComfyUI_windows\ComfyUI\execution.py", line 192, 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 "G:\Soft\AI-Paint\ComfyUI_windows\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "G:\Soft\AI-Paint\ComfyUI_windows\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "G:\Soft\AI-Paint\ComfyUI_windows\ComfyUI\custom_nodes\comfyui_segment_anything\node.py", line 317, in main
    boxes = groundingdino_predict(
            ^^^^^^^^^^^^^^^^^^^^^^
  File "G:\Soft\AI-Paint\ComfyUI_windows\ComfyUI\custom_nodes\comfyui_segment_anything\node.py", line 182, in groundingdino_predict
    boxes_filt = get_grounding_output(
                 ^^^^^^^^^^^^^^^^^^^^^
  File "G:\Soft\AI-Paint\ComfyUI_windows\ComfyUI\custom_nodes\comfyui_segment_anything\node.py", line 170, in get_grounding_output
    outputs = model(image[None], captions=[caption])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\4399-PC\AppData\Roaming\Python\Python312\site-packages\torch\nn\modules\module.py", line 1553, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\4399-PC\AppData\Roaming\Python\Python312\site-packages\torch\nn\modules\module.py", line 1562, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "G:\Soft\AI-Paint\ComfyUI_windows\ComfyUI\custom_nodes\comfyui_segment_anything\local_groundingdino\models\GroundingDINO\groundingdino.py", line 231, in forward
    ) = generate_masks_with_special_tokens_and_transfer_map(
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "G:\Soft\AI-Paint\ComfyUI_windows\ComfyUI\custom_nodes\comfyui_segment_anything\local_groundingdino\models\GroundingDINO\bertwarper.py", line 240, in generate_masks_with_special_tokens_and_transfer_map
    torch.eye(num_token, device=input_ids.device).bool().unsqueeze(0).repeat(bs, 1, 1)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb2 in position 0: invalid start byte