Skip to content

Latest commit

 

History

History
132 lines (90 loc) · 4.42 KB

README.md

File metadata and controls

132 lines (90 loc) · 4.42 KB

BunnyNet AI

cyberpunk bunny left cyberpunk bunny middle cyberpunk bunny right

Current bundle version Docker Hub Code style Code style Security check

Generating images with Bunny AI.

Introduction

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.

Setup

  • 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.

🐋 Docker / Compose

Docker

  1. 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 .
  1. 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

Docker Compose

  1. Create a docker-compose.yml.
version: '3.9'

services:
  bunnynet-ai:
    image: t0shy/bunnynet-ai:latest
    volumes:
      - ./output/:/app/output
  1. Up the service.
docker compose up -d --remove-orphans
  1. 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
  1. 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}.

🐍 Python

  1. Install the requirements with pip.
pip install -r requirements.txt
  1. 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
  1. 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}.

🛠️ Contribute

Prerequisites

Pre-commit

Setting up pre-commit code style & quality checks for local development.

pre-commit install

Checks

task contribute

Note: you can use task tools:black:fix to resolve codestyle issues.

❕ License

This repository comes with the MIT license.