stable-diffusion icon indicating copy to clipboard operation
stable-diffusion copied to clipboard

Use CPU if no CUDA device is detected

Open philippschw opened this issue 3 years ago • 9 comments

philippschw avatar Aug 30 '22 10:08 philippschw

@philippschw how did the duration for the run change? i feel like it would take way longer, if it works at all?

JustinGuese avatar Aug 30 '22 13:08 JustinGuese

@JustinGuese, it works but you are also right, it takes over an hour to make a single inference call on my MacBook Pro. 2.9 GHz 6-Core Intel i9 and 16GB RAM.

philippschw avatar Aug 31 '22 10:08 philippschw

That can't be right. I have an i7-1260p with 8 actual cores. A 512x512 image with 50 steps will inference in 12 minutes on my branch. The OpenVINO model does the same in 7 minutes.

illeatmyhat avatar Sep 01 '22 06:09 illeatmyhat

yeah anyways, cpu time is way too long

out of curiosity: if I would provide a "hosted" stable-diffusion, would you actually pay for it? or rather use the CPU for cost reasons? like the server would cost me ~600€/month, so I would need a lot of interest/people to be worth it

JustinGuese avatar Sep 01 '22 07:09 JustinGuese

conda env create -f environment.yaml

fails on mac, not sure if this PR should include an alternative environment.yaml?

shi-yan avatar Sep 07 '22 16:09 shi-yan

conda env create -f environment.yaml

on mac, not sure if this PR should include an alternative environment.yaml?

sorry, didn't realize there is environment-cpu.yaml

shi-yan avatar Sep 07 '22 16:09 shi-yan

There is a bug: undefined variable wm_encoder in scripts/txt2img.py, because imwatermark was intentionally removed.

jpdeleon avatar Sep 08 '22 07:09 jpdeleon

There is a bug: undefined variable wm_encoder in scripts/txt2img.py, because imwatermark was intentionally removed.

Thanks @jpdeleon, I updated the code.

philippschw avatar Sep 08 '22 07:09 philippschw

That can't be right. I have an i7-1260p with 8 actual cores. A 512x512 image with 50 steps will inference in 12 minutes on my branch. The OpenVINO model does the same in 7 minutes.

similar for me here

alperinugur avatar Sep 13 '22 20:09 alperinugur