/AI-Painter

OneFlow Diffusers Web UI

Primary LanguagePython

AI Painter by OneFlow

image A browser interface for OneFlow Diffusers inspired by Stable Diffusion Web UI,the functions of txt2img and img2img are realized

How to Run

With Docker

docker run -it --rm \
  --gpus all --ipc=host -p 7860:7860 --ulimit memlock=-1 --ulimit stack=67108864 \
  -v ${PWD}:/workspace \
  -v ${PWD}/.cache:/root/.cache \
  -w /workspace \
  oneflowinc/ai-painter:cu112 \
  python3 launch.py --ip 0.0.0.0 --port 7860

Without Docker

Install depencies:

sh setup_env.sh

Launch the server:

python3 launch.py

If this fails, try the following two commands to install the latest oneflow

pip uninstall oneflow
python3 -m pip install -f https://staging.oneflow.info/branch/master/cu112 --pre oneflow

Then rerun the script.

Launch Options

There are other options besides ip and port mentioned above.

  • --ui-debug-mode: launch without loading model
  • --graph-mode: use OneFlow graph mode which will accelerate the inference (but limited by fixed tensor shape)
  • --device: Target a specific device, eg: cuda:0 means the first GPU and cuda:1 means the second GPU