Is there any way to download this on my PC and run it offline? Something like a command-line tool like

    $ ./something "cow flying in space" > cow-in-space.png
that runs with local-only data (i.e. no internet access, no DRM, no weird API keys, etc like pretty much every AI-related application i've seen recently) would be neat.

You can run it with Cog: https://github.com/replicate/cog

    cog predict r8.im/stability-ai/stable-diffusion -i prompt="cow flying in space"
Or you can run the Docker image directly. More details under "run on your own computer" here: https://replicate.com/stability-ai/stable-diffusion
Thanks! This worked for me finally. The conda approach suggested elsewhere was getting too complicated, and wasn't working properly (for me).

I built a simple UI around this, which installs Stable Diffusion's docker image, and lets you play with it locally in a browser-based UI. https://github.com/cmdr2/stable-diffusion-ui