Error / Models and files
Error while deserializing header (corrupted model file)
The model file can't be read, usually because the download is incomplete or corrupted.
The message
safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge
Affects: ComfyUI
Why is this happening?
A .safetensors file starts with a header that describes what's inside the file. If the download was interrupted, the drive was full, or a website was saved instead of the model, that header is broken.
How to fix it
- Compare the file size with the information on the download page (e.g. Hugging Face). If the file is much smaller, it's incomplete.
- Delete the file and download it again, ideally using the download button on the model page or the ComfyUI Manager.
- Check whether enough free storage is available. Models are often 2 to 15 GB or more.
- Check whether ComfyUI has read permissions for the folder (e.g. on network drives or protected folders).
- Test a different model to see whether only this one file is affected.
Set up from scratch again
If it still doesn’t work after that, a fresh setup step by step often helps:
- Set up and maintain ComfyUI on Windows
Desktop or Portable, where the models belong, sharing models with other programs, safely installing custom nodes, updates, startup options … - Your First Image with ComfyUI
Install Comfy Desktop, learn the interface, and create your first AI image with FLUX.2 [small] 4B or Z-Image Turbo. - Your First AI Video with LTX in ComfyUI
Use LTX-2.3 in ComfyUI to create short videos with sound from text or an image. Template, files, settings, and license.
Terms for this
Similar errors
- ControlNet: Error(s) in loading state_dict … size mismatch (ControlNet does not match the base model)
- ERROR: Could not detect model type of: … (Model is in the wrong folder or the wrong loader)
- Hugging Face download stops or hangs (.incomplete)
- IPAdapter model not found / ClipVision model not found (IPAdapter files are missing or named incorrectly)
- Prompt outputs failed validation / Value not in list (Model missing)
Sources
Checked on Oct 21, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.