leejet/stable-diffusion.cpp
Diffusion model(SD,Flux,Wan,Qwen Image,Z-Image,...) inference in pure C/C++
C++★ 7,285+36 that day#11 on trendingE 34.9 health11.08% duplicated
E34.9/100
Duplication40
11.3% in c, cpp-header, c-header, cpp, python, bash, perl, powershell, cmakeDead coden/a
the languages dead code reads are under 5% of the codeComplexity30
86.7%Most complex files
- thirdparty/json.hpp4503 cx
- thirdparty/httplib.h2335 cx
- thirdparty/oniguruma/regparse.c2043 cx
- thirdparty/oniguruma/regcomp.c1988 cx
- thirdparty/stb_image.h1746 cx
- thirdparty/miniz.h1690 cx
- thirdparty/oniguruma/regexec.c1361 cx
- src/pipeline/diffusion_engine.cpp802 cx
- examples/common/common.cpp621 cx
- src/conditioning/conditioner.hpp591 cx
Dead code 0.32% unused · 5 findings
- scripts/convert_fp8_scale_to_bf16.py:osunused-import
- scripts/convert_qwen3_vl.py:sysunused-import
- scripts/convert_sefi.py:sysunused-import
- scripts/face_detect.py:ins_get_imageunused-import
- scripts/face_detect.py:save_fileunused-import
405files
255,415lines
2,089,816tokens
1,549clones
28,300duplicated lines (11.08%)
225,516duplicated tokens (10.79%)
By format
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| cpp-header | 71 | 76,175 | 602 | 6,766 | 8.88% |
| c | 20 | 76,461 | 576 | 17,424 | 22.79% |
| c-header | 82 | 50,428 | 194 | 2,285 | 4.53% |
| cpp | 70 | 40,527 | 113 | 1,226 | 3.03% |
| markdown | 69 | 6,792 | 24 | 282 | 4.15% |
| text | 29 | 228 | 19 | 51 | 22.37% |
| yaml | 6 | 1,067 | 13 | 183 | 17.15% |
| json | 1 | 257 | 3 | 49 | 19.07% |
| python | 10 | 1,568 | 2 | 17 | 1.08% |
| bash | 35 | 978 | 2 | 8 | 0.82% |
Largest clones
- 464 lines · 2,790 tokens cthirdparty/oniguruma/unicode_property_data.c:1204–1667⇆thirdparty/oniguruma/unicode_property_data.c:2622–3085
- 44 lines · 2,632 tokens c-headerthirdparty/stb_image.h:7944–7987⇆thirdparty/stb_image_write.h:1717–1759
- 433 lines · 2,588 tokens cthirdparty/oniguruma/unicode_property_data.c:3458–3890⇆thirdparty/oniguruma/unicode_property_data.c:18497–18929
- 423 lines · 2,544 tokens cthirdparty/oniguruma/unicode_property_data.c:1245–1667⇆thirdparty/oniguruma/unicode_property_data.c:6158–6580
- 410 lines · 2,455 tokens cthirdparty/oniguruma/unicode_property_data.c:11108–11517⇆thirdparty/oniguruma/unicode_property_data.c:23552–23961
- 376 lines · 2,262 tokens cthirdparty/oniguruma/unicode_property_data.c:14687–15062⇆thirdparty/oniguruma/unicode_property_data.c:24440–24815
- 355 lines · 2,125 tokens cthirdparty/oniguruma/unicode_property_data.c:4555–4909⇆thirdparty/oniguruma/unicode_property_data.c:14697–15051
- 328 lines · 1,964 tokens cthirdparty/oniguruma/unicode_property_data.c:14286–14613⇆thirdparty/oniguruma/unicode_property_data.c:24032–24359
- 306 lines · 1,831 tokens cthirdparty/oniguruma/unicode_property_data.c:10792–11097⇆thirdparty/oniguruma/unicode_property_data.c:23236–23541
- 70 lines · 1,782 tokens c-headerthirdparty/httplib.h:1525–1594⇆thirdparty/httplib.h:1907–1976
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | Duplication | Health | Commit |
|---|---|---|---|---|---|---|---|---|
| Sep 25, 2026 | #11 | 7,285 (+36) | 405 | 255,415 | 1,549 | 11.08% | E 34.9 | b167b94 |
Want this for your own project? Install jscpd and run jscpd .