Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge #100

Open
xll-ecnu opened this issue Dec 23, 2024 · 1 comment

Comments

@xll-ecnu
Copy link

Traceback (most recent call last):
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/diffusers/models/model_loading_utils.py", line 142, in load_state_dict
return safetensors.torch.load_file(checkpoint_file, device="cpu")
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/safetensors/torch.py", line 313, in load_file
with safe_open(filename, framework="pt", device=device) as f:
safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/gradio/queueing.py", line 624, in process_events
response = await route_utils.call_process_api(
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/gradio/route_utils.py", line 323, in call_process_api
output = await app.get_blocks().process_api(
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/gradio/blocks.py", line 2015, in process_api
result = await self.call_function(
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/gradio/blocks.py", line 1562, in call_function
prediction = await anyio.to_thread.run_sync( # type: ignore
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
return await future
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
result = context.run(func, *args)
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/gradio/utils.py", line 865, in wrapper
response = f(*args, **kwargs)
File "/home/mlp/echomimic_v2-main/app.py", line 53, in generate
vae = AutoencoderKL.from_pretrained("./pretrained_weights/sd-vae-ft-mse").to(device, dtype=dtype)
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/diffusers/models/modeling_utils.py", line 840, in from_pretrained
state_dict = load_state_dict(model_file, variant=variant)
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/diffusers/models/model_loading_utils.py", line 154, in load_state_dict
raise OSError(
OSError: You seem to have cloned a repository without having git-lfs installed. Please install git-lfs and run git lfs install followed by git lfs pull in the folder you cloned.
Traceback (most recent call last):
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/diffusers/models/model_loading_utils.py", line 142, in load_state_dict
return safetensors.torch.load_file(checkpoint_file, device="cpu")
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/safetensors/torch.py", line 313, in load_file
with safe_open(filename, framework="pt", device=device) as f:
safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/gradio/queueing.py", line 624, in process_events
response = await route_utils.call_process_api(
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/gradio/route_utils.py", line 323, in call_process_api
output = await app.get_blocks().process_api(
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/gradio/blocks.py", line 2015, in process_api
result = await self.call_function(
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/gradio/blocks.py", line 1562, in call_function
prediction = await anyio.to_thread.run_sync( # type: ignore
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
return await future
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
result = context.run(func, *args)
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/gradio/utils.py", line 865, in wrapper
response = f(*args, **kwargs)
File "/home/mlp/echomimic_v2-main/app.py", line 53, in generate
vae = AutoencoderKL.from_pretrained("./pretrained_weights/sd-vae-ft-mse").to(device, dtype=dtype)
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/diffusers/models/modeling_utils.py", line 840, in from_pretrained
state_dict = load_state_dict(model_file, variant=variant)
File "/home/mlp/anaconda3/envs/echomimic2/lib/python3.10/site-packages/diffusers/models/model_loading_utils.py", line 154, in load_state_dict
raise OSError(
OSError: You seem to have cloned a repository without having git-lfs installed. Please install git-lfs and run git lfs install followed by git lfs pull in the folder you cloned.

@mengrang mengrang reopened this Dec 24, 2024
@mengrang mengrang added the invalid This doesn't seem right label Dec 25, 2024
@xll-ecnu
Copy link
Author

I have solved this problem. This problem derives from broken weight models downloaded using huggingface_cli command. I redownload the weight models using 'git clone' command and it can run well now.

@mengrang mengrang added done tutorial and removed invalid This doesn't seem right labels Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants