Enable AUTOMATIC1111 / Forge in Settings
AUTOMATIC1111 Stable Diffusion WebUI is the most popular and feature-rich interface for Stable Diffusion. Also works with Forge and SD.Next which use the same API. Supports txt2img, img2img, inpainting, ControlNet, LoRA, and many extensions.
| Field | Type | Required | Description |
|---|---|---|---|
| baseUrl | url | Optional | URL of your AUTOMATIC1111/Forge/SD.Next server |
| checkpointName | text | Optional | Default checkpoint/model to use for generation |
Add provider:
npx webinfer provider add a1111Test connection:
npx webinfer provider test a1111Basic usage:
import { generateText } from "webinfer"
// WebInfer automatically routes to the best available provider
const result = await generateText({
prompt: "Write a haiku about programming"
})
console.log(result.text)Specify AUTOMATIC1111 / Forge explicitly:
import { generateText } from "webinfer"
const result = await generateText({
prompt: "Write a haiku about programming",
provider: "a1111"
})
console.log(result.text)
console.log("Provider:", result.provider)
console.log("Model:", result.model)Streaming:
import { streamText } from "webinfer"
const { textStream } = await streamText({
prompt: "Write a story about AI",
provider: "a1111"
})
for await (const chunk of textStream) {
process.stdout.write(chunk)
}sdxlsdxlStable Diffusion XLsd15Stable Diffusion 1.5sd21Stable Diffusion 2.1