Skip to content

Latest commit

 

History

History
68 lines (46 loc) · 1.92 KB

README.md

File metadata and controls

68 lines (46 loc) · 1.92 KB

Chisel - Compose AI for vision applications.

The documentation are a great place to start building with Chisel.

Getting Started

Install with pip:

pip install chisel-ai

Operations

Chisel supports several AI model-powered operations:

  1. TxtToImg
  2. ImgToImg
  3. ImgEdit
  4. SuperResolution

These operations make it very easy to start building AI vision pipelines:

from chisel.ops import ImgToImg, TxtToImg, SuperResolution
from chisel.ops.provider import Provider

txt2img = TxtToImg(provider=Provider.STABILITY_AI)
img2img = ImgToImg(provider=Provider.OPENAI)
super_res = SuperResolution(provider=Provider.STABILITY_AI)

prompt = "watercolor painting of a park in the fall"

img = txt2img(prompt)
refined_img = img2img(img)
upscaled_img = super_res(refined_img)

Initial Setup

API Keys

Chisel looks for API keys in these environment variables

  • OpenAI - CHISEL_API_KEY_OPEN_AI
  • StabilityAI - CHISEL_API_KEY_STABILITY_AI
  • Stable Diffusion - CHISEL_API_KEY_STABLE_DIFFUSION

OpenAI Setup

  • Create an OpenAI API key
  • Set Chisel's environment variable
    • ZSH - echo 'export CHISEL_API_KEY_OPEN_AI=1234ABCD' >> ~/.zshenv
    • BASH - echo 'export CHISEL_API_KEY_OPEN_AI_=12345ABCD' >> ~/.bash_profile

StabilityAI Setup

  • Create a StabilityAI API Key
  • Set Chisel's environment variable
    • ZSH - echo 'export CHISEL_API_KEY_STABILITY_AI=1234ABCD' >> ~/.zshenv
    • BASH - echo 'export CHISEL_API_KEY_STABILITY_AI=12345ABCD' >> ~/.bash_profile

Stable Diffusion Setup

  • Create a Stable Diffusion API key
  • Set Chisel's environment variable
    • ZSH - echo 'export CHISEL_API_KEY_STABLE_DIFFUSION=1234ABCD' >> ~/.zshenv
    • BASH - echo 'export CHISEL_API_KEY_STABLE_DIFFUSION=12345ABCD' >> ~/.bash_profile