sd-webui-go  by SpenserCai

Go SDK for Stable Diffusion WebUI API

created 2 years ago
352 stars

Top 80.3% on sourcepulse

GitHubView on GitHub
Project Summary

This Go SDK provides an object-oriented interface to the AUTOMATIC1111 Stable Diffusion WebUI API, simplifying integration for developers. It offers two primary methods for interaction: intersvc for a highly encapsulated experience and go-swagger for broader API coverage with slightly more complexity.

How It Works

The SDK leverages Go's type system to abstract away the complexities of direct HTTP requests and JSON parsing. The intersvc approach uses custom Go structs that mirror API functionalities, allowing for more idiomatic Go code. The go-swagger method generates client code from OpenAPI specifications, ensuring comprehensive coverage of the WebUI's API endpoints.

Quick Start & Requirements

  • Install via go get github.com/SpenserCai/sd-webui-go.
  • Requires a running instance of AUTOMATIC1111's Stable Diffusion WebUI accessible via its API (default: 127.0.0.1:7860).
  • Refer to the wiki page for supported intersvc endpoints.

Highlighted Details

  • Supports the Stable Diffusion WebUI's Extensions API.
  • Offers two distinct integration methods: intersvc (easier, less coverage) and go-swagger (more complex, wider coverage).
  • Provides example code for text2img and deoldify using both methods.
  • Requires manual definition of response models for intersvc due to missing API documentation.

Maintenance & Community

  • The project acknowledges AUTOMATIC1111 as a contributor.
  • Instructions are provided for submitting pull requests to the dev branch.

Licensing & Compatibility

  • The repository does not explicitly state a license in the README.

Limitations & Caveats

  • The intersvc method has incomplete API coverage and requires manual definition of response models for unsupported endpoints.
  • The go-swagger method offers broader coverage but is noted as being "slightly more complex."
  • No explicit license information is provided, which may impact commercial use.
Health Check
Last commit

1 year ago

Responsiveness

Inactive

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

Explore Similar Projects

Feedback? Help us improve.