# Python Bindings for stable-diffusion.cpp

Python bindings for the stable-diffusion.cpp C library, giving low-level ctypes access and a high-level Python API for Stable Diffusion, FLUX and Wan image and video generation, with pip-installable hardware acceleration for CUDA, ROCm and other backends.

This package provides Python bindings for @leejet's stable-diffusion.cpp library, offering low-level access to its C API through ctypes as well as a higher-level Python API for Stable Diffusion, FLUX and Wan image and video generation.

Installing it with pip builds stable-diffusion.cpp from source and installs it alongside the Python package; a C compiler is required, such as gcc or clang on Linux, Visual Studio or MinGW on Windows, or Xcode on macOS. Hardware acceleration backends such as CUDA (CUBLAS) or ROCm (HIPBLAS) are enabled by setting stable-diffusion.cpp's own CMake build options through the CMAKE_ARGS environment variable or the pip config-settings flag at install time, and these settings can also be recorded in a requirements.txt file for repeatable installs.

Website: https://github.com/william-murray1204/stable-diffusion-cpp-python
