r/StableDiffusion • • Aug 22 '22

Discussion How do I run Stable Diffusion and sharing FAQs

I see a lot of people asking the same questions. This is just an attempt to get some info in one place for newbies, anyone else is welcome to contribute or make an actual FAQ. Please comment additional help!

This thread won't be updated anymore, check out the wiki instead!. Feel free to keep discussion going below! Thanks for the great response everyone (and the awards kind strangers)

How do I run it on my PC?

  • New updated guide here, will also be posted in the comments (thanks 4chan). You need no programming experience, it's all spelled out.
  • Check out the guide on the wiki now!

How do I run it without a PC? / My PC can't run it

  • https://beta.dreamstudio.ai - you start with 200 standard generations free (NSFW Filter)
  • Google Colab - (non functional until release) run a limited instance on Google's servers. Make sure to set GPU Runtime (NSFW Filter)
  • Larger list of publicly accessible Stable Diffusion models

How do I remove the NSFW Filter

Will it run on my machine?

  • A Nvidia GPU with 4 GB or more RAM is required
  • AMD is confirmed to work with tweaking but is unsupported
  • M1 chips are to be supported in the future

I'm confused, why are people talking about a release

  • "Weights" are the secret sauce in the model. We're operating on old weights right now, and the new weights are what we're waiting for. Release 2 PM EST
  • See top edit for link to the new weights
  • The full release was 8/23

My image sucks / I'm not getting what I want / etc

  • Style guides now exist and are great help
  • Stable Diffusion is much more verbose than competitors. Prompt engineering is powerful. Try looking for images on this sub you like and tweaking the prompt to get a feel for how it works
  • Try looking around for phrases the AI will really listen to

My folder name is too long / file can't be made

  • There is a soft limit on your prompt length due to the character limit for folder names
  • In optimized_txt2img.py change sample_path = os.path.join(outpath, "_".join(opt.prompt.split()))[:255] to sample_path = os.path.join(outpath, "_") and replace "_" with the desired name. This will write all prompts to the same folder but the cap is removed

How to run Img2Img?

  • Use the same setup as the guide linked above, but run the command python optimizedSD/optimized_img2img.py --prompt "prompt" --init-img ~/input/input.jpg --strength 0.8 --n_iter 2 --n_samples 2 --H 512--W 512
  • Where "prompt" is your prompt, "input.jpg" is your input image, and "strength" is adjustable
  • This can be customized with similar arguments as text2img

Can I see what setting I used / I want better filenames

  • TapuCosmo made a script to change the filenames
  • Use at your own risk. Download is from a discord attachment
788 Upvotes

652 comments sorted by

View all comments

1

u/cpt_flash_ Aug 29 '22

Hello, what i need to change in order to make public link, not just run it at 127.0.0.1:7860?

1

u/[deleted] Aug 29 '22 edited Aug 29 '22

at least in my version of webui.py, add the run option

--share

and it will print a public gradio.app link to the console when it starts.

1

u/cpt_flash_ Aug 29 '22

python scripts/webgui.py --share
something like that? not working though
but if i run it locally it always says To create a public link, set `share=True` in `launch()`.
i don't know where to switch sharing on, according to instruction

2

u/[deleted] Aug 29 '22

If you make a pastebin.com with the contents of your webgui.py, I will modify it for you.

1

u/cpt_flash_ Aug 29 '22

https://pastebin.com/gWegqsiY
i don't see anywhere in the code share=false or smth like that, so yeah, you can try. Thx

2

u/[deleted] Aug 29 '22

Just change the very last line to

demo.launch(share = True)

1

u/cpt_flash_ Aug 30 '22

thx, working good.