comfyanonymous / ComfyUI

The most powerful and modular stable diffusion GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
43.01k stars 4.54k forks source link

Error occurred when executing UpscaleModelLoader #2963

Open kakachiex2 opened 4 months ago

kakachiex2 commented 4 months ago

I get this error with the load upscaler model.

Error occurred when executing UpscaleModelLoader:

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

File "K:\ComfyUI\ComfyUI_Ex\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\ComfyUI\comfy_extras\nodes_upscale_model.py", line 20, in load_model sd = comfy.utils.load_torch_file(model_path, safe_load=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\ComfyUI\comfy\utils.py", line 20, in load_torch_file pl_sd = torch.load(ckpt, map_location=device, weights_only=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\python_miniconda_env\ComfyUI\Lib\site-packages\torch\serialization.py", line 1025, in load raise pickle.UnpicklingError(UNSAFE_MESSAGE + str(e)) from None

chaoqunxie commented 3 months ago

hi,are u resolve it

chengdidididi commented 3 months ago

i met the same problem when running the upscale model,did you solve this probelm?

Ceciliammm commented 2 months ago

hi, I met the same problem, have you solved it?