Socket
Book a DemoInstallSign in
Socket

sd-webui-api

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sd-webui-api

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

0.0.27
latest
Source
npmnpm
Version published
Weekly downloads
10
11.11%
Maintainers
2
Weekly downloads
 
Created
Source

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.

Keywords

stable diffusion

FAQs

Package last updated on 18 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.