{"id":22677428,"url":"https://github.com/william-murray1204/stable-diffusion-cpp-python","last_synced_at":"2025-04-07T19:13:37.282Z","repository":{"id":228588313,"uuid":"771450936","full_name":"william-murray1204/stable-diffusion-cpp-python","owner":"william-murray1204","description":"stable-diffusion.cpp bindings for python","archived":false,"fork":false,"pushed_at":"2025-03-15T00:30:46.000Z","size":3201,"stargazers_count":43,"open_issues_count":3,"forks_count":8,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-31T18:21:14.395Z","etag":null,"topics":["ai","bindings","diffusion","flux","ggml","image-generation","img2img","machine-learning","stable-diffusion","txt2img"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/william-murray1204.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-03-13T10:21:55.000Z","updated_at":"2025-03-15T16:14:02.000Z","dependencies_parsed_at":"2024-04-02T07:43:54.036Z","dependency_job_id":"5e1fe77f-7467-49ee-b827-cad3d0b60c8d","html_url":"https://github.com/william-murray1204/stable-diffusion-cpp-python","commit_stats":null,"previous_names":["william-murray1204/stable-diffusion-cpp-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/william-murray1204%2Fstable-diffusion-cpp-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/william-murray1204%2Fstable-diffusion-cpp-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/william-murray1204%2Fstable-diffusion-cpp-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/william-murray1204%2Fstable-diffusion-cpp-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/william-murray1204","download_url":"https://codeload.github.com/william-murray1204/stable-diffusion-cpp-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247713258,"owners_count":20983683,"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","bindings","diffusion","flux","ggml","image-generation","img2img","machine-learning","stable-diffusion","txt2img"],"created_at":"2024-12-09T18:00:33.497Z","updated_at":"2025-04-07T19:13:36.463Z","avatar_url":"https://github.com/william-murray1204.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🖼️ Python Bindings for [`stable-diffusion.cpp`](https://github.com/leejet/stable-diffusion.cpp)\n\nSimple Python bindings for **@leejet's** [`stable-diffusion.cpp`](https://github.com/leejet/stable-diffusion.cpp) library.\n\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![PyPi version](https://badgen.net/pypi/v/pywhispercpp)](https://pypi.org/project/stable-diffusion-cpp-python/)\n[![Downloads](https://static.pepy.tech/badge/stable-diffusion-cpp-python)](https://pepy.tech/project/stable-diffusion-cpp-python)\n\nThis package provides:\n\n- Low-level access to C API via `ctypes` interface.\n- High-level Python API for Stable Diffusion and FLUX image generation.\n\n## Installation\n\nRequirements:\n\n- Python 3.8+\n- C compiler\n  - Linux: gcc or clang\n  - Windows: Visual Studio or MinGW\n  - MacOS: Xcode\n\nTo install the package, run:\n\n```bash\npip install stable-diffusion-cpp-python\n```\n\nThis will also build `stable-diffusion.cpp` from source and install it alongside this python package.\n\nIf this fails, add `--verbose` to the `pip install` to see the full cmake build log.\n\n### Installation Configuration\n\n`stable-diffusion.cpp` supports a number of hardware acceleration backends to speed up inference as well as backend specific options. See the [stable-diffusion.cpp README](https://github.com/leejet/stable-diffusion.cpp#build) for a full list.\n\nAll `stable-diffusion.cpp` cmake build options can be set via the `CMAKE_ARGS` environment variable or via the `--config-settings / -C` cli flag during installation.\n\n\u003cdetails open\u003e\n\u003csummary\u003eEnvironment Variables\u003c/summary\u003e\n\n```bash\n# Linux and Mac\nCMAKE_ARGS=\"-DSD_CUDA=ON\" pip install stable-diffusion-cpp-python\n```\n\n```powershell\n# Windows\n$env:CMAKE_ARGS=\"-DSD_CUDA=ON\"\npip install stable-diffusion-cpp-python\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCLI / requirements.txt\u003c/summary\u003e\n\nThey can also be set via `pip install -C / --config-settings` command and saved to a `requirements.txt` file:\n\n```bash\npip install --upgrade pip # ensure pip is up to date\npip install stable-diffusion-cpp-python -C cmake.args=\"-DSD_CUDA=ON\"\n```\n\n```txt\n# requirements.txt\n\nstable-diffusion-cpp-python -C cmake.args=\"-DSD_CUDA=ON\"\n```\n\n\u003c/details\u003e\n\n### Supported Backends\n\nBelow are some common backends, their build commands and any additional environment variables required.\n\n\u003c!-- CUDA --\u003e\n\u003cdetails\u003e\n\u003csummary\u003eUsing CUDA (CUBLAS)\u003c/summary\u003e\n\nThis provides BLAS acceleration using the CUDA cores of your Nvidia GPU. Make sure you have the CUDA toolkit installed. You can download it from your Linux distro's package manager (e.g. `apt install nvidia-cuda-toolkit`) or from here: [CUDA Toolkit](https://developer.nvidia.com/cuda-downloads). You can check your installed CUDA toolkit version by running `nvcc --version`.\n\n- It is recommended you have at least 4 GB of VRAM.\n\n```bash\nCMAKE_ARGS=\"-DSD_CUDA=ON\" pip install stable-diffusion-cpp-python\n```\n\n\u003c/details\u003e\n\n\u003c!-- HIPBLAS --\u003e\n\u003cdetails\u003e\n\u003csummary\u003eUsing HIPBLAS (ROCm)\u003c/summary\u003e\n\nThis provides BLAS acceleration using the ROCm cores of your AMD GPU. Make sure you have the ROCm toolkit installed and that you replace the `-DAMDGPU_TARGETS=` value with that of your GPU architecture.\nWindows users refer to [docs/hipBLAS_on_Windows.md](docs%2FhipBLAS_on_Windows.md) for a comprehensive guide and troubleshooting tips.\n\n```bash\nCMAKE_ARGS=\"-G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DSD_HIPBLAS=ON -DCMAKE_BUILD_TYPE=Release -DAMDGPU_TARGETS=gfx1101\" pip install stable-diffusion-cpp-python\n```\n\n\u003c/details\u003e\n\n\u003c!-- Metal --\u003e\n\u003cdetails\u003e\n\u003csummary\u003eUsing Metal\u003c/summary\u003e\n\nUsing Metal makes the computation run on the GPU. Currently, there are some issues with Metal when performing operations on very large matrices, making it highly inefficient at the moment. Performance improvements are expected in the near future.\n\n```bash\nCMAKE_ARGS=\"-DSD_METAL=ON\" pip install stable-diffusion-cpp-python\n```\n\n\u003c/details\u003e\n\n\u003c!-- Vulkan --\u003e\n\u003cdetails\u003e\n\u003csummary\u003eUsing Vulkan\u003c/summary\u003e\nInstall Vulkan SDK from https://www.lunarg.com/vulkan-sdk/.\n\n```bash\nCMAKE_ARGS=\"-DSD_VULKAN=ON\" pip install stable-diffusion-cpp-python\n```\n\n\u003c/details\u003e\n\n\u003c!-- SYCL --\u003e\n\u003cdetails\u003e\n\u003csummary\u003eUsing SYCL\u003c/summary\u003e\n\nUsing SYCL makes the computation run on the Intel GPU. Please make sure you have installed the related driver and [Intel® oneAPI Base toolkit](https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html) before start. More details and steps can refer to [llama.cpp SYCL backend](https://github.com/ggerganov/llama.cpp/blob/master/docs/backend/SYCL.md#linux).\n\n```bash\n# Export relevant ENV variables\nsource /opt/intel/oneapi/setvars.sh\n\n# Option 1: Use FP32 (recommended for better performance in most cases)\nCMAKE_ARGS=\"-DSD_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx\" pip install stable-diffusion-cpp-python\n\n# Option 2: Use FP16\nCMAKE_ARGS=\"-DSD_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DGGML_SYCL_F16=ON\" pip install stable-diffusion-cpp-python\n```\n\n\u003c/details\u003e\n\n\u003c!-- Flash Attention --\u003e\n\u003cdetails\u003e\n\u003csummary\u003eUsing Flash Attention\u003c/summary\u003e\n\nEnabling flash attention reduces memory usage by at least 400 MB. At the moment, it is not supported when CUDA (CUBLAS) is enabled because the kernel implementation is missing.\n\n```bash\nCMAKE_ARGS=\"-DSD_FLASH_ATTN=ON\" pip install stable-diffusion-cpp-python\n```\n\n\u003c/details\u003e\n\n\u003c!-- OpenBLAS --\u003e\n\u003cdetails\u003e\n\u003csummary\u003eUsing OpenBLAS\u003c/summary\u003e\n\n```bash\nCMAKE_ARGS=\"-DGGML_OPENBLAS=ON\" pip install stable-diffusion-cpp-python\n```\n\n\u003c/details\u003e\n\n\u003c!-- MUSA --\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eUsing MUSA\u003c/summary\u003e\n\nThis provides BLAS acceleration using the MUSA cores of your Moore Threads GPU. Make sure to have the MUSA toolkit installed.\n\n```bash\nCMAKE_ARGS=\"-DCMAKE_C_COMPILER=/usr/local/musa/bin/clang -DCMAKE_CXX_COMPILER=/usr/local/musa/bin/clang++ -DSD_MUSA=ON -DCMAKE_BUILD_TYPE=Release\" pip install stable-diffusion-cpp-python\n```\n\n\u003c/details\u003e\n\n### Upgrading and Reinstalling\n\nTo upgrade and rebuild `stable-diffusion-cpp-python` add `--upgrade --force-reinstall --no-cache-dir` flags to the `pip install` command to ensure the package is rebuilt from source.\n\n## High-level API\n\nThe high-level API provides a simple managed interface through the `StableDiffusion` class.\n\nBelow is a short example demonstrating how to use the high-level API to generate a simple image:\n\n### Text to Image\n\n```python\nfrom stable_diffusion_cpp import StableDiffusion\n\ndef callback(step: int, steps: int, time: float):\n    print(\"Completed step: {} of {}\".format(step, steps))\n\nstable_diffusion = StableDiffusion(\n      model_path=\"../models/v1-5-pruned-emaonly.safetensors\",\n      # wtype=\"default\", # Weight type (e.g. \"q8_0\", \"f16\", etc) (The \"default\" setting is automatically applied and determines the weight type of a model file)\n)\noutput = stable_diffusion.txt_to_img(\n      prompt=\"a lovely cat\",\n      width=512, # Must be a multiple of 64\n      height=512, # Must be a multiple of 64\n      progress_callback=callback,\n      # seed=1337, # Uncomment to set a specific seed (use -1 for a random seed)\n)\noutput[0].save(\"output.png\") # Output returned as list of PIL Images\n```\n\n#### With LoRA (Stable Diffusion)\n\nYou can specify the directory where the lora weights are stored via `lora_model_dir`. If not specified, the default is the current working directory.\n\n- LoRA is specified via prompt, just like [stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features#lora). (e.g. `\u003clora:marblesh:1\u003e`)\n- LoRAs will not work when using quantized models. You must instead use a full precision `.safetensors` model.\n\nHere's a simple example:\n\n```python\nfrom stable_diffusion_cpp import StableDiffusion\n\nstable_diffusion = StableDiffusion(\n      model_path=\"../models/v1-5-pruned-emaonly.safetensors\",\n      lora_model_dir=\"../models/\", # This should point to folder where LoRA weights are stored (not an individual file)\n)\noutput = stable_diffusion.txt_to_img(\n      prompt=\"a lovely cat\u003clora:marblesh:1\u003e\",\n)\n```\n\n- The `lora_model_dir` argument is used in the same way for FLUX image generation.\n\n### FLUX Image Generation\n\nFLUX models should be run using the same implementation as the [stable-diffusion.cpp FLUX documentation](https://github.com/leejet/stable-diffusion.cpp/blob/master/docs/flux.md) where the `diffusion_model_path` argument is used in place of the `model_path`. The `clip_l_path`, `t5xxl_path`, and `vae_path` arguments are also required for inference to function.\n\nDownload the weights from the links below:\n\n- Preconverted gguf weights from [FLUX.1-dev-gguf](https://huggingface.co/leejet/FLUX.1-dev-gguf) or [FLUX.1-schnell](https://huggingface.co/leejet/FLUX.1-schnell-gguf), this way you don't have to do the conversion yourself.\n- Download `vae` from https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/ae.safetensors\n- Download `clip_l` from https://huggingface.co/comfyanonymous/flux_text_encoders/blob/main/clip_l.safetensors\n- Download `t5xxl` from https://huggingface.co/comfyanonymous/flux_text_encoders/blob/main/t5xxl_fp16.safetensors\n\n```python\nfrom stable_diffusion_cpp import StableDiffusion\n\nstable_diffusion = StableDiffusion(\n    diffusion_model_path=\"../models/flux1-schnell-q3_k.gguf\", # In place of model_path\n    clip_l_path=\"../models/clip_l.safetensors\",\n    t5xxl_path=\"../models/t5xxl_fp16.safetensors\",\n    vae_path=\"../models/ae.safetensors\",\n    vae_decode_only=True, # Can be True if we dont use img_to_img\n)\noutput = stable_diffusion.txt_to_img(\n      prompt=\"a lovely cat holding a sign says 'flux.cpp'\",\n      sample_steps=4,\n      cfg_scale=1.0, # a cfg_scale of 1 is recommended for FLUX\n      sample_method=\"euler\", # euler is recommended for FLUX\n)\n```\n\n#### With LoRA (FLUX)\n\nLoRAs can be used with FLUX models in the same way as Stable Diffusion models ([as shown above](#with-lora-stable-diffusion)).\n\nNote that:\n\n- It is recommended you use LoRAs with naming formats compatible with ComfyUI.\n- LoRAs will only work with Flux-dev q8_0.\n- You can download FLUX LoRA models from https://huggingface.co/XLabs-AI/flux-lora-collection/tree/main (you must use a comfy converted version!!!).\n\n### SD3.5 Image Generation\n\nDownload the weights from the links below:\n\n- Download sd3.5_large from https://huggingface.co/stabilityai/stable-diffusion-3.5-large/blob/main/sd3.5_large.safetensors\n- Download clip_g from https://huggingface.co/Comfy-Org/stable-diffusion-3.5-fp8/blob/main/text_encoders/clip_g.safetensors\n- Download clip_l from https://huggingface.co/Comfy-Org/stable-diffusion-3.5-fp8/blob/main/text_encoders/clip_l.safetensors\n- Download t5xxl from https://huggingface.co/Comfy-Org/stable-diffusion-3.5-fp8/blob/main/text_encoders/t5xxl_fp16.safetensors\n\n```python\nfrom stable_diffusion_cpp import StableDiffusion\n\nstable_diffusion = StableDiffusion(\n    model_path=\"../models/sd3.5_large.safetensors\",\n    clip_l_path=\"../models/clip_l.safetensors\",\n    clip_g_path=\"../models/clip_g.safetensors\",\n    t5xxl_path=\"../models/t5xxl_fp16.safetensors\",\n)\noutput = stable_diffusion.txt_to_img(\n      prompt=\"a lovely cat holding a sign says 'Stable diffusion 3.5 Large'\",\n      height=1024,\n      width=1024,\n      cfg_scale=4.5,\n      sample_method=\"euler\",\n)\n```\n\n### Image to Image\n\n```python\nfrom stable_diffusion_cpp import StableDiffusion\n\nINPUT_IMAGE = \"../input.png\"\n# INPUT_IMAGE = Image.open(\"../input.png\") # or alternatively, pass as PIL Image\n\nstable_diffusion = StableDiffusion(model_path=\"../models/v1-5-pruned-emaonly.safetensors\")\n\noutput = stable_diffusion.img_to_img(\n      prompt=\"blue eyes\",\n      image=INPUT_IMAGE, # Note: The input image will be automatically resized to the match the width and height arguments (default: 512x512)\n      strength=0.4,\n)\n```\n\n### Inpainting\n\n```python\nfrom stable_diffusion_cpp import StableDiffusion\n\n# Note: Inpainting with a base model gives poor results. A model fine-tuned for inpainting is recommended.\nstable_diffusion = StableDiffusion(model_path=\"../models/v1-5-pruned-emaonly.safetensors\")\n\noutput = stable_diffusion.img_to_img(\n      prompt=\"blue eyes\",\n      image=\"../input.png\",\n      mask_image=\"../mask.png\", # A grayscale image where 0 is masked and 255 is unmasked\n      strength=0.4,\n)\n```\n\n### PhotoMaker\n\nYou can use [PhotoMaker](https://github.com/TencentARC/PhotoMaker) to personalize generated images with your own ID.\n\n**NOTE**, currently PhotoMaker **ONLY** works with **SDXL** (any SDXL model files will work).\nThe VAE in SDXL encounters NaN issues. You can find a fixed VAE here: [SDXL VAE FP16 Fix](https://huggingface.co/madebyollin/sdxl-vae-fp16-fix/blob/main/sdxl_vae.safetensors).\n\nDownload PhotoMaker model file (in safetensor format) [here](https://huggingface.co/bssrdf/PhotoMaker). The official release of the model file (in .bin format) does not work with `stablediffusion.cpp`.\n\nIn prompt, make sure you have a class word followed by the trigger word `\"img\"` (hard-coded for now). The class word could be one of `\"man, woman, girl, boy\"`. If input ID images contain asian faces, add `Asian` before the class word.\n\n```python\nfrom stable_diffusion_cpp import StableDiffusion\n\nstable_diffusion = StableDiffusion(\n      model_path=\"../models/sdxl.vae.safetensors\",\n      vae_path=\"../models/sdxl.vae.safetensors\",\n      stacked_id_embed_dir=\"../models/photomaker-v1.safetensors\",\n      # keep_vae_on_cpu=True,  # If on low memory GPUs (\u003c= 8GB), setting this to True is recommended to get artifact free images\n)\n\noutput = stable_diffusion.txt_to_img(\n      cfg_scale=5.0, # a cfg_scale of 5.0 is recommended for PhotoMaker\n      height=1024,\n      width=1024,\n      style_strength=10,  # (0-100)% Default is 20 and 10-20 typically gets good results. Lower ratio means more faithfully following input ID (not necessarily better quality).\n      sample_method=\"euler\",\n      prompt=\"a man img, retro futurism, retro game art style but extremely beautiful, intricate details, masterpiece, best quality, space-themed, cosmic, celestial, stars, galaxies, nebulas, planets, science fiction, highly detailed\",\n      negative_prompt=\"realistic, photo-realistic, worst quality, greyscale, bad anatomy, bad hands, error, text\",\n      input_id_images_path=\"../assets/newton_man\",\n)\n```\n\n### PhotoMaker Version 2\n\n[PhotoMaker Version 2 (PMV2)](https://github.com/TencentARC/PhotoMaker/blob/main/README_pmv2.md) has some key improvements. Unfortunately it has a very heavy dependency which makes running it a bit involved in `SD.cpp`.\n\nRunning PMV2 Requires running a python script `face_detect.py` (found [here](https://github.com/leejet/stable-diffusion.cpp/blob/master/face_detect.py)) to obtain **id_embeds** for the given input images.\n\n```\npython face_detect.py \u003cinput_image_dir\u003e\n```\n\nAn `id_embeds.safetensors` file will be generated in `input_images_dir`.\n\n**Note: this step is only needed to run once; the same `id_embeds` can be reused**\n\n- Run the same command as in version 1 but replacing `photomaker-v1.safetensors` with `photomaker-v2.safetensors`.\n\n  You can download `photomaker-v2.safetensors` from [here](https://huggingface.co/bssrdf/PhotoMakerV2).\n\n- All the other parameters from Version 1 remain the same for Version 2.\n\n### Listing GGML model and RNG types, schedulers and sample methods\n\nAccess the GGML model and RNG types, schedulers, and sample methods via the following maps:\n\n```python\nfrom stable_diffusion_cpp import GGML_TYPE_MAP, RNG_TYPE_MAP, SCHEDULE_MAP, SAMPLE_METHOD_MAP\n\nprint(\"GGML model types:\", list(GGML_TYPE_MAP))\nprint(\"RNG types:\", list(RNG_TYPE_MAP))\nprint(\"Schedulers:\", list(SCHEDULE_MAP))\nprint(\"Sample methods:\", list(SAMPLE_METHOD_MAP))\n```\n\n### Other High-level API Examples\n\nOther examples for the high-level API (such as upscaling and model conversion) can be found in the [tests](tests) directory.\n\n## Low-level API\n\nThe low-level API is a direct [`ctypes`](https://docs.python.org/3/library/ctypes.html) binding to the C API provided by `stable-diffusion.cpp`.\nThe entire low-level API can be found in [stable_diffusion_cpp/stable_diffusion_cpp.py](https://github.com/william-murray1204/stable-diffusion-cpp-python/blob/main/stable_diffusion_cpp/stable_diffusion_cpp.py) and directly mirrors the C API in [stable-diffusion.h](https://github.com/leejet/stable-diffusion.cpp/blob/master/stable-diffusion.h).\n\nBelow is a short example demonstrating how to use the low-level API:\n\n```python\nimport stable_diffusion_cpp as sd_cpp\nimport ctypes\nfrom PIL import Image\n\nimg = Image.open(\"path/to/image.png\")\nimg_bytes = img.tobytes()\n\nc_image = sd_cpp.sd_image_t(\n      width=img.width,\n      height=img.height,\n      channel=channel,\n      data=ctypes.cast(\n            (ctypes.c_byte * len(img_bytes))(*img_bytes),\n            ctypes.POINTER(ctypes.c_uint8),\n      ),\n) # Create a new C sd_image_t\n\nimg = sd_cpp.upscale(\n      self.upscaler,\n      image_bytes,\n      upscale_factor,\n) # Upscale the image\n```\n\n## Development\n\nTo get started, clone the repository and install the package in editable / development mode.\n\n```bash\ngit clone --recurse-submodules https://github.com/william-murray1204/stable-diffusion-cpp-python.git\ncd stable-diffusion-cpp-python\n\n# Upgrade pip (required for editable mode)\npip install --upgrade pip\n\n# Install with pip\npip install -e .\n```\n\nNow you can make changes to the code within the `stable_diffusion_cpp` directory and test them in your python environment.\n\n## References\n\n- [stable-diffusion.cpp](https://github.com/leejet/stable-diffusion.cpp)\n- [llama-cpp-python](https://github.com/abetlen/llama-cpp-python)\n- [llama.cpp](https://github.com/ggerganov/llama.cpp)\n- [whisper-cpp-python](https://github.com/carloscdias/whisper-cpp-python)\n- [Golang stable-diffusion](https://github.com/seasonjs/stable-diffusion)\n- [StableDiffusion.NET](https://github.com/DarthAffe/StableDiffusion.NET)\n\n## License\n\nThis project is licensed under the terms of the MIT license. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliam-murray1204%2Fstable-diffusion-cpp-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilliam-murray1204%2Fstable-diffusion-cpp-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliam-murray1204%2Fstable-diffusion-cpp-python/lists"}