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
img2img.py FileNotFoundError: [Errno 2] #189
Comments
It seems the problem here is not that you are referencing to images in an "inputs" folder, but that you have not properly installed the model weights. In the stable-diffusion README, they explain that after your obtain the |
@ryanirl thanks for the reply. Bit confused here, I am able to run txt2img outputs so pretty sure I have all the weights. I already have models/ldm/stable-diffusion-v1/ just no model.ckpt Do navigate to stable-diffusion-v1/ in the terminal and then run ln -s <path/to/model.ckpt> models/ldm/stable-diffusion-v1/model.ckpt ? |
@ryanirl just got this working. I did have the weights, just had rename it from sd-v1-4.ckpt to model.ckpt and move to stable-diffusion-v1. Thanks again for the reply. |
One little tip: when creating the symbolic link you have to use an absolute path to the sd-v1-4.ckpt and not a relative one - I made that mistake at first. |
@Quasimondo just ran into that! @CompVis I think that should definitely be documented, since it isn't clear. |
I've got the same issue, however I'd already downloaded the sd-v1-4.ckpt, renamed it to model.ckpt, and have moved it to the models/ldm/stable-diffusion-v1 folder which I'd created. However I'm still getting the "FileNotFoundError: [Errno 2] No such file or directory: 'models/ldm/stable-diffusion-v1/model.ckpt'" error each time I try running the image. Any ideas? |
You could add a print(os.path.abspath(ckpt)) before the load model line and see if it tries to load it from a different path. |
I could not find the weights we are they? |
If you're looking at this tutorial: Then you missed the step of adding the model to the directory that you created. Make sure you change the name of the file to "model.ckpt" |
I'm a Linux noob so I've more than likely for my path wrong, anyone able to help on this? I have a "inputs" sub folder/directory in my stable diffusion directory and using this to point to the img:
python scripts/img2img.py --prompt "highly detailed,charcoal portrait" --init-img inputs/00030.png --strength 0.8
but get this error:
FileNotFoundError: [Errno 2] No such file or directory: 'models/ldm/stable-diffusion-v1/model.ckpt'
The text was updated successfully, but these errors were encountered: