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

Error: The system cannot find the file specified. (os error 2) #65

Closed
eoriont opened this issue May 22, 2023 · 2 comments
Closed

Error: The system cannot find the file specified. (os error 2) #65

eoriont opened this issue May 22, 2023 · 2 comments

Comments

@eoriont
Copy link
Contributor

eoriont commented May 22, 2023

     Running `target\debug\examples\stable-diffusion.exe --prompt "A very rusty robot holding a fire torch." --cpu all`
Cuda available: false
Cudnn available: false
MPS available: false
Running with prompt "A very rusty robot holding a fire torch.".
Building the Clip transformer.
Error: The system cannot find the file specified. (os error 2)
error: process didn't exit successfully: `target\debug\examples\stable-diffusion.exe --prompt "A very rusty robot holding a fire torch." --cpu all` (exit code: 1)

This is the output I get after running cargo run --example stable-diffusion --features clap -- --prompt "A rusty robot holding a fire torch." in cmd. I am on windows. I ran scripts/download_weights.sh in WSL and moved the /scripts/data directory to /data beforehand as well. I don't know what file it's referring to by "Error: The system cannot find the file specified. (os error 2)", help would be appreciated!

@LaurentMazare
Copy link
Owner

It's indeed annoying that the file does not get mentioned in the error message (which is a limitation of the Rust standard library). My guess is that it's the clip weight files based on the log, but it's the first one to be loaded.
Note that this was recently switched to use safetensors by default, so maybe that's related. Could you check that your data directory contains pytorch_model.safetensors?
If so could you also try overriding the clip weight file to point it at the appropriate place with --clip-weights path/to/clip-weights?

@eoriont
Copy link
Contributor Author

eoriont commented May 22, 2023

Thanks for the response. I ended up manually logging the filenames, and found out that it expected the stable-diffusion-v2.1 filenames, whereas I had the v1.5 files downloaded. Added --sd-version v1-5 to the command, and it worked.

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