# EdVince/Stable-Diffusion-NCNN

Stable Diffusion in NCNN with c++, supported txt2img and img2img

Repository: https://github.com/EdVince/Stable-Diffusion-NCNN
Canonical: https://ross.abutalabs.com/products/stable-diffusion-ncnn
Language: C++
License: BSD-3-Clause
License Family: permissive
Topics: clip, cpp, diffusion, mnn, ncnn, onnx, stable-diffusion, tensorrt, tnn, android, executable, img2img, txt2img
Last push: 2023-07-03T10:31:38+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 99
- inputs: {"age_days": 1391, "days_push": 1157, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1067, forks 103 (observed 2026-08-28T04:03:27.198112+00:00)

## What it is
A C++ implementation of Stable Diffusion using the NCNN inference framework, supporting both txt2img and img2img. It runs on x86 Windows executables and Android devices without requiring Python or GPU servers.

## Use cases
- generate images from text prompts on-device
- run stable diffusion on android phone
- txt2img inference in c++ without python
- img2img on cpu with ncnn
- embed stable diffusion into a mobile app
- offline image generation on windows

## When to choose
- you need stable diffusion running natively in C++ or on Android
- you want offline, serverless image generation on CPU
- you need a lightweight alternative to Python-based diffusion pipelines

## When to avoid
- you need the latest Stable Diffusion models or features like SDXL
- you want fast high-resolution generation (it is slow and RAM-heavy)
- you need GPU-accelerated production inference

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, llm-inference, image-processing, stable-diffusion
- domain: machine-learning, image-processing, artificial-intelligence, mobile-development
- platform: cpp, windows, cross-platform
- tags: stable-diffusion, ncnn, txt2img, img2img, on-device-inference, text-to-image, android

## Member repositories
- EdVince/Stable-Diffusion-NCNN (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:27.198112+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:55:08.616707+00:00, confidence not recorded.
  - readme: https://github.com/EdVince/Stable-Diffusion-NCNN (fetched 2026-08-28T04:03:27.198112+00:00, sha 6ebc2428976f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
