GithubHelp home page GithubHelp logo

blekmus / aws-stable-diffusion Goto Github PK

View Code? Open in Web Editor NEW
57.0 1.0 7.0 32 KB

How to run Stable Diffusion Automatic1111 WebUI on AWS EC2 instance

Shell 100.00%
aws automatic1111 ec2 stable-diffusion stable-diffusion-webui webui

aws-stable-diffusion's Issues

error on lit

it throws an error here

Building wheel for lit (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/ubuntu/stable-diffusion-webui/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jku8wid_/lit/setup.py'"'"'; file='"'"'/tmp/pip-install-jku8wid_/lit/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-91z2cn15
cwd: /tmp/pip-install-jku8wid_/lit/
Complete output (8 lines):
/home/ubuntu/stable-diffusion-webui/venv/lib/python3.8/site-packages/setuptools/dist.py:473: UserWarning: Normalizing '16.0.5post0' to '16.0.5.post0'
warnings.warn(
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: invalid command 'bdist_wheel'

ERROR: Failed building wheel for lit

Notes

First off all - this is an excellent tutorial! Worked almost flawlessly, much needed!

Installation

# official webui installation script
bash <(wget -qO- https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh)

This one didn't work for me as is - it broke on line 192 trying to install the stable-diffusion-webui directory under /dev instead of the ubuntu home directory. Instead I just download the script, chmod'd it and ran it locally from the ubuntu home with no problem.

Spot instances

I would ellaborate about spot instances: that they are significantly cheaper and may be kept uninteruped for days and weeks. Things to note:
By default they run in "one time" mode, either from spot fleet request or from the Launch Instance wizard → Advanced Details. "one time" spot instances cannot be stopped when idle. You want them to run in "persistent" mode, where they can be manually stopped and booted just when you need them:

  • Click "Launch Instance"
  • Choose the AMI, Instance Type etc
  • Expand "Advance Details"
  • Check "Request Spot Instances"
  • Click "Customize" next to the "Request Spot Instances" option
  • From Request Type dropdown, choose "Persistent"
    Now when the spot instance is launched, it will be stoppable.

I would also recommend backing up the instance periodically by selecting the instance and then Actions → Images and Templates → Create Image. This process may take some time (took me about 30 minutes). Then if the spot instance is interrupted, you can create a totally new instance without the installation hassle.

I wish I had the time to write a Terraform script for the entire process...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.