The documentation are a great place to start building with Chisel.
Install with pip:
pip install chisel-ai
Chisel supports several AI model-powered operations:
TxtToImg
ImgToImg
ImgEdit
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)
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
- 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
- ZSH -
- 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
- ZSH -
- 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
- ZSH -