CheckpointLoaderSimple ..... Error while deserializing header: InvalidHeaderDeserialization
Author: saeedafm
Pull request: no
Labels: name: bug

### System Info

Hi guys, I just downloaded flux models and then if I Run, I received the following error:
CheckpointLoaderSimple ..... Error while deserializing header: InvalidHeaderDeserialization




# ComfyUI Error Report
## Error Details
- **Node ID:** 3
- **Node Type:** CheckpointLoaderSimple
- **Exception Type:** safetensors_rust.SafetensorError
- **Exception Message:** Error while deserializing header: InvalidHeaderDeserialization
## Stack Trace
```
  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 345, 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 "D:\Ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 220, 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 "D:\Ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 192, in _map_node_over_list
    process_inputs(input_dict, i)

  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 181, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\nodes.py", line 570, in load_checkpoint
    out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings"))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 908, in load_checkpoint_guess_config
    sd, metadata = comfy.utils.load_torch_file(ckpt_path, return_metadata=True)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 68, in load_torch_file
    raise e

  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 55, in load_torch_file
    with safetensors.safe_open(ckpt, framework="pt", device=device.type) as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

```
## System Information
- **ComfyUI Version:** 0.3.29
- **Arguments:** ComfyUI\main.py --windows-standalone-build
- **OS:** nt
- **Python Version:** 3.12.9 (tags/v3.12.9:fdb8142, Feb  4 2025, 15:27:58) [MSC v.1942 64 bit (AMD64)]
- **Embedded Python:** true
- **PyTorch Version:** 2.6.0+cu126
## Devices

- **Name:** cuda:0 NVIDIA GeForce RTX 4070 Laptop GPU : cudaMallocAsync
  - **Type:** cuda
  - **VRAM Total:** 8585216000
  - **VRAM Free:** 7398752256
  - **Torch VRAM Total:** 0
  - **Torch VRAM Free:** 0

## Logs
```
2025-06-09T11:03:11.343705 - [START] Security scan2025-06-09T11:03:11.343705 - 
2025-06-09T11:03:12.134459 - [DONE] Security scan2025-06-09T11:03:12.134459 - 
2025-06-09T11:03:12.228807 - ## ComfyUI-Manager: installing dependencies done.2025-06-09T11:03:12.228807 - 
2025-06-09T11:03:12.228807 - ** ComfyUI startup time:2025-06-09T11:03:12.228807 -  2025-06-09T11:03:12.228807 - 2025-06-09 11:03:12.2282025-06-09T11:03:12.228807 - 
2025-06-09T11:03:12.228807 - ** Platform:2025-06-09T11:03:12.228807 -  2025-06-09T11:03:12.228807 - Windows2025-06-09T11:03:12.228807 - 
2025-06-09T11:03:12.228807 - ** Python version:2025-06-09T11:03:12.228807 -  2025-06-09T11:03:12.228807 - 3.12.9 (tags/v3.12.9:fdb8142, Feb  4 2025, 15:27:58) [MSC v.1942 64 bit (AMD64)]2025-06-09T11:03:12.228807 - 
2025-06-09T11:03:12.228807 - ** Python executable:2025-06-09T11:03:12.228807 -  2025-06-09T11:03:12.228807 - D:\Ai\ComfyUI_windows_portable\python_embeded\python.exe2025-06-09T11:03:12.228807 - 
2025-06-09T11:03:12.228807 - ** ComfyUI Path:2025-06-09T11:03:12.228807 -  2025-06-09T11:03:12.228807 - D:\Ai\ComfyUI_windows_portable\ComfyUI2025-06-09T11:03:12.228807 - 
2025-06-09T11:03:12.228807 - ** ComfyUI Base Folder Path:2025-06-09T11:03:12.228807 -  2025-06-09T11:03:12.228807 - D:\Ai\ComfyUI_windows_portable\ComfyUI2025-06-09T11:03:12.228807 - 
2025-06-09T11:03:12.228807 - ** User directory:2025-06-09T11:03:12.228807 -  2025-06-09T11:03:12.228807 - D:\Ai\ComfyUI_windows_portable\ComfyUI\user2025-06-09T11:03:12.228807 - 
2025-06-09T11:03:12.228807 - ** ComfyUI-Manager config path:2025-06-09T11:03:12.228807 -  2025-06-09T11:03:12.228807 - D:\Ai\ComfyUI_windows_portable\ComfyUI\user\default\ComfyUI-Manager\config.ini2025-06-09T11:03:12.228807 - 
2025-06-09T11:03:12.228807 - ** Log path:2025-06-09T11:03:12.228807 -  2025-06-09T11:03:12.228807 - D:\Ai\ComfyUI_windows_portable\ComfyUI\user\comfyui.log2025-06-09T11:03:12.228807 - 
2025-06-09T11:03:13.171480 - 
Prestartup times for custom nodes:
2025-06-09T11:03:13.171480 -    2.5 seconds: D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-manager
2025-06-09T11:03:13.171480 - 
2025-06-09T11:03:17.015681 - Checkpoint files will always be loaded safely.
2025-06-09T11:03:17.292874 - Total VRAM 8188 MB, total RAM 65229 MB
2025-06-09T11:03:17.292874 - pytorch version: 2.6.0+cu126
2025-06-09T11:03:17.292874 - Set vram state to: NORMAL_VRAM
2025-06-09T11:03:17.292874 - Device: cuda:0 NVIDIA GeForce RTX 4070 Laptop GPU : cudaMallocAsync
2025-06-09T11:03:20.563827 - Using pytorch attention
2025-06-09T11:03:24.102716 - Python version: 3.12.9 (tags/v3.12.9:fdb8142, Feb  4 2025, 15:27:58) [MSC v.1942 64 bit (AMD64)]
2025-06-09T11:03:24.102716 - ComfyUI version: 0.3.29
2025-06-09T11:03:24.276988 - ComfyUI frontend version: 1.16.8
2025-06-09T11:03:24.276988 - [Prompt Server] web root: D:\Ai\ComfyUI_windows_portable\python_embeded\Lib\site-packages\comfyui_frontend_package\static
2025-06-09T11:03:25.400122 - Config Export Error2025-06-09T11:03:25.400122 - [Errno 2] No such file or directory: 'XXXHOST-PATHXXX\\PATH_CFG.json'2025-06-09T11:03:25.734006 - ComfyUI-GGUF: Partial torch compile only, consider updating pytorch
2025-06-09T11:03:25.753031 - ### Loading: ComfyUI-Impact-Pack (V8.15.3)2025-06-09T11:03:25.753031 - 
2025-06-09T11:03:26.107634 - [Impact Pack] Wildcards loading done.2025-06-09T11:03:26.114681 - 
2025-06-09T11:03:26.122418 - ### Loading: ComfyUI-Manager (V3.32.8)
2025-06-09T11:03:26.123251 - [ComfyUI-Manager] network_mode: public
2025-06-09T11:03:26.241014 - ### ComfyUI Revision: 3347 [93292bc4] *DETACHED | Released on '2025-04-17'
2025-06-09T11:03:26.716689 - [36;20m[D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux] | INFO -> Using ckpts path: D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux\ckpts[0m
2025-06-09T11:03:26.716689 - [36;20m[D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux] | INFO -> Using symlinks: False[0m
2025-06-09T11:03:26.716689 - [36;20m[D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux] | INFO -> Using ort providers: ['CUDAExecutionProvider', 'DirectMLExecutionProvider', 'OpenVINOExecutionProvider', 'ROCMExecutionProvider', 'CPUExecutionProvider', 'CoreMLExecutionProvider'][0m
2025-06-09T11:03:27.017334 - [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
2025-06-09T11:03:27.113419 - [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json
2025-06-09T11:03:27.135199 - [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json
2025-06-09T11:03:27.192743 - [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/github-stats.json
2025-06-09T11:03:27.716053 - [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/extension-node-map.json
2025-06-09T11:03:28.970262 - [ComfyUI-Manager] An error occurred while fetching 'https://api.comfy.org/nodes?page=1&limit=30&comfyui_version=v0.3.29&form_factor=git-windows': Expecting value: line 2 column 1 (char 1)
2025-06-09T11:03:28.970262 - Cannot connect to comfyregistry.2025-06-09T11:03:28.985997 - 
2025-06-09T11:03:29.001753 - FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json2025-06-09T11:03:29.001753 - 2025-06-09T11:03:29.055871 - D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux\node_wrappers\dwpose.py:26: UserWarning: DWPose: Onnxruntime not found or doesn't come with acceleration providers, switch to OpenCV with CPU device. DWPose might run very slowly
  warnings.warn("DWPose: Onnxruntime not found or doesn't come with acceleration providers, switch to OpenCV with CPU device. DWPose might run very slowly")
2025-06-09T11:03:29.327544 -  [DONE]2025-06-09T11:03:29.327544 - 
2025-06-09T11:03:29.524929 - [ComfyUI-Manager] All startup tasks have been completed.
2025-06-09T11:03:31.856243 - [34mWAS Node Suite: [0mOpenCV Python FFMPEG support is enabled[0m2025-06-09T11:03:31.860328 - 
2025-06-09T11:03:31.865483 - [34mWAS Node Suite [93mWarning: [0m`ffmpeg_bin_path` is not set in `D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\was-node-suite-comfyui\was_suite_config.json` config file. Will attempt to use system ffmpeg binaries if available.[0m2025-06-09T11:03:31.869930 - 
2025-06-09T11:03:32.316900 - [34mWAS Node Suite: [0mFinished.[0m [32mLoaded[0m [0m220[0m [32mnodes successfully.[0m2025-06-09T11:03:32.316900 - 
2025-06-09T11:03:32.316900 - 
	[3m[93m"The only limit to our realization of tomorrow will be our doubts of today."[0m[3m - Franklin D. Roosevelt[0m
2025-06-09T11:03:32.316900 - 
2025-06-09T11:03:32.316900 - 
Import times for custom nodes:
2025-06-09T11:03:32.316900 -    0.0 seconds: D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\websocket_image_save.py
2025-06-09T11:03:32.316900 -    0.0 seconds: D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-ImageGallery-ED
2025-06-09T11:03:32.316900 -    0.0 seconds: D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\Cup-ClipBoard
2025-06-09T11:03:32.316900 -    0.0 seconds: D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-CUP
2025-06-09T11:03:32.316900 -    0.0 seconds: D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_experiments
2025-06-09T11:03:32.316900 -    0.0 seconds: D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet-main
2025-06-09T11:03:32.316900 -    0.1 seconds: D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Tripo
2025-06-09T11:03:32.316900 -    0.1 seconds: D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Custom-Scripts
2025-06-09T11:03:32.316900 -    0.3 seconds: D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-GGUF
2025-06-09T11:03:32.332849 -    0.4 seconds: D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_essentials-main
2025-06-09T11:03:32.332849 -    0.4 seconds: D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Impact-Pack
2025-06-09T11:03:32.332849 -    0.5 seconds: D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-manager
2025-06-09T11:03:32.332849 -    1.3 seconds: D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\OneButtonPrompt
2025-06-09T11:03:32.332849 -    1.4 seconds: D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\was-node-suite-comfyui
2025-06-09T11:03:32.332849 -    2.6 seconds: D:\Ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux
2025-06-09T11:03:32.332849 - 
2025-06-09T11:03:32.332849 - Starting server

2025-06-09T11:03:32.332849 - To see the GUI go to: http://127.0.0.1:8188
2025-06-09T11:03:37.650461 - got prompt
2025-06-09T11:03:38.025734 - !!! Exception during processing !!! Error while deserializing header: InvalidHeaderDeserialization
2025-06-09T11:03:38.034301 - Traceback (most recent call last):
  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 345, 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 "D:\Ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 220, 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 "D:\Ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 192, in _map_node_over_list
    process_inputs(input_dict, i)
  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 181, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\nodes.py", line 570, in load_checkpoint
    out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings"))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 908, in load_checkpoint_guess_config
    sd, metadata = comfy.utils.load_torch_file(ckpt_path, return_metadata=True)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 68, in load_torch_file
    raise e
  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 55, in load_torch_file
    with safetensors.safe_open(ckpt, framework="pt", device=device.type) as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
safetensors_rust.SafetensorError: Error while deserializing header: InvalidHeaderDeserialization

2025-06-09T11:03:38.040510 - Prompt executed in 0.38 seconds
2025-06-09T11:04:17.790751 - got prompt
2025-06-09T11:04:17.821252 - !!! Exception during processing !!! Error while deserializing header: InvalidHeaderDeserialization
2025-06-09T11:04:17.845292 - Traceback (most recent call last):
  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 345, 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 "D:\Ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 220, 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 "D:\Ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 192, in _map_node_over_list
    process_inputs(input_dict, i)
  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 181, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\nodes.py", line 570, in load_checkpoint
    out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings"))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 908, in load_checkpoint_guess_config
    sd, metadata = comfy.utils.load_torch_file(ckpt_path, return_metadata=True)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 68, in load_torch_file
    raise e
  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 55, in load_torch_file
    with safetensors.safe_open(ckpt, framework="pt", device=device.type) as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
safetensors_rust.SafetensorError: Error while deserializing header: InvalidHeaderDeserialization

2025-06-09T11:04:17.871446 - Prompt executed in 0.07 seconds
2025-06-09T11:21:30.198259 - got prompt
2025-06-09T11:21:30.212261 - !!! Exception during processing !!! Error while deserializing header: InvalidHeaderDeserialization
2025-06-09T11:21:30.214325 - Traceback (most recent call last):
  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 345, 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 "D:\Ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 220, 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 "D:\Ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 192, in _map_node_over_list
    process_inputs(input_dict, i)
  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 181, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\nodes.py", line 570, in load_checkpoint
    out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings"))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 908, in load_checkpoint_guess_config
    sd, metadata = comfy.utils.load_torch_file(ckpt_path, return_metadata=True)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 68, in load_torch_file
    raise e
  File "D:\Ai\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 55, in load_torch_file
    with safetensors.safe_open(ckpt, framework="pt", device=device.type) as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
safetensors_rust.SafetensorError: Error while deserializing header: InvalidHeaderDeserialization

2025-06-09T11:21:30.218271 - Prompt executed in 0.01 seconds

```
## Attached Workflow
Please make sure that workflow does not contain any sensitive information such as API keys or passwords.
```
{"id":"00000000-0000-0000-0000-000000000000","revision":0,"last_node_id":12,"last_link_id":19,"nodes":[{"id":9,"type":"EmptyLatentImage","pos":[1117.3448486328125,362.3992919921875],"size":[315,106],"flags":{},"order":0,"mode":0,"inputs":[{"localized_name":"width","name":"width","type":"INT","widget":{"name":"width"},"link":null},{"localized_name":"height","name":"height","type":"INT","widget":{"name":"height"},"link":null},{"localized_name":"batch_size","name":"batch_size","type":"INT","widget":{"name":"batch_size"},"link":null}],"outputs":[{"localized_name":"LATENT","name":"LATENT","type":"LATENT","links":[9]}],"properties":{"cnr_id":"comfy-core","ver":"0.3.29","Node name for S&R":"EmptyLatentImage"},"widgets_values":[1024,1024,1]},{"id":5,"type":"CLIPTextEncode","pos":[1097.3914794921875,174.45838928222656],"size":[385.0762023925781,88],"flags":{},"order":4,"mode":0,"inputs":[{"localized_name":"clip","name":"clip","type":"CLIP","link":17},{"localized_name":"text","name":"text","type":"STRING","widget":{"name":"text"},"link":null}],"outputs":[{"localized_name":"CONDITIONING","name":"CONDITIONING","type":"CONDITIONING","links":[19]}],"properties":{"cnr_id":"comfy-core","ver":"0.3.29","Node name for S&R":"CLIPTextEncode"},"widgets_values":[""],"color":"#322","bgcolor":"#533"},{"id":4,"type":"CLIPTextEncode","pos":[1095.3770751953125,-71.65526580810547],"size":[400,200],"flags":{},"order":3,"mode":0,"inputs":[{"localized_name":"clip","name":"clip","type":"CLIP","link":16},{"localized_name":"text","name":"text","type":"STRING","widget":{"name":"text"},"link":null}],"outputs":[{"localized_name":"CONDITIONING","name":"CONDITIONING","type":"CONDITIONING","links":[18]}],"properties":{"cnr_id":"comfy-core","ver":"0.3.29","Node name for S&R":"CLIPTextEncode"},"widgets_values":["portrait of a woman"],"color":"#232","bgcolor":"#353"},{"id":10,"type":"VAEDecode","pos":[2219.472900390625,74.85771179199219],"size":[210,46],"flags":{},"order":6,"mode":0,"inputs":[{"localized_name":"samples","name":"samples","type":"LATENT","link":10},{"localized_name":"vae","name":"vae","type":"VAE","link":12}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[11]}],"properties":{"cnr_id":"comfy-core","ver":"0.3.29","Node name for S&R":"VAEDecode"},"widgets_values":[]},{"id":11,"type":"PreviewImage","pos":[2477.2490234375,76.54154968261719],"size":[210,246],"flags":{},"order":7,"mode":0,"inputs":[{"localized_name":"images","name":"images","type":"IMAGE","link":11}],"outputs":[],"properties":{"cnr_id":"comfy-core","ver":"0.3.29","Node name for S&R":"PreviewImage"},"widgets_values":[]},{"id":7,"type":"KSampler","pos":[1767.0162353515625,-9.899660110473633],"size":[315,474],"flags":{},"order":5,"mode":0,"inputs":[{"localized_name":"model","name":"model","type":"MODEL","link":15},{"localized_name":"positive","name":"positive","type":"CONDITIONING","link":18},{"localized_name":"negative","name":"negative","type":"CONDITIONING","link":19},{"localized_name":"latent_image","name":"latent_image","type":"LATENT","link":9},{"localized_name":"seed","name":"seed","type":"INT","widget":{"name":"seed"},"link":null},{"localized_name":"steps","name":"steps","type":"INT","widget":{"name":"steps"},"link":null},{"localized_name":"cfg","name":"cfg","type":"FLOAT","widget":{"name":"cfg"},"link":null},{"localized_name":"sampler_name","name":"sampler_name","type":"COMBO","widget":{"name":"sampler_name"},"link":null},{"localized_name":"scheduler","name":"scheduler","type":"COMBO","widget":{"name":"scheduler"},"link":null},{"localized_name":"denoise","name":"denoise","type":"FLOAT","widget":{"name":"denoise"},"link":null}],"outputs":[{"localized_name":"LATENT","name":"LATENT","type":"LATENT","links":[10]}],"properties":{"cnr_id":"comfy-core","ver":"0.3.29","Node name for S&R":"KSampler"},"widgets_values":[930925108629876,"randomize",20,1,"euler","beta",1]},{"id":12,"type":"LoraLoader","pos":[589.8250732421875,-32.128360748291016],"size":[315,126],"flags":{},"order":2,"mode":0,"inputs":[{"localized_name":"model","name":"model","type":"MODEL","link":13},{"localized_name":"clip","name":"clip","type":"CLIP","link":14},{"localized_name":"lora_name","name":"lora_name","type":"COMBO","widget":{"name":"lora_name"},"link":null},{"localized_name":"strength_model","name":"strength_model","type":"FLOAT","widget":{"name":"strength_model"},"link":null},{"localized_name":"strength_clip","name":"strength_clip","type":"FLOAT","widget":{"name":"strength_clip"},"link":null}],"outputs":[{"localized_name":"MODEL","name":"MODEL","type":"MODEL","links":[15]},{"localized_name":"CLIP","name":"CLIP","type":"CLIP","links":[16,17]}],"properties":{"cnr_id":"comfy-core","ver":"0.3.29","Node name for S&R":"LoraLoader"},"widgets_values":["Design\\papercut.safetensors",1,1]},{"id":3,"type":"CheckpointLoaderSimple","pos":[79.66006469726562,92.55416870117188],"size":[315,98],"flags":{},"order":1,"mode":0,"inputs":[{"localized_name":"ckpt_name","name":"ckpt_name","type":"COMBO","widget":{"name":"ckpt_name"},"link":null}],"outputs":[{"localized_name":"MODEL","name":"MODEL","type":"MODEL","links":[13]},{"localized_name":"CLIP","name":"CLIP","type":"CLIP","links":[14]},{"localized_name":"VAE","name":"VAE","type":"VAE","links":[12]}],"properties":{"cnr_id":"comfy-core","ver":"0.3.29","Node name for S&R":"CheckpointLoaderSimple"},"widgets_values":["flux1-dev-fp8.safetensors"]}],"links":[[9,9,0,7,3,"LATENT"],[10,7,0,10,0,"LATENT"],[11,10,0,11,0,"IMAGE"],[12,3,2,10,1,"VAE"],[13,3,0,12,0,"MODEL"],[14,3,1,12,1,"CLIP"],[15,12,0,7,0,"MODEL"],[16,12,1,4,0,"CLIP"],[17,12,1,5,0,"CLIP"],[18,4,0,7,1,"CONDITIONING"],[19,5,0,7,2,"CONDITIONING"]],"groups":[],"config":{},"extra":{"ds":{"scale":0.9229599817706885,"offset":[-35.688659187764245,196.63612505210955]},"frontendVersion":"1.16.8","reroutes":[{"id":10,"pos":[1739.99658203125,715.8917846679688],"linkIds":[9]},{"id":11,"parentId":10,"pos":[1732.232666015625,484.27398681640625],"linkIds":[9]},{"id":12,"pos":[1338.0205078125,-364.29925537109375],"linkIds":[15]},{"id":13,"parentId":14,"pos":[2071.25439453125,874.9921264648438],"linkIds":[12]},{"id":14,"pos":[529.2798461914062,874.7973022460938],"linkIds":[12]}],"linkExtensions":[{"id":9,"parentId":11},{"id":12,"parentId":13},{"id":15,"parentId":12}]},"version":0.4}
```

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


### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

My english is not very good please you fill it 
thank you so much

### Expected behavior

My english is not very good please you fill it 
thank you so much

Comments:
Hi @saeedafm, this seems like an issue with the checkpoint you're using. Can you paste a simple script that shows the issue?

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.