darhsu / rubbrband

Rapidly experiment with open-source machine learning models

Home Page:https://rubbrband.gitbook.io/cli-docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rubbrband: Monitoring for Stable Diffusion

Rubbrband detects deformities in your images generated by Stable Diffusion at scale.

Installation

pip install rubbrband

Usage

import rubbrband
rubbrband.init("YOUR_API_KEY")
rubbrband.upload(image="https://example.com/image.png", prompt="Prompt used to generate image")

Uploading Images to Rubbrband

  1. Using a URL
rubbrband.upload(image="https://example.com/image.png", prompt="Prompt used to generate image")
  1. Using a PIL Image
from PIL import Image
rubbrband.upload(image=Image.open("/path/to/image.png"), prompt="Prompt used to generate image")
  1. Using a path
rubbrband.upload(image="/path/to/image.png", prompt="Prompt used to generate image")
  1. Using a context manager
with open("/path/to/image.png", "rb") as f:
    rubbrband.upload(image=f, prompt="Prompt used to generate image")

Getting Evaluation Results

filename = rubbrband.upload(image="/path/to/image.png", prompt="Prompt used to generate image")
evaluation = rubbrband.get_image_metadata(filename)

About

Rapidly experiment with open-source machine learning models

https://rubbrband.gitbook.io/cli-docs/

License:Apache License 2.0


Languages

Language:Python 55.4%Language:Shell 31.0%Language:Dockerfile 13.5%