comfyui-reactor-node icon indicating copy to clipboard operation
comfyui-reactor-node copied to clipboard

Invalid Load Key error with ReActorMaskHelper node

Open aphaits opened this issue 10 months ago • 3 comments

First, confirm

  • [X] I have read the instruction carefully
  • [X] I have searched the existing issues
  • [X] I have updated the extension to the latest version

What happened?

tried the node, error comes out

Steps to reproduce the problem

testing out mask helper node, basic test setup Screenshot 2024-04-17 115844

Sysinfo

Windows 10, Firefox, Zotac 2070 Super

Relevant console log

Error occurred when executing ReActorMaskHelper:

invalid load key, '\x0a'.

  File "F:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\StableDiffusion\ComfyUI_windows_portable\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 "F:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\StableDiffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\nodes.py", line 679, in execute
    sam = sam_model_registry[model_kind](checkpoint=sam_modelname)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\StableDiffusion\ComfyUI_windows_portable\python_embeded\Lib\site-packages\segment_anything\build_sam.py", line 38, in build_sam_vit_b
    return _build_sam(
           ^^^^^^^^^^^
  File "F:\StableDiffusion\ComfyUI_windows_portable\python_embeded\Lib\site-packages\segment_anything\build_sam.py", line 105, in _build_sam
    state_dict = torch.load(f)
                 ^^^^^^^^^^^^^
  File "F:\StableDiffusion\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\serialization.py", line 1040, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\StableDiffusion\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\serialization.py", line 1258, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Additional information

No response

aphaits avatar Apr 17 '24 04:04 aphaits

Please use another SAM model Just download one of these https://huggingface.co/datasets/Gourieff/ReActor/tree/main/models/sams

Gourieff avatar Apr 17 '24 08:04 Gourieff

Getting the same error as above, even after using

Please use another SAM model Just download one of these https://huggingface.co/datasets/Gourieff/ReActor/tree/main/models/sams

Still getting the same error as OP. Tried downloading the SAM models again , same issue.

magic_number = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: invalid load key, '<'.

kellyling80 avatar Apr 18 '24 07:04 kellyling80

Make sure you are using the correct bbox model as well

Gourieff avatar Apr 18 '24 07:04 Gourieff