SDK for interacting with the Stability AI API
Top 19.4% on sourcepulse
This Python SDK provides a client for interacting with Stability AI's API, enabling users to perform tasks like image generation and upscaling using models such as Stable Diffusion. It's designed for developers and researchers who want to integrate AI-powered image manipulation into their applications or workflows.
How It Works
The SDK leverages gRPC for efficient communication with the Stability API. It offers both a command-line interface (CLI) and a Python API wrapper. The CLI allows for quick testing and execution of generation and upscaling tasks with various parameters, while the Python API provides programmatic access for deeper integration.
Quick Start & Requirements
pip install stability-sdk
STABILITY_KEY
environment variable.
python3 -m stability_sdk generate -W 1024 -H 1024 "A stunning house."
python3 -m stability_sdk upscale -i "/path/to/image.png"
pip install stability-sdk[anim_ui]
then python3 -m stability_sdk animate --gui
Highlighted Details
init_image
and mask_image
parameters.Maintenance & Community
The project is maintained by Stability AI. Community-contributed clients for TypeScript and C# are linked.
Licensing & Compatibility
Usage of the Stability API is subject to the STABILITY AI API Terms of Service. The SDK itself appears to be under a permissive license, but API usage terms are paramount.
Limitations & Caveats
API usage requires an API key and is governed by Stability AI's Terms of Service, which may include usage limits or costs. Some parameters are ignored by specific engines (e.g., steps, seed for ESRGAN upscaling).
2 days ago
1 week