An SDK/Python library for Automatic 1111 to run state-of-the-art diffusion models
Join our Discord!!
We have a colab demo where you can run many of the operations of Auto 1111 SDK. Check it out here!!
We recommend installing Auto 1111 SDK in a virtual environment from PyPI. Right now, we do not have support for conda environments yet.
pip3 install auto1111sdk
To install the latest version of Auto 1111 SDK (with controlnet now included), run:
pip3 install git+https://github.com/saketh12/Auto1111SDK.git
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")
Right now, Controlnet only works with fp32. We are adding support for fp16 very soon.
from auto1111sdk import StableDiffusionPipeline
from auto1111sdk import ControlNetModel
model = ControlNetModel(model="<THE CONTROLNET MODEL FILE NAME (WITHOUT EXTENSION)>",
image="<PATH TO IMAGE>")
pipe = StableDiffusionPipeline("<Path to your local safetensors or checkpoint file>", controlnet=model)
prompt = "a picture of a brown dog"
output = pipe.generate_txt2img(prompt = prompt, height = 1024, width = 768, steps = 10)
output[0].save("image.png")
Find the instructions here. Contributed by by Marco Guardigli, [email protected]
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.
For a detailed guide on how to use SDXL, we recommend reading this
((tuxedo))
- will pay more attention to tuxedo(tuxedo:1.21)
- alternative syntaxCtrl+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)We will be adding support for these features very soon. We also accept any contributions to work on these issues!
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.
Licenses for borrowed code can be found in Settings -> Licenses
screen, and also in html/licenses.html
file.