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

OSError: Unable to load weights from pytorch checkpoint file for (...) #12

Closed
furmanlukasz opened this issue Sep 8, 2022 · 6 comments
Closed

Comments

@furmanlukasz
Copy link

In direct linux machine I get these error:

OSError: Unable to load weights from pytorch checkpoint file for '/home/huggingface/.cache/huggingface/diffusers/models--CompVis--stable-diffusion-v1-4/snapshots/48a1bd8a2d86483de1ac27e95e188569b57a494e/unet/diffusion_pytorch_model.bin' at '/home/huggingface/.cache/huggingface/diffusers/models--CompVis--stable-diffusion-v1-4/snapshots/48a1bd8a2d86483de1ac27e95e188569b57a494e/unet/diffusion_pytorch_model.bin'. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.

Looks like this path is broken when building it /home/huggingface/.cache/huggingface/diffusers/models--CompVis--stable-diffusion-v1- but I can pind place where to fix it.

@fboulnois
Copy link
Owner

fboulnois commented Sep 9, 2022

To clarify, are you trying to run the Python code without Docker or the build script?

@furmanlukasz
Copy link
Author

furmanlukasz commented Sep 9, 2022

This is after building docker container when running ./build run "prompt"

@fboulnois
Copy link
Owner

fboulnois commented Sep 9, 2022

I reran the commands on a fresh machine and I wasn't able to reproduce this issue. If you clear out the huggingface volume (docker volume rm huggingface), are you able to download all the models successfully to fix the issue? Keep in mind this will permanently erase the volume and all its contents.

@furmanlukasz
Copy link
Author

That did work! Thank you, however right now it seems that docker has no permission to save it in output directory PermissionError: [Errno 13] Permission denied: 'output/horse_on_the_moon___steps_50__scale_7.50__seed_14724727502852850856__n_1.png'

@fboulnois
Copy link
Owner

Were you able to resolve this issue? Does the output folder exist outside the container? If so, which user owns that folder?

@fboulnois fboulnois added the waiting-on-submitter Waiting for submitter to provide more information label Sep 15, 2022
@furmanlukasz
Copy link
Author

furmanlukasz commented Sep 20, 2022

I need to add the docker to a new group, then it had permission to write down the file.

@fboulnois fboulnois removed the waiting-on-submitter Waiting for submitter to provide more information label Sep 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants