• Stars
    star
    140
  • Rank 253,218 (Top 6 %)
  • Language CMake
  • Created almost 2 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Interface definitions for API interactions between components

📝 Table of Contents

About

Api-Interfaces is the gRPC protocol for communication between the api-bridge, the api-web, and the generator_server. Additionally, any other client application communicating directly with api-web also use the interfaces generated from this repository.

See here for some development guides.

Getting Started

These instructions will get you an environment setup to build the interface files from the proto source files.

Prerequisites

The following items are needed to develop api-interfaces:

It is recommended to use ssh cloning with this project for git and for go get, although https does appear to work. To force ssh (for github) put the following in your .gitconfig:

[url "ssh://[email protected]/"]
  insteadOf = https://github.com/

Setup and building

After all the prerequisites are installed and available, this project can be setup by the following:

git clone --recurse-submodules [email protected]:Stability-AI/api-interfaces.git
cd api-interfaces
cmake .
cmake --build .

This will produce files for the various languages in gooseai to support the proto files in src. When rebuilding the files it is recommended to do a clean before as there have been instances of not all files being regenerated without it.

🎈 Usage

The generated files are all output in gooseai. How to use these files depends on the programming language being used. The following sections provide details for each of the supported languages.

The files have different usages and not all are required depending on the situation:

Suffix Client Server
_grpc_pb ✔️1 ✔️
_pb_service ✔️2
_pb ✔️ ✔️
  1. Not needed for typescript/javascript clients.
  2. Only needed for typscript/javascripts clients.

Golang

For Golang the interfaces can be added to the project as a normal module require. To add them run:

go get github.com/Stability-AI/api-interfaces@latest

Similarly to update them just run the same command with the short sha of the version to update to. Use them as you would a normal module.

Python

With the current output, the best way to consume these is to add them as a git submodule to your project. It is recommended to use ssh clone when adding the submodule. To update them just checkout the newer version from within the submodule (and remember to commit the submodule change to your project).

To use them make sure the files are on the python path.

Typescript / Javascript

With the current output, the best way to consume these is to add them as a git submodule to your project. It is recommended to use ssh clone when adding the submodule. To update them just checkout the newer version from within the submodule (and remember to commit the submodule change to your project).

To use them make sure they are in a location that can be found by your typescript/javascript files.

NOTE: Typescript requires both the typescript and javascript files to be available.

Other Languages / Custom Build

If not using the CMake defined builds to generate make sure when building from the source proto files that the following proto include paths are set:

  • src/proto
  • src/tensorizer/proto

More Repositories

1

stablediffusion

High-Resolution Image Synthesis with Latent Diffusion Models
Python
30,364
star
2

generative-models

Generative Models by Stability AI
Python
21,069
star
3

StableLM

StableLM: Stability AI Language Models
Jupyter Notebook
15,803
star
4

StableStudio

Community interface for generative AI
TypeScript
8,225
star
5

StableSwarmUI

StableSwarmUI, A Modular Stable Diffusion Web-User-Interface, with an emphasis on making powertools easily accessible, high performance, and extensibility.
C#
2,502
star
6

stability-sdk

SDK for interacting with stability.ai APIs (e.g. stable diffusion inference)
Jupyter Notebook
2,377
star
7

stable-audio-tools

Generative models for conditional audio generation
Python
1,442
star
8

webui-stability-api

Python
258
star
9

stability-blender-addon-public

185
star
10

awesome-stability

Awesome Stability List
111
star
11

rest-api-support

Stability REST API examples, issues, and discussions | https://api.stability.ai
100
star
12

StableCode

Code Assistance/ Developer Productivity suite of Models
Jupyter Notebook
98
star
13

datapipelines

Iterable datapipelines for pytorch training.
Python
65
star
14

ModelSpec

Stability.AI Model Metadata Standard Specification
59
star
15

stability-sdk-go

Golang functions for interacting with Stability API
Go
27
star
16

ComfyUI-SAI_API

Python
22
star
17

platform

platform.stability.ai
TypeScript
17
star
18

docker-images

Dockerfile
8
star
19

kube2

Python
6
star
20

stability-marketplace-containers

Code for building and running containers available on AWS marketplace
Python
4
star
21

kube

Kubernetes deployment library for AWS
Python
3
star
22

model-demo-notebooks

Notebooks for Stability AI models
Jupyter Notebook
3
star
23

stable-3d-gallery

2
star
24

branta

utilities and components for building AI art systems and notebooks
Python
1
star
25

aws-dlc-examples

Examples for Stability AI Deep Learning Containers on AWS SageMaker
Jupyter Notebook
1
star