stability-sdk  by Stability-AI

SDK for interacting with the Stability AI API

created 2 years ago
2,440 stars

Top 19.4% on sourcepulse

GitHubView on GitHub
Project Summary

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

  • Installation: pip install stability-sdk
  • Prerequisites: Python 3.x, an API key from Stability AI Platform.
  • Usage: Set STABILITY_KEY environment variable.
    • Generation: python3 -m stability_sdk generate -W 1024 -H 1024 "A stunning house."
    • Upscaling: python3 -m stability_sdk upscale -i "/path/to/image.png"
  • Animation UI: pip install stability-sdk[anim_ui] then python3 -m stability_sdk animate --gui
  • Documentation: Stability AI Platform

Highlighted Details

  • Supports various generation parameters including height, width, CFG scale, sampler, steps, style presets, and seeds.
  • Offers image-to-image generation and inpainting capabilities via init_image and mask_image parameters.
  • Includes an optional animation UI for creating animated sequences.
  • Provides a protobuf specification for building clients in other languages.

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

Health Check
Last commit

2 days ago

Responsiveness

1 week

Pull Requests (30d)
3
Issues (30d)
0
Star History
6 stars in the last 90 days

Explore Similar Projects

Starred by Chris Van Pelt Chris Van Pelt(Cofounder of Weights & Biases), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
15 more.

developer by smol-ai

0.1%
12k
Agent for embedding a developer in your app
created 2 years ago
updated 1 year ago
Starred by Nat Friedman Nat Friedman(Former CEO of GitHub), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
7 more.

langflow by langflow-ai

3.0%
93k
Visual tool for AI agent and workflow creation/deployment
created 2 years ago
updated 1 day ago
Feedback? Help us improve.