npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

automatic1111-provider

v0.1.1

Published

A TypeScript provider for the Vercel AI SDK that enables image generation using AUTOMATIC1111 Stable Diffusion WebUI

Readme


title: Automatic1111 description: Automatic1111 Provider for the AI SDK

Automatic1111

AUTOMATIC1111 is a popular web interface for Stable Diffusion that provides a comprehensive set of features for image generation. The Automatic1111 provider for the AI SDK enables seamless integration with locally hosted AUTOMATIC1111 instances while offering unique advantages:

  • Local Control: Full control over your image generation with local Stable Diffusion models
  • No API Costs: Generate unlimited images without per-request charges
  • Model Flexibility: Use any Stable Diffusion checkpoint
  • Privacy: All generation happens locally on your hardware
  • Community Models: Access to thousands of community-created models from Civitai and HuggingFace

Learn more about AUTOMATIC1111's capabilities in the AUTOMATIC1111 Documentation.

Setup

You need to have AUTOMATIC1111 running with the --api flag enabled. Start your AUTOMATIC1111 instance with:

# Windows
./webui.bat --api

# Linux/Mac
./webui.sh --api

The Automatic1111 provider is available in the automatic1111-provider module. You can install it with:

# pnpm
pnpm add automatic1111-provider

# npm
npm install automatic1111-provider

# yarn
npm install automatic1111-provider

Provider Instance

To create an Automatic1111 provider instance, use the createAutomatic1111 function:

import { createAutomatic1111 } from 'automatic1111-provider';

const automatic1111 = createAutomatic1111({
  baseURL: 'http://127.0.0.1:7860', // Your AUTOMATIC1111 instance
});

Image Models

The Automatic1111 provider supports image generation through the image() method:

// Basic image generation
const imageModel = automatic1111.image('v1-5-pruned-emaonly');

// With custom model
const sdxlModel = automatic1111.image('sd_xl_base_1.0');

Examples

Basic Image Generation

import { automatic1111 } from 'automatic1111-provider';
import { experimental_generateImage as generateImage } from 'ai';

const { images } = await generateImage({
  model: automatic1111.image('v1-5-pruned-emaonly'),
  prompt: 'A beautiful sunset over mountains',
  size: '512x512',
});

Advanced Configuration

const { images } = await generateImage({
  model: automatic1111.image('realistic-vision-v4'),
  prompt: 'Portrait of a wise old wizard with a long beard',
  n: 2,
  seed: 12345,
  providerOptions: {
    automatic1111: {
      negative_prompt: 'blurry, ugly, deformed, low quality',
      steps: 40,
      cfg_scale: 8.5,
      sampler_name: 'DPM++ SDE Karras',
      styles: ['photorealistic', 'detailed'],
      check_model_exists: true,
    }
  }
});

Provider Options

The Automatic1111 provider supports the following options for customizing image generation:

Available Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | negative_prompt | string | undefined | What you don't want in the image | | steps | number | 20 | Number of sampling steps | | cfg_scale | number | 7 | CFG (Classifier Free Guidance) scale | | sampler_name | string | "Euler a" | Sampling method | | denoising_strength | number | undefined | Denoising strength for img2img (0.0-1.0) | | styles | string[] | undefined | Apply predefined styles | | check_model_exists | boolean | false | Verify model exists before generation |

Model Management

The provider automatically detects available models from your AUTOMATIC1111 instance. To use a model:

  1. Place your .safetensors or .ckpt model files in the models/Stable-diffusion/ folder
  2. Restart AUTOMATIC1111 or refresh the models list in the web interface
  3. Use the exact model name (without file extension) in the provider

Additional Resources