{"id":16609967,"url":"https://github.com/Auto1111SDK/Auto1111SDK","last_synced_at":"2025-10-29T17:30:47.834Z","repository":{"id":219555311,"uuid":"749334508","full_name":"Auto1111SDK/Auto1111SDK","owner":"Auto1111SDK","description":"An SDK/Python library for Automatic 1111 to run state-of-the-art diffusion models","archived":false,"fork":false,"pushed_at":"2024-06-05T08:44:13.000Z","size":11088,"stargazers_count":390,"open_issues_count":20,"forks_count":26,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-10-12T01:30:40.013Z","etag":null,"topics":["ai","ai-art","api","automatic1111","deep-learning","diffusers","diffusion","image-generation","image-to-image","img2img","python","pytorch","stable-diffusion","stable-diffusion-webui","text-to-image","torch","txt2img","unstable","upscaling","web"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Auto1111SDK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-28T09:20:30.000Z","updated_at":"2024-10-08T13:44:37.000Z","dependencies_parsed_at":"2024-02-16T01:29:25.691Z","dependency_job_id":"f29dfdc8-5240-4842-81b9-d0e756b32d58","html_url":"https://github.com/Auto1111SDK/Auto1111SDK","commit_stats":null,"previous_names":["saketh12/auto1111sdk","auto1111sdk/auto1111sdk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Auto1111SDK%2FAuto1111SDK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Auto1111SDK%2FAuto1111SDK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Auto1111SDK%2FAuto1111SDK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Auto1111SDK%2FAuto1111SDK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Auto1111SDK","download_url":"https://codeload.github.com/Auto1111SDK/Auto1111SDK/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238856066,"owners_count":19542138,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-art","api","automatic1111","deep-learning","diffusers","diffusion","image-generation","image-to-image","img2img","python","pytorch","stable-diffusion","stable-diffusion-webui","text-to-image","torch","txt2img","unstable","upscaling","web"],"created_at":"2024-10-12T01:29:22.958Z","updated_at":"2025-10-29T17:30:45.114Z","avatar_url":"https://github.com/Auto1111SDK.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Auto 1111 SDK: Stable Diffusion Python library \n\n\u003cp\u003e\n    \u003ca href=\"https://pepy.tech/project/auto1111sdk\"\u003e\n        \u003cimg alt=\"GitHub release\" src=\"https://static.pepy.tech/badge/auto1111sdk\"\u003e\n    \u003c/a\u003e\n    \n\u003c/p\u003e\nAuto 1111 SDK is a lightweight Python library for using Stable Diffusion 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](https://github.com/AUTOMATIC1111/stable-diffusion-webui). Auto 1111 SDK offers 3 main core features currently:\n\n- Text-to-Image, Image-to-Image, Inpainting, and Outpainting pipelines. Our pipelines support the exact same parameters as the [Stable Diffusion Web UI](https://github.com/AUTOMATIC1111/stable-diffusion-webui), so you can easily replicate creations from the Web UI on the SDK.\n- Upscaling Pipelines that can run inference for any Esrgan or Real Esrgan upscaler in a few lines of code.\n- An integration with Civit AI to directly download models from the website.\n\nJoin our [Discord!!](https://discord.gg/S7wRQqt6QV)\n\n## Demo\n\nWe have a colab demo where you can run many of the operations of Auto 1111 SDK. Check it out [here!!](https://colab.research.google.com/drive/1SekiJ-mdB2V8ogWbyRyF_yDnoMuDGWTl?usp=sharing)\n\n## Installation\n\nWe recommend installing Auto 1111 SDK in a virtual environment from PyPI. Right now, we do not have support for conda environments yet.\n\n```bash\npip3 install auto1111sdk\n```\n\nTo install the latest version of Auto 1111 SDK (with controlnet now included), run:\n\n```bash\npip3 install git+https://github.com/saketh12/Auto1111SDK.git\n```\n\n## Quickstart\n\nGenerating 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.\n\n```python\nfrom auto1111sdk import StableDiffusionPipeline\n\npipe = StableDiffusionPipeline(\"\u003cPath to your local safetensors or checkpoint file\u003e\")\n\nprompt = \"a picture of a brown dog\"\noutput = pipe.generate_txt2img(prompt = prompt, height = 1024, width = 768, steps = 10)\n\noutput[0].save(\"image.png\")\n```\n\n## Controlnet\n\nRight now, Controlnet only works with fp32. We are adding support for fp16 very soon.\n\n```python\nfrom auto1111sdk import StableDiffusionPipeline\nfrom auto1111sdk import ControlNetModel\n\nmodel = ControlNetModel(model=\"\u003cTHE CONTROLNET MODEL FILE NAME (WITHOUT EXTENSION)\u003e\", \n                   image=\"\u003cPATH TO IMAGE\u003e\")\n\npipe = StableDiffusionPipeline(\"\u003cPath to your local safetensors or checkpoint file\u003e\", controlnet=model)\n\nprompt = \"a picture of a brown dog\"\noutput = pipe.generate_txt2img(prompt = prompt, height = 1024, width = 768, steps = 10)\n\noutput[0].save(\"image.png\")\n```\n\n## Running on Windows\n\nFind the instructions [here.](https://github.com/saketh12/Auto1111SDK/blob/main/automatic1111sdk_on_windows_w_gpu.md) Contributed by by Marco Guardigli, mgua@tomware.it\n\n## Documentation\n\nWe have more detailed examples/documentation of how you can use Auto 1111 SDK [here](https://flush-ai.gitbook.io/automatic-1111-sdk/). \nFor a detailed comparison between us and Huggingface diffusers, you can read [this](https://flush-ai.gitbook.io/automatic-1111-sdk/auto-1111-sdk-vs-huggingface-diffusers).\n\nFor a detailed guide on how to use SDXL, we recommend reading [this](https://flush-ai.gitbook.io/automatic-1111-sdk/pipelines/stable-diffusion-xl)\n\n\n## Features\n- Original txt2img and img2img modes\n- Real ESRGAN upscale and Esrgan Upscale (compatible with any pth file)\n- Outpainting\n- Inpainting\n- Stable Diffusion Upscale\n- Attention, specify parts of text that the model should pay more attention to\n    - a man in a `((tuxedo))` - will pay more attention to tuxedo\n    - a man in a `(tuxedo:1.21)` - alternative syntax\n    - 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)\n- Composable Diffusion: a way to use multiple prompts at once\n    - separate prompts using uppercase AND\n    - also supports weights for prompts: a cat :1.2 AND a dog AND a penguin :2.2\n- Works with a variety of samplers\n- Download models directly from Civit AI and RealEsrgan checkpoints\n- Set custom VAE: works for any model including SDXL\n- Support for SDXL with Stable Diffusion XL Pipelines\n- Pass in custom arguments to the models\n- No 77 prompt token limit (unlike Huggingface Diffusers, which has this limit)\n\n## Roadmap\n\n- Adding support Hires Fix and Refiner parameters for inference.\n- Adding support for Lora's\n- Adding support for Face restoration\n- Adding support for Dreambooth training script.\n- Adding support for custom extensions like Controlnet.\n\nWe will be adding support for these features very soon. We also accept any contributions to work on these issues!\n\n## Contributing\n\nAuto1111 SDK is continuously evolving, and we appreciate community involvement. We welcome all forms of contributions - bug reports, feature requests, and code contributions.\n\nReport bugs and request features by opening an issue on Github.\nContribute to the project by forking/cloning the repository and submitting a pull request with your changes.\n\n\n## Credits\nLicenses for borrowed code can be found in `Settings -\u003e Licenses` screen, and also in `html/licenses.html` file.\n\n- Automatic 1111 Stable Diffusion Web UI - https://github.com/AUTOMATIC1111/stable-diffusion-webui\n- Stable Diffusion - https://github.com/Stability-AI/stablediffusion, https://github.com/CompVis/taming-transformers\n- k-diffusion - https://github.com/crowsonkb/k-diffusion.git\n- ESRGAN - https://github.com/xinntao/ESRGAN\n- MiDaS - https://github.com/isl-org/MiDaS\n- Ideas for optimizations - https://github.com/basujindal/stable-diffusion\n- Cross Attention layer optimization - Doggettx - https://github.com/Doggettx/stable-diffusion, original idea for prompt editing.\n- Cross Attention layer optimization - InvokeAI, lstein - https://github.com/invoke-ai/InvokeAI (originally http://github.com/lstein/stable-diffusion)\n- Sub-quadratic Cross Attention layer optimization - Alex Birch (https://github.com/Birch-san/diffusers/pull/1), Amin Rezaei (https://github.com/AminRezaei0x443/memory-efficient-attention)\n- Textual Inversion - Rinon Gal - https://github.com/rinongal/textual_inversion (we're not using his code, but we are using his ideas).\n- Idea for SD upscale - https://github.com/jquesnelle/txt2imghd\n- Noise generation for outpainting mk2 - https://github.com/parlance-zz/g-diffuser-bot\n- CLIP interrogator idea and borrowing some code - https://github.com/pharmapsychotic/clip-interrogator\n- Idea for Composable Diffusion - https://github.com/energy-based-model/Compositional-Visual-Generation-with-Composable-Diffusion-Models-PyTorch\n- xformers - https://github.com/facebookresearch/xformers\n- Sampling in float32 precision from a float16 UNet - marunine for the idea, Birch-san for the example Diffusers implementation (https://github.com/Birch-san/diffusers-play/tree/92feee6)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAuto1111SDK%2FAuto1111SDK","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAuto1111SDK%2FAuto1111SDK","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAuto1111SDK%2FAuto1111SDK/lists"}