Skip to main content

SDK for Automatic 1111.

Project description

Auto 1111 SDK/Python Client

Auto 1111 SDK is a light-weight Python library for generating images, upscaling images, and editing images with diffusion models. It is designed to be a modular, light-weight Python client that encapsulates all the main features of the Automatic 1111 Stable Diffusion Web Ui. Auto 1111 SDK offers 3 main core features currently:

  • State of the Art Diffusion Pipelines that can run inference for in just a few lines of code. Our pipelines can currently run Text-to-Image, Image-to-Image, Inpainting, Outpainting, and Stable Diffusion Upscale. Our pipelines support the exact same parameters as the Stable Diffusion Web UI, so you can easily replicate creations from the Web Ui on the SDK.
  • Upscaling Pipelines that can run inference for any Esrgan or Real Esrgan upscaler in a few lines of code.
  • An integration with Civit AI to directly download models from the website.

Join our Discord!!

Installation

We recommend installing Auto 1111 SDK in a virtual environment from PyPI or Conda.

pip3 install auto1111sdk

Quickstart

Generating images with Auto 1111 SDK is super easy. To run inference for Text-to-Image, Image-to-Image, Inpainting, Outpainting, or Stable Diffusion Upscale, we have 1 pipeline that can support all these operations. This saves a lot of RAM from having to create multiple pipeline objects with other solutions.

from auto1111sdk import StableDiffusionPipeline

pipe = StableDiffusionPipeline("<Path to your local safetensors or checkpoint file>")

prompt = "a picture of a brown dog"
output = pipe.generate_txt2img(prompt = prompt, height = 1024, width = 768, steps = 10)

output[0].save("image.png")

Documentation

We have more detailed examples/documentation of how you can use Auto 1111 SDK here.. For a detailed comparison between us and Huggingface diffusers, you can read this..

Features

  • Original txt2img and img2img modes
  • Real ESRGAN upscale and Esrgan Upscale (compatible with any pth file)
  • Outpainting
  • Inpainting
  • Stable Diffusion Upscale
  • Attention, specify parts of text that the model should pay more attention to
    • a man in a ((tuxedo)) - will pay more attention to tuxedo
    • a man in a (tuxedo:1.21) - alternative syntax
    • select text and press Ctrl+Up or Ctrl+Down (or Command+Up or Command+Down if you're on a MacOS) to automatically adjust attention to selected text (code contributed by anonymous user)
  • Composable Diffusion: a way to use multiple prompts at once
    • separate prompts using uppercase AND
    • also supports weights for prompts: a cat :1.2 AND a dog AND a penguin :2.2
  • Works with a variety of samplers
  • Download models directly from Civit AI and RealEsrgan checkpoints

Contributing

Auto1111 SDK is continuously evolving, and we appreciate community involvement. We welcome all forms of contributions - bug reports, feature requests, and code contributions.

Report bugs and request features by opening an issue on Github. Contribute to the project by forking/cloning the repository and submitting a pull request with your changes.

Credits

Licenses for borrowed code can be found in Settings -> Licenses screen, and also in html/licenses.html file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

auto1111sdk-0.0.3.tar.gz (431.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

auto1111sdk-0.0.3-py3-none-any.whl (521.9 kB view details)

Uploaded Python 3

File details

Details for the file auto1111sdk-0.0.3.tar.gz.

File metadata

  • Download URL: auto1111sdk-0.0.3.tar.gz
  • Upload date:
  • Size: 431.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for auto1111sdk-0.0.3.tar.gz
Algorithm Hash digest
SHA256 3f16305f5916cb9a062f66a604a206e927ef83aaf52cee999a37bfe40d74c8ba
MD5 18ba3d6138d10874299968dc3c981127
BLAKE2b-256 818b66b649e97892d4aa370f6128ca8b32adc7ae810063cb2a47c588b48da684

See more details on using hashes here.

File details

Details for the file auto1111sdk-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: auto1111sdk-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 521.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for auto1111sdk-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 baceaad4e737503b964a29d9c53f339c3858b5304a8a31f39e5a177667f25e6e
MD5 56fc408d1a4be26cbbdc8ce7de176cae
BLAKE2b-256 56b1be01c5d134c8ea2cf4508ba979008cb477fd7766e93d650baff7c65a5154

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page