0.0.27 • Published 7 months ago

sd-webui-api v0.0.27

Weekly downloads
-
License
MIT License
Repository
github
Last release
7 months ago

About

A Typescript API client for AUTOMATIC111/stable-diffusion-webui.

Installation

npm install sd-webui-api
yarn add sd-webui-api

Usage

SD WebUI API Backend

You need to have a SD WebUI API backend to use this package. Check out SD WebUI API Doc to start a local API backend first and the default URL for API endpoint is: http://127.0.0.1:7860

Simple initialization with all default settings:

const api = new StableDiffusionApi({
  baseUrl: 'http://127.0.0.1:7860', // or other WebUI url
})

Initialization with custom parameters:

const api = new StableDiffusionApi({
  host: "http://127.0.0.1:7860",
  port: 7860,
  protocol: "http",
  defaultSampler: "Euler a",
  defaultStepCount: 20,
})

Authentication

Use the --api-auth command line argument with "username:password" on the server to enable API authentication.

api.setAuth("username", "password")

txt2img

const result = await api.txt2img({
    prompt: "a black cat",
    ...
})

img2img

TBA

ControlNet

TBA

Acknowledgment

This project is based off https://github.com/jaschahuisman/sd-api.

0.0.27

7 months ago

0.0.24

8 months ago

0.0.25

7 months ago

0.0.26

7 months ago

0.0.23

8 months ago

0.0.22

8 months ago

0.0.21

8 months ago

0.0.20

8 months ago

0.0.19

8 months ago

0.0.18

9 months ago

0.0.17

9 months ago

0.0.16

9 months ago

0.0.15

10 months ago

0.0.14

10 months ago

0.0.13

10 months ago

0.0.12

10 months ago

0.0.11

10 months ago

0.0.10

10 months ago

0.0.9

10 months ago

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago

0.1.0

10 months ago

1.0.0

11 months ago