Error while deserializing header: HeaderTooLarge
The message
Error while deserializing header: HeaderTooLargeWhat it means
The first eight bytes of a .safetensors file say how long its header is. In your file they add up to a nonsense size, which means the file is damaged or isn't a safetensors file at all.
What to do
Download the model file again from its original page, compare its size with the listed one, and make sure you saved the file itself and not a web page or a different format renamed to .safetensors.
A loader node (Load Checkpoint, Load LoRA, DualCLIPLoader, an IPAdapter loader) fails the moment the workflow reaches it:
Error occurred when executing LoraLoader:
Error while deserializing header: HeaderTooLarge
That's from issue #2204. The text comes from the safetensors library, which ComfyUI uses to read model files, and its wording has changed: since safetensors 0.6.0 (June 2025) the same failure prints Error while deserializing header: header too large. Both mean the same thing.
What the header is
A safetensors file starts with eight bytes holding a number, the length of a short JSON index (the header) that lists every tensor in the file. The format's README spells this out. The library refuses a header over 100 MB, a limit its README gives as protection against parsing huge JSON. Real headers are far smaller than that.
So when the first eight bytes of your file decode to something over 100 MB, the library stops with this error. It isn't really saying the header is big. It's saying the start of the file doesn't look like a safetensors file.
How a file ends up like that
The ComfyUI team's replies all point the same way. On #2204 comfyanonymous, who created ComfyUI, wrote, "Your lora file is corrupt or not a safetensors file." A team member on #5838: "Typically, this happens when the model you downloaded is corrupted."
In practice that covers a download that broke partway, a link that saved an error page instead of the model, or a file in another format (.ckpt, .pt) that was renamed. ComfyUI 0.37.0 has its own note for this case, added to the error when it recognizes it: "Make sure this is actually a safetensors file and not a ckpt or pt or other filetype." That note looks for the old HeaderTooLarge spelling, though, so with a current safetensors you may get the bare "header too large" line without it.
How to fix it
Check the file size first. It's quick, and a checkpoint of a few kilobytes can't be a model. If the size is short of what the download page lists, the download broke.
Then download it again. One person in #2643 got past it by reinstalling ComfyUI and downloading the models again, this time with a download manager, having stopped trusting the browser with multi-gigabyte files.
If you have a file that's genuinely in another format, don't rename it. Put it where the loader accepts that format, or use a safetensors copy from the model's page.
When the error names a file you're sure is fine (people in #5826 insisted theirs were), look for a file path in the full message (ComfyUI's added note includes one) and check that exact file, since that's the one the node opened.
Other lines the same feature prints
Match yours against these if the one at the top of the page is not quite it. They come from the same code and mean related things.
safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLargeError while deserializing header: header too largeThe safetensors file is corrupt or invalid. Make sure this is actually a safetensors file and not a ckpt or pt or other filetype.The safetensors header is too large.HeaderTooLarge