> User specified autocast device_type must be 'cuda' or 'cpu'
> Are you sure your system has an adequate NVIDIA GPU?
I found the solution here: https://github.com/lstein/stable-diffusion/issues/293#issuec...
Yes, the safety checker will zero out images but can just turn it off with an “if False:”; Mostly black images are due to a bug, especially frustrating because it turns up on high step counts and means you’ve wasted time running it.
My experience has been roughly 2-4/32 of an image batch comes back black at the default settings, regardless of the prompt.
Just stamp out images in batches and discard the black ones.
--sampler k_euler
full command:
"photography of a cat on the moon" -s 20 -n 3 --sampler k_euler -W 384 -H 384
AttributeError: module 'torch._C' has no attribute '_cuda_resetPeakMemoryStats'
https://gist.github.com/JAStanton/73673d249927588c93ee530d08...
The command that finally worked for me:
python3 -m venv venv
. venv/bin/activate
CFLAGS="-I /opt/homebrew/opt/[email protected]/include" LDFLAGS="-L /opt/homebrew/opt/[email protected]/lib -L/opt/homebrew/Cellar/[email protected]/1.1.1q/lib -lssl -lcrypto" PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig" GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 pip install -r requirements.txt FileNotFoundError: [Errno 2] No such file or directory: 'models/ldm/stable-diffusion-v1/model.ckpt'
Looks like there's a step missing or broken at downloading the actual weights.Going up to the parent repo points at a bunch of dead links or hugginface pages.
[0] https://huggingface.co/CompVis/stable-diffusion-v-1-4-origin... [1] https://github.com/lstein/stable-diffusion/blob/main/README-...
EDIT: Got it working, with a couple of pre-requisite steps:
0. `rm` the existing `stable-diffusion` repo (assuming you followed OP's original setup)
1. Install `conda`, if you don't already have it:
2. Install the other build requirements referenced in OP's setup: 3. Follow the main installation instructions here: https://github.com/lstein/stable-diffusion/blob/main/README-...Then you should be good to go!
EDIT 2: After playing around with this repo, I've found:
- It offers better UX for interacting with Stable Diffusion, and seems to be a promising project.
- Running txt2img.py from lstein's repo seems to run about 30% faster than OP's. Not sure if that's a coincidence, or if they've included extra optimisations.
- I couldn't get the web UI to work. It kept throwing the "leaked semaphor objects" error someone else reported (even when rendering at 64x64).
- Sometimes it rendered images just as a black canvas, other times it worked. This is apparently a known issue and a fix is being tested.
I've reached the limits of my knowledge on this, but will following closely as new PRs are merged in over the coming days. Exciting!