AUTOMATIC1111 (Local)
Connect to a local instance of AUTOMATIC1111 Stable Diffusion Web UI. This allows you to have complete control over the models and generation parameters.
- Setup Requirements:
- The A1111 server must be running. It must be started with the
--apiflag to enable the API. - CORS (Cross-Origin Resource Sharing) must be enabled. The easiest way is to start the server with the
--cors-allow-origins="*"flag. - In this app, enter the full URL of the server (e.g.,
http://127.0.0.1:7860) into the A1111 > API endpoint field. - For Forge-based versions, please refer to the troubleshooting section below.
- The A1111 server must be running. It must be started with the
- Configuration (JSON):
- You can provide a JSON object containing your preferred default parameters (sampler, step count, etc.). These will be merged with the prompts generated by the Storyteller AI.
Example for acceleration (LCM): Below is an example of parameter settings when using LCM (Latent Consistency Models) to speed up image generation.
{
"steps": 8,
"cfg_scale": 2,
"sampler_name": "LCM",
"scheduler": "Normal",
"prompt": "masterpiece, best quality, highres <lora:LCMTurboMix_LCM_Sampler:1>",
"negative_prompt": "worst quality, low quality, twins"
}
Troubleshooting
Local server is not working
Check the browser's developer console (F12) for "CORS" or "network" errors. This is the most common issue. Ensure the server is started with the correct flags (e.g., --cors-allow-origins="*" for A1111) and that the endpoint URL in this app is correct.
Unable to make API calls with Stable Diffusion WebUI Forge
In Stable Diffusion WebUI Forge and its derivatives, browser security features may block connections when calling a local API running on HTTP from an HTTPS website (such as this app). To resolve this issue, you need to modify the modules/initialize_util.py file in the Forge installation directory and add specific middleware. For detailed steps and code, please refer to this fix commit. Specifically, this means deleting the last two lines of the file (including the empty line) and replacing them with the four lines provided (including comments). Since this is Python code, be careful not to change the indentation (the number of spaces at the beginning of the lines).