You may have read Run Stable Diffusion on your M1 Mac’s GPU. (The Linux equivalent is here.)
Here are a few code changes you might wish to make:
Remove the safety filter:
You may receive an error such as:
“Potential NSFW content was detected in one or more images. A black image will be returned instead. Try again with a different prompt and/or seed.”
You can disable that check as follows:
|
|
There are probably more elegant ways to disable it, but this works.
Remove some verbosity
Some of the output is quite verbose and isn’t needed by the casual user. Here’s two warnings that I’ve removed.
|
|
Those messages are fairly informative if you are modifying the model or doing other development work. If you are just recreationally generating images, you won’t miss them.