This report summarizes scanner evidence for leejet/stable-diffusion.cpp. SynthScan examined 271,781 lines of code across 515 source files, recording 493 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 1.5 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 484 finding(s).
Are imports declared and package/API names verified? 6 finding(s).
Are wrappers, guards, and repeated structures necessary? 4 finding(s).
Which changes need focused human review? 493 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 493 distinct pattern matches across 8 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | include/stable-diffusion.h | 1 | #ifndef __STABLE_DIFFUSION_H__ | COMMENT |
| LOW | docs/docker.md | 81 | # -v ./models:/models -v ./build:/output \ | COMMENT |
| LOW | examples/server/async_jobs.h | 1 | #pragma once | COMMENT |
| LOW | examples/server/model_catalog.cpp | 1 | #include "model_catalog.h" | COMMENT |
| LOW | examples/server/runtime.h | 1 | #pragma once | COMMENT |
| LOW | examples/server/routes_sdapi.cpp | 1 | #include "routes.h" | COMMENT |
| LOW | examples/server/runtime.cpp | 1 | #include "runtime.h" | COMMENT |
| LOW | examples/server/main.cpp | 1 | #include <cstdlib> | COMMENT |
| LOW | examples/cli/image_metadata.cpp | 1 | #include "image_metadata.h" | COMMENT |
| LOW | examples/cli/main.cpp | 1 | #include <stdio.h> | COMMENT |
| LOW | examples/common/common.cpp | 1 | #include "common.h" | COMMENT |
| LOW | examples/common/media_io.cpp | 1 | #include "media_io.h" | COMMENT |
| LOW | examples/common/media_io.cpp | 21 | #include "stb_image.h" | COMMENT |
| LOW | examples/common/common.h | 1 | #ifndef __EXAMPLES_COMMON_COMMON_H__ | COMMENT |
| LOW | examples/common/log.h | 1 | #ifndef __EXAMPLE_LOG_H__ | COMMENT |
| LOW | thirdparty/httplib.h | 1 | // | COMMENT |
| LOW | thirdparty/httplib.h | 21 | "cpp-httplib doesn't support 32-bit Windows. Please use a 64-bit compiler.") | COMMENT |
| LOW | thirdparty/httplib.h | 41 | /* | COMMENT |
| LOW | thirdparty/httplib.h | 61 | #ifndef CPPHTTPLIB_CONNECTION_TIMEOUT_USECOND | COMMENT |
| LOW | thirdparty/httplib.h | 81 | #ifndef CPPHTTPLIB_CLIENT_READ_TIMEOUT_SECOND | COMMENT |
| LOW | thirdparty/httplib.h | 101 | #ifndef CPPHTTPLIB_IDLE_INTERVAL_SECOND | COMMENT |
| LOW | thirdparty/httplib.h | 121 | #ifndef CPPHTTPLIB_HEADER_MAX_COUNT | COMMENT |
| LOW | thirdparty/httplib.h | 141 | #ifndef CPPHTTPLIB_RANGE_MAX_COUNT | COMMENT |
| LOW | thirdparty/httplib.h | 161 | #ifndef CPPHTTPLIB_COMPRESSION_BUFSIZ | COMMENT |
| LOW | thirdparty/httplib.h | 181 | #define CPPHTTPLIB_LISTEN_BACKLOG 5 | COMMENT |
| LOW | thirdparty/httplib.h | 201 | #if defined(_MSC_VER) | COMMENT |
| LOW | thirdparty/httplib.h | 221 | #endif // NOMINMAX | COMMENT |
| LOW | thirdparty/httplib.h | 241 | using socklen_t = int; | COMMENT |
| LOW | thirdparty/httplib.h | 261 | #endif | COMMENT |
| LOW | thirdparty/httplib.h | 281 | #include <algorithm> | COMMENT |
| LOW | thirdparty/httplib.h | 301 | #include <set> | COMMENT |
| LOW | thirdparty/httplib.h | 321 | #include <wincrypt.h> | COMMENT |
| LOW | thirdparty/httplib.h | 341 | #include <openssl/err.h> | COMMENT |
| LOW | thirdparty/httplib.h | 361 | COMMENT | |
| LOW | thirdparty/darts.h | 1 | #ifndef DARTS_H_ | COMMENT |
| LOW | thirdparty/darts.h | 101 | COMMENT | |
| LOW | thirdparty/darts.h | 141 | // member variables with 0 and NULLs. | COMMENT |
| LOW | thirdparty/darts.h | 201 | return size_; | COMMENT |
| LOW | thirdparty/darts.h | 221 | // `progress_func' is a pointer to a callback function. If it is not NULL, | COMMENT |
| LOW | thirdparty/darts.h | 241 | // non-zero value or throws a <Darts::Exception>. The exception is thrown | COMMENT |
| LOW | thirdparty/darts.h | 261 | // Note that the length of `result' indicates the length from the `node_pos'. | COMMENT |
| LOW | thirdparty/darts.h | 281 | // `node_pos' works as well as in exactMatchSearch(). | COMMENT |
| LOW | thirdparty/json.hpp | 21 | #include <algorithm> // all_of, find, for_each | COMMENT |
| LOW | thirdparty/json.hpp | 41 | // SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me> | COMMENT |
| LOW | thirdparty/json.hpp | 61 | #ifndef JSON_SKIP_LIBRARY_VERSION_CHECK | COMMENT |
| LOW | thirdparty/json.hpp | 81 | #if JSON_DIAGNOSTICS | COMMENT |
| LOW | thirdparty/json.hpp | 141 | { | COMMENT |
| LOW | thirdparty/json.hpp | 161 | #include <algorithm> // transform | COMMENT |
| LOW | thirdparty/json.hpp | 181 | COMMENT | |
| LOW | thirdparty/json.hpp | 201 | #include <array> // array | COMMENT |
| LOW | thirdparty/json.hpp | 221 | // | | |__ | | | | | | version 3.11.2 | COMMENT |
| LOW | thirdparty/json.hpp | 321 | // | | |__ | | | | | | version 3.11.2 | COMMENT |
| LOW | thirdparty/json.hpp | 341 | #define JSON_HEDLEY_STRINGIFY_EX(x) #x | COMMENT |
| LOW | thirdparty/json.hpp | 361 | #define JSON_HEDLEY_CONCAT3_EX(a,b,c) a##b##c | COMMENT |
| LOW | thirdparty/json.hpp | 381 | #define JSON_HEDLEY_VERSION_DECODE_MINOR(version) (((version) % 1000000) / 1000) | COMMENT |
| LOW | thirdparty/json.hpp | 401 | #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GNUC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(ma | COMMENT |
| LOW | thirdparty/json.hpp | 421 | #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (0) | COMMENT |
| LOW | thirdparty/json.hpp | 441 | #endif | COMMENT |
| LOW | thirdparty/json.hpp | 461 | #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (0) | COMMENT |
| LOW | thirdparty/json.hpp | 481 | #undef JSON_HEDLEY_SUNPRO_VERSION | COMMENT |
| 411 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | thirdparty/httplib.h | 9715 | // Cross-host/scheme redirect - create new client with robust setup | COMMENT |
| MEDIUM | thirdparty/httplib.h | 9720 | // New method for robust redirect client creation | COMMENT |
| MEDIUM | thirdparty/httplib.h | 9788 | // Setup client with robust configuration | COMMENT |
| MEDIUM | thirdparty/httplib.h | 9796 | // New method for robust client setup (based on basic_manual_redirect.cpp | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/convert_qwen3_vl.py | 62 | CODE | |
| LOW | scripts/remove_utf8_bom.py | 64 | CODE | |
| LOW | scripts/remove_utf8_bom.py | 176 | CODE | |
| LOW | scripts/convert_sefi.py | 129 | CODE | |
| LOW | scripts/convert_sefi.py | 204 | CODE | |
| LOW | scripts/merge_safetensors.py | 264 | CODE | |
| LOW | scripts/convert_fp8_scale_to_bf16.py | 201 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/convert_qwen3_vl.py | 19 | CODE | |
| LOW | scripts/pulid_extract_id.py | 25 | CODE | |
| LOW | scripts/convert_sefi.py | 16 | CODE | |
| LOW | scripts/face_detect.py | 9 | CODE | |
| LOW | scripts/face_detect.py | 10 | CODE | |
| LOW | scripts/convert_fp8_scale_to_bf16.py | 5 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | scripts/merge_safetensors.py | 22 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/merge_safetensors.py | 24 | # ----------------------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | scripts/remove_utf8_bom.py | 125 | except FileNotFoundError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | .github/workflows/build.yml | 513 | # Create the venv directly at the cache location to avoid relocation issues | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/convert_sefi.py | 129 | def stage_tensors_for_section(section_dir: str, rewrite_fn): | CODE |