LaurentMazare / diffusers-rs

An implementation of the diffusers api in Rust
Apache License 2.0
539 stars 55 forks source link

Running the 1.5 model is not possible without having the 2.1 weights installed #28

Closed JohnAlcatraz closed 1 year ago

JohnAlcatraz commented 1 year ago

As far as I understand it, this command should generate an image with SD 1.5:

cargo run --example stable-diffusion --features clap -- --prompt "A rusty robot holding a fire torch."

and this command should generate an image with SD 2.1:

cargo run --example stable-diffusion-2 --features clap -- --prompt "A rusty robot holding a fire torch."

I am trying to run the first command, that should use SD 1.5. But I get this error:

Error: Internal torch error: open file failed because of errno 2 on fopen: No such file or directory, file path: data/clip_v2.1.ot

I have the weights for 1.5 in the data folder, but no weights for 2.1.

LaurentMazare commented 1 year ago

The stable diffusion version is controlled by the --sd-version flag, did you try changing this to use 1.5 rather than 2.1?

JohnAlcatraz commented 1 year ago

Ah, no I have not tried that. I thought the switch between the version happens by picking either --example stable-diffusion (1.5) or --example stable-diffusion-2 (2.1). The readme does not mention how to pick a version, so I was going by what you wrote in the issue for 2.0 support. It would probably be a good idea to add some info about how to pick a version to the readme.

If I run it with --sd-version v1-5, then it does seem to work fine without the 2.1 weights. Thanks!