stability-sdk  by Stability-AI

SDK for interacting with the Stability AI API

Created 3 years ago
2,434 stars

Top 19.0% 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

1 month ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
1
Star History
1 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Lyumin Zhang Lyumin Zhang(Author of ControlNet), and
4 more.

Fooocus by lllyasviel

0.1%
46k
Image generator for streamlined prompting and generation using SDXL
Created 2 years ago
Updated 2 weeks ago
Feedback? Help us improve.