On December 15th, 2022 BunnyWay introduced Bunny AI: an easy way to dynamically generate images using AI technology such as DALL-E 2 and Stable Diffusion
In order to make it easier to generate images for developers, this (python) application will simply send batch requests based on user's input.
Note:
- This is a non-official library for Bunny AI.
- You can choose to either follow the Docker or Python route.
- For help, run
main.py -h
. - Images are always saved in the
./output
directory (relative to the working directory).- In the docker container this will be
/app/output
.
- In the docker container this will be
- Pull the image
t0shy/bunnynet-ai:latest
.
docker pull t0shy/bunnynet-ai:latest
or build from source.
docker build -t t0shy/bunnynet-ai:latest --no-cache .
- Run it.
docker run -it --rm -v ${PWD}/output:/app/output t0shy/bunnynet-ai:latest python3 main.py -k "489eb71e-1259-4e1a-83c2-2d7859eec469" -hn "myzone.b-cdn.net" -p "cute pixel art of a bunny with a colorful solid background" -n 5 -v
- Create a
docker-compose.yml
.
version: '3.9'
services:
bunnynet-ai:
image: t0shy/bunnynet-ai:latest
volumes:
- ./output/:/app/output
- Up the service.
docker compose up -d --remove-orphans
- Run it.
docker compose run --rm bunnynet-ai python main.py -k "489eb71e-1259-4e1a-83c2-2d7859eec469" -hn "myzone.b-cdn.net" -p "cute pixel art of a bunny with a colorful solid background" -n 5 -v
- Saved images can be found on the mounted directory of the host machine.
- Filename format is as follows:
[{image_blueprint}]{slug_prompt}-{seed}.{file_extension}
.
- Filename format is as follows:
- Install the requirements with
pip
.
pip install -r requirements.txt
- Run it.
python main.py -k "489eb71e-1259-4e1a-83c2-2d7859eec469" -hn "myzone.b-cdn.net" -p "cute pixel art of a bunny with a colorful solid background" -n 5 -v
- Saved images can be found in the
./output
directory (relative to working directory).- Filename format is as follows:
[{image_blueprint}]{slug_prompt}-{seed}.{file_extension}
.
- Filename format is as follows:
- Docker Compose
- See the Docker Compose installation guide to get started.
- Task
- See the Task installation guide to get started
Setting up pre-commit
code style & quality checks for local development.
pre-commit install
task contribute
Note: you can use
task tools:black:fix
to resolve codestyle issues.
This repository comes with the MIT license.