<story><title>Stable Diffusion Public Release</title><url>https://stability.ai/blog/stable-diffusion-public-release</url></story><parent_chain><item><author>badsectoracula</author><text>Is there any way to download this on my PC and run it offline? Something like a command-line tool like&lt;p&gt;&lt;pre&gt;&lt;code&gt;    $ .&amp;#x2F;something &amp;quot;cow flying in space&amp;quot; &amp;gt; cow-in-space.png
&lt;/code&gt;&lt;/pre&gt;
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&amp;#x27;ve seen recently) would be neat.</text></item></parent_chain><comment><author>mkaic</author><text>Yes, that&amp;#x27;s actually the biggest reason this is such a cool announcement! You just need to download the model checkpoints from HuggingFace[0] and follow the instructions on their Github repo[1] and  and you should be good to go. You basically just need to clone the repo, set up a conda environment, and make the weights available to the scripts they provide.&lt;p&gt;[0] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;huggingface.co&amp;#x2F;CompVis&amp;#x2F;stable-diffusion&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;huggingface.co&amp;#x2F;CompVis&amp;#x2F;stable-diffusion&lt;/a&gt;
[1] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;CompVis&amp;#x2F;stable-diffusion&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;CompVis&amp;#x2F;stable-diffusion&lt;/a&gt;&lt;p&gt;Good luck!</text></comment>
<story><title>Stable Diffusion Public Release</title><url>https://stability.ai/blog/stable-diffusion-public-release</url></story><parent_chain><item><author>badsectoracula</author><text>Is there any way to download this on my PC and run it offline? Something like a command-line tool like&lt;p&gt;&lt;pre&gt;&lt;code&gt;    $ .&amp;#x2F;something &amp;quot;cow flying in space&amp;quot; &amp;gt; cow-in-space.png
&lt;/code&gt;&lt;/pre&gt;
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&amp;#x27;ve seen recently) would be neat.</text></item></parent_chain><comment><author>jsmith45</author><text>I &lt;i&gt;think&lt;/i&gt; the answer is yes, but setup is a bit complicated. I would test this myself, but I don&amp;#x27;t have an NVIDIA card with at least 10GB of VRAM.&lt;p&gt;One time:&lt;p&gt;1. Have &amp;quot;conda&amp;quot; installed.&lt;p&gt;2. clone &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;CompVis&amp;#x2F;stable-diffusion&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;CompVis&amp;#x2F;stable-diffusion&lt;/a&gt;&lt;p&gt;3. `conda env create -f environment.yaml`&lt;p&gt;4. activate the Venv with `conda activate ldm`&lt;p&gt;5. Download weights from &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;huggingface.co&amp;#x2F;CompVis&amp;#x2F;stable-diffusion-v-1-4-original&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;huggingface.co&amp;#x2F;CompVis&amp;#x2F;stable-diffusion-v-1-4-origin...&lt;/a&gt; (requires registration).&lt;p&gt;6. `mkdir -p models&amp;#x2F;ldm&amp;#x2F;stable-diffusion-v1&amp;#x2F;`&lt;p&gt;7. `ln -s &amp;lt;path&amp;#x2F;to&amp;#x2F;model.ckpt&amp;gt; models&amp;#x2F;ldm&amp;#x2F;stable-diffusion-v1&amp;#x2F;model.ckpt`. (you can download the other version of the model, like v1-1, v1-2, and v1-3 and symlink them instead if you prefer).&lt;p&gt;To run:&lt;p&gt;1. activate venv with `conda activate ldm` (unless still in a prompt running inside the venv).&lt;p&gt;2. `python scripts&amp;#x2F;txt2img.py --prompt &amp;quot;a photograph of an astronaut riding a horse&amp;quot; --plms`.&lt;p&gt;Also there is a safety filter in the code that will black out NSFW or otherwise expected to be offensive images (presumably also including things like swastikas, gore, etc). It is trivial to disable by editing the source if you want.</text></comment>