Translation is Chat GPT4. English 日本語 한국어 中文 Français

How to Setup the Stable Diffusion WebUI API

This guide explains how to configure the Stable Diffusion WebUI API using SP-MangaEditer.

API Setup Steps

Edit the webui-user.bat file within the Stable Diffusion WebUI folder to set environment variables in COMMANDLINE_ARGS.

The configuration file is as follows

webui-user.bat settings example

Environment Variables to Set

Simple Setup: For those who find detailed access settings cumbersome

COMMANDLINE_ARGS=--cors-allow-origins "*" --api

Detailed Setup: Using SP-MangaEditer with the WebUI tab

When using SP-MangaEditer on the Stable diffusion WebUI tab, the following settings alone will suffice.

COMMANDLINE_ARGS=--api

The same options allow access even from a Stability Matrix launch.


Detailed Setup: Using SP-MangaEditer standalone

If you are using SP-MangaEditer standalone (SP-MangaEditer/index.html), please set the following environment variables.

COMMANDLINE_ARGS=--cors-allow-origins "*" --api

Stability Matrix

Note: It is not possible to set --cors-allow-origins when launching from Stability Matrix, hence access is not available. You must execute webui-user.bat.

webui-user.bat settings example