InstantID icon indicating copy to clipboard operation
InstantID copied to clipboard

no file diffusion_pytorch_model.bin

Open jifei opened this issue 1 year ago • 3 comments

controlnet = ControlNetModel.from_pretrained(controlnet_path, torch_dtype=torch.float16)

File "/root/miniconda3/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/root/miniconda3/lib/python3.10/site-packages/diffusers/models/modeling_utils.py", line 634, in from_pretrained model_file = _get_model_file( File "/root/miniconda3/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/root/miniconda3/lib/python3.10/site-packages/diffusers/utils/hub_utils.py", line 262, in _get_model_file raise EnvironmentError( OSError: Error no file named diffusion_pytorch_model.bin found in directory ./checkpoints/ControlNetModel.

jifei avatar Feb 06 '24 12:02 jifei

Please make sure that you have downloaded the required models successfully.

haofanwang avatar Feb 06 '24 14:02 haofanwang

https://huggingface.co/InstantX/InstantID/tree/main/ControlNetModel, there's diffusion_pytorch_model.safetensors but no diffusion_pytorch_model.bin

jifei avatar Feb 07 '24 02:02 jifei

Please make sure that you have downloaded the required models successfully.

In https://huggingface.co/InstantX/InstantID/tree/main/ControlNetModel, there's diffusion_pytorch_model.safetensors but no diffusion_pytorch_model.bin. Fully referenced README.md

jifei avatar Feb 08 '24 11:02 jifei

I'm facing the same error. I tried converting it to a bin but then it throws errors relating to weights, etc.

jontstaz avatar Feb 09 '24 07:02 jontstaz

Starting from today, I'm facing the same issue guys. Why is it trying to use the .bin instead of .safetensors ? Before it used .safetensors .

gagbaghdas avatar Feb 15 '24 10:02 gagbaghdas

ok, I found the problem. It comes from the diffusion_pytorch_model.safetensors file, something is wrong with the file. In my case, I've downloaded it using the hub downloaded , which put the model into hugging face cache, and created a symlink , and it didn't work , as I tried to run my project with docker , which means that the symlink pointed to the directory outside from the docker.

gagbaghdas avatar Feb 15 '24 10:02 gagbaghdas

I meet the same issue. Has anyone find quick methods to fix this?

OSError: Error no file named diffusion_pytorch_model.bin found in directory ./checkpoints/ControlNetModel.

JohnCarpenter2 avatar Feb 20 '24 03:02 JohnCarpenter2

I meet the same issue. Has anyone find quick methods to fix this?

OSError: Error no file named diffusion_pytorch_model.bin found in directory ./checkpoints/ControlNetModel.

Check your diffusion_pytorch_model.safetensors file. Check it's size and actual location.

gagbaghdas avatar Feb 20 '24 11:02 gagbaghdas

I meet the same issue. Has anyone find quick methods to fix this?

OSError: Error no file named diffusion_pytorch_model.bin found in directory ./checkpoints/ControlNetModel.

Check your diffusion_pytorch_model.safetensors file. Check it's size and actual location.

Thanks a lot. The bug is fixed. @gagbaghdas

JohnCarpenter2 avatar Feb 20 '24 11:02 JohnCarpenter2