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

FileNotFoundError: [Errno 2] No such file or directory: 'models/ldm/stable-diffusion-v1/model.ckpt' #224

Open
Night-Chan opened this issue Nov 17, 2022 · 1 comment

Comments

@Night-Chan
Copy link

Using img2img within miniconda raises the error:

Traceback (most recent call last):
File "optimizedSD/optimized_img2img.py", line 191, in
sd = load_model_from_config(f"{ckpt}")
File "optimizedSD/optimized_img2img.py", line 30, in load_model_from_config
pl_sd = torch.load(ckpt, map_location="cpu")
File "\miniconda3\envs\ldm\lib\site-packages\torch\serialization.py", line 699, in load
with _open_file_like(f, 'rb') as opened_file:
File "
\miniconda3\envs\ldm\lib\site-packages\torch\serialization.py", line 231, in _open_file_like
return _open_file(name_or_buffer, mode)
File "~~\miniconda3\envs\ldm\lib\site-packages\torch\serialization.py", line 212, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'models/ldm/stable-diffusion-v1/model.ckpt'

User directory replaced with ~~
A similar error comes up when using a 32 bit version of miniconda.

Might possibly be a configuration issue on my end, it could be I missed the installation of a dependancy.
I could replicate this error on a different system too, but havent found the reason for it.

@doommate
Copy link

doommate commented Nov 17, 2022

You are missing the "model.ckpt" file..
I'm not sure if this (optimized) version uses the same one, but I got mine here:
https://huggingface.co/CompVis/stable-diffusion#model-access

Select "stable-diffusion-v-1-4-original" and then "sd-v1-4.ckpt".
The file is around 5GB.
After it's downloaded, move it to location "models/ldm/stable-diffusion-v1/" and rename it into model.cpkt

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