flowtyone / ComfyUI-Flowty-LDSR

LDSR custom node for ComfyUI
GNU General Public License v3.0
190 stars 14 forks source link

WeightsUnpickler error: Unsupported class ModelCheckpoint #17

Open NathanSweet opened 4 months ago

NathanSweet commented 4 months ago

Running ComfyUI (not standalone) I get the below. I tried pytorch-lightning==1.7.7 in ComfyUI-Flowty-LDSR/requirements.txt, didn't help. Please advise!

Total VRAM 24564 MB, total RAM 32499 MB
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 4090 : cudaMallocAsync
VAE dtype: torch.bfloat16
Using pytorch cross attention

Import times for custom nodes:
   0.0 seconds: C:\Users\Nate\Desktop\ComfyUI\custom_nodes\websocket_image_save.py
   0.0 seconds: C:\Users\Nate\Desktop\ComfyUI\custom_nodes\ComfyUI-Flowty-LDSR

Starting server

To see the GUI go to: http://127.0.0.1:8188
got prompt
!!! Exception during processing!!! Weights only load failed. Re-running `torch.load` with `weights_only` set to `False` will likely succeed, but it can result in arbitrary code execution.Do it only if you get the file from a trusted source. WeightsUnpickler error: Unsupported class pytorch_lightning.callbacks.model_checkpoint.ModelCheckpoint
Traceback (most recent call last):
  File "C:\Users\Nate\Desktop\ComfyUI\execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Nate\Desktop\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 "C:\Users\Nate\Desktop\ComfyUI\execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Nate\Desktop\ComfyUI\comfy_extras\nodes_upscale_model.py", line 20, in load_model
    sd = comfy.utils.load_torch_file(model_path, safe_load=True)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Nate\Desktop\ComfyUI\comfy\utils.py", line 21, in load_torch_file
    pl_sd = torch.load(ckpt, map_location=device, weights_only=True)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Apps\Python311\Lib\site-packages\torch\serialization.py", line 1024, in load
    raise pickle.UnpicklingError(UNSAFE_MESSAGE + str(e)) from None
_pickle.UnpicklingError: Weights only load failed. Re-running `torch.load` with `weights_only` set to `False` will likely succeed, but it can result in arbitrary code execution.Do it only if you get the file from a trusted source. WeightsUnpickler error: Unsupported class pytorch_lightning.callbacks.model_checkpoint.ModelCheckpoint