Skip to content

incubiq/stable_diffusion

Repository files navigation

Stable Diffusion config for running on WebServer

This is a config setup to make fast tests of Stable Diffusion AI models on a webserver. It is also pre-configured to run alongside TaChiKu (see tachiku.com)

Origin

TEST samples

  • python scripts/txt2img.py --prompt "dali painting of van gogh flowers with a touch of gustav klimt" --plms --ckpt models/ldm/stable-diffusion-v1/sd-v1-4.ckpt --outdir _output
  • python scripts/img2img.py --init-img _input/zombie.jpg --strength 0.35 --ckpt models/ldm/stable-diffusion-v1/sd-v1-4.ckpt --outdir _output --n_samples 4

BATCH MODE RUN

// to run DIFFUSION in BATCH mode (not a server), use:

  • runlocal_txt2img.bat (it has its entry point with runlocal_txt2img.py, then making use of scripts/txt2img.py)

SERVER MODE RUN

// the python servers are built with FLASK ; when debugging (not in docker), it needs a FLASK app defined to run // in windows (when debugging) use : $env:FLASK_APP="flask_5000" // in linux / wsl, use : FLASK_APP="flask_5000" // to run DIFFUSION in local server mode (localhost:5004), open terminal

DOCKER MODE (SERVER) RUN

// Build commands: docker build -t yeepeekoo/my_images:ai_diffusion . docker push yeepeekoo/my_images:ai_diffusion

// to run it on windows docker run -it -v "$(pwd)/_input:/src/app/_input" -v "$(pwd)/_output:/src/app/_output" --name ai_diffusion --rm --gpus all --publish 5004:5000 yeepeekoo/my_images:ai_diffusion

// to run on Linus / WLS => same (but GPU should work!)

// to run PING in docker server mode (localhost:5001), see instructions in flask_5000.py (we can also run it locally in flask for debug before running the flask app in docker) // list of files in root : localhost:5004/root // list of files in input dir : localhost:5004/input // list of files in output dir : localhost:5004/output // warning : since docker cannot see localhost, it requires passing as encoded param the TachikuAI origin ( ?orig=.... ) to the localhost:5004/run?... at each call

// NOTE: the notifyTachiku.py file is duplicated in all AI engines directories since docker (shit) cannot build an image with files outside its root directory... so we duplicate... make sure they are all in sync when updating

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages