Back to directory

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.

Python Bindings for stable-diffusion.cpp

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.

More in Generative media

See all 146
  • Blender Copilot

    github.com

    A Copilot-style AI chat panel inside Blender that runs its agent loop in Blender's own Python process, executes the model's generated code against the live scene, and wraps every conversational turn in a single undo step.

  • A ComfyUI add-on that patches ComfyUI-GGUF so Qwen-Image-2.1 models can run fully as GGUF files, fixing a text-encoder mismatch and missing architecture detection until upstream support arrives.

  • A ComfyUI node that expands a short prompt into a full styled prompt, negative prompt and aspect ratio for Qwen-Image-2.1, using one of 17 photographic styles.