a python library to help you prototype with diffusion models


diffusechain is a code-first library that simplifies the generation of consistent and predictable stable diffusion based images. It acts as a wrapper around existing frameworks, abstracting the complexities and providing easy-to-use functionality. Whether you want to optimize prompts, generate consistent images, or manage storage, diffusechain has got you covered.

⬇️ Quick Install

pip install diffusechain

⚙️ Core Features

  • Prompt Engine: Optimize your prompts using large language models (LLMs).
  • Models/APIs: Easily interact with various UI platforms like automatic1111.
  • Chains: Define sequences of functions for consistent results. Example: Generate consistent QR code images, consistent face generation.
  • Pipelines: Train and fine-tune models. Generate LLMs, LORAs, and checkpoints.
  • Storage: Integrated with various storage providers like AWS S3, Cloudinary, and many more.



Diffusechain is designed to be used in conjunction with Automatic1111 and Diffusers. It makes it easier to interact with these libraries and allows you to easily automate image generation workflows.

🤝 Contributing

Contributions are welcome! Please check out the todos below, and feel free to open a pull request. For more information, please see the contributing guidelines.

📜 License

Diffusechain is licensed under the MIT License. See the LICENSE file for more details.


  • This project is built upon the diffusers, Automatic1111 libraries by independent contributors, but it is in no way affiliated with these projects.
  • In the initial development of diffusechain, we utilized code from the sdwebuiapi project for one of our library components. We greatly appreciate the work done by the creators of sdwebuiapi and would like to acknowledge their contribution to the open-source community.
  • This project is meant to be used as a tool for prototyping and is still not ready for production use. Please use it responsibly.


Adithya S K - @adithya_s_k

Project Link: https://github.com/adithya-s-k/diffusechain