AI Slop Code Risk Monitor

CompVis/stable-diffusion

SlopCodeMonitor badge for CompVis/stable-diffusion Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

A latent text-to-image diffusion model

13.3 Moderate pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for CompVis/stable-diffusion, a Jupyter Notebook project with 73,613 GitHub stars. SynthScan examined 18,009 lines of code across 84 source files, recording 186 pattern matches distributed across 9 syntactic categories. The legacy adjusted pattern signal is 13.3 (Moderate 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.

13.3
Adjusted Signal
13.3
Raw Pattern Score
100%
Time Factor
2024-06-18
Last Push
73.6K
Stars
Jupyter Notebook
Language
18.0K
Lines of Code
84
Files
186
Pattern Hits
2026-11-27
Scan Date
0.04
HC Hit Rate

Risk Review · Payload v1

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-11-27.

Cognitive Ownership Risk 20.0/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 83 finding(s).

Hallucinated Dependency & Supply Chain Risk 9.5/100 · LOW

Are imports declared and package/API names verified? 36 finding(s).

Agent Over-Engineering Ratio 37.8/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 116 finding(s).

PR Review Velocity Impact 59.0/100 · HIGH

Which changes need focused human review? 186 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

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.

CRITICAL 0HIGH 3MEDIUM 60LOW 123

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 186 distinct pattern matches across 9 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.

Decorative Section Separators59 hits · 102 pts
SeverityFileLineSnippetContext
MEDIUM⚡ldm/modules/image_degradation/bsrgan.py3# --------------------------------------------STRING
MEDIUM⚡ldm/modules/image_degradation/bsrgan.py5# --------------------------------------------STRING
MEDIUM⚡ldm/modules/image_degradation/bsrgan.py10# --------------------------------------------STRING
MEDIUMldm/modules/image_degradation/bsrgan.py43# --------------------------------------------STRING
MEDIUMldm/modules/image_degradation/bsrgan.py45# --------------------------------------------STRING
MEDIUMldm/modules/image_degradation/bsrgan.py222# --------------------------------------------STRING
MEDIUMldm/modules/image_degradation/bsrgan.py224# --------------------------------------------STRING
MEDIUM⚡ldm/modules/image_degradation/utils_image.py182# --------------------------------------------COMMENT
MEDIUM⚡ldm/modules/image_degradation/utils_image.py184# --------------------------------------------COMMENT
MEDIUM⚡ldm/modules/image_degradation/utils_image.py244# --------------------------------------------COMMENT
MEDIUM⚡ldm/modules/image_degradation/utils_image.py246# --------------------------------------------COMMENT
MEDIUM⚡ldm/modules/image_degradation/utils_image.py618# --------------------------------------------COMMENT
MEDIUM⚡ldm/modules/image_degradation/utils_image.py620# --------------------------------------------COMMENT
MEDIUMldm/modules/image_degradation/utils_image.py200# --------------------------------------------COMMENT
MEDIUMldm/modules/image_degradation/utils_image.py202# --------------------------------------------COMMENT
MEDIUMldm/modules/image_degradation/utils_image.py217# --------------------------------------------COMMENT
MEDIUMldm/modules/image_degradation/utils_image.py219# --------------------------------------------COMMENT
MEDIUMldm/modules/image_degradation/utils_image.py269# --------------------------------------------COMMENT
MEDIUMldm/modules/image_degradation/utils_image.py271# --------------------------------------------COMMENT
MEDIUMldm/modules/image_degradation/utils_image.py296# --------------------------------------------COMMENT
MEDIUMldm/modules/image_degradation/utils_image.py298# --------------------------------------------COMMENT
MEDIUMldm/modules/image_degradation/utils_image.py639# --------------------------------------------COMMENT
MEDIUMldm/modules/image_degradation/utils_image.py641# --------------------------------------------COMMENT
MEDIUMldm/modules/image_degradation/utils_image.py763# --------------------------------------------COMMENT
MEDIUMldm/modules/image_degradation/utils_image.py765# --------------------------------------------COMMENT
MEDIUMldm/modules/image_degradation/utils_image.py836# --------------------------------------------COMMENT
MEDIUMldm/modules/image_degradation/utils_image.py838# --------------------------------------------COMMENT
MEDIUM⚡ldm/modules/image_degradation/utils_image.py16# --------------------------------------------STRING
MEDIUM⚡ldm/modules/image_degradation/utils_image.py19# --------------------------------------------STRING
MEDIUM⚡ldm/modules/image_degradation/utils_image.py22# --------------------------------------------STRING
MEDIUM⚡ldm/modules/image_degradation/utils_image.py175# --------------------------------------------STRING
MEDIUM⚡ldm/modules/image_degradation/utils_image.py178# --------------------------------------------STRING
MEDIUM⚡ldm/modules/image_degradation/utils_image.py234# --------------------------------------------STRING
MEDIUM⚡ldm/modules/image_degradation/utils_image.py236# --------------------------------------------STRING
MEDIUM⚡ldm/modules/image_degradation/utils_image.py240# --------------------------------------------STRING
MEDIUM⚡ldm/modules/image_degradation/utils_image.py370# --------------------------------------------STRING
MEDIUM⚡ldm/modules/image_degradation/utils_image.py372# --------------------------------------------STRING
MEDIUM⚡ldm/modules/image_degradation/utils_image.py376# --------------------------------------------STRING
MEDIUM⚡ldm/modules/image_degradation/utils_image.py612# --------------------------------------------STRING
MEDIUM⚡ldm/modules/image_degradation/utils_image.py614# --------------------------------------------STRING
MEDIUMldm/modules/image_degradation/utils_image.py61# --------------------------------------------STRING
MEDIUMldm/modules/image_degradation/utils_image.py63# --------------------------------------------STRING
MEDIUMldm/modules/image_degradation/utils_image.py87# --------------------------------------------STRING
MEDIUMldm/modules/image_degradation/utils_image.py89# --------------------------------------------STRING
MEDIUMldm/modules/image_degradation/utils_image.py147# --------------------------------------------STRING
MEDIUMldm/modules/image_degradation/utils_image.py149# --------------------------------------------STRING
MEDIUMldm/modules/image_degradation/utils_image.py488# --------------------------------------------STRING
MEDIUMldm/modules/image_degradation/utils_image.py490# --------------------------------------------STRING
MEDIUMldm/modules/image_degradation/utils_image.py519# --------------------------------------------STRING
MEDIUMldm/modules/image_degradation/utils_image.py525# --------------------------------------------STRING
MEDIUMldm/modules/image_degradation/utils_image.py693# --------------------------------------------STRING
MEDIUMldm/modules/image_degradation/utils_image.py695# --------------------------------------------STRING
MEDIUM⚡ldm/modules/image_degradation/bsrgan_light.py18# --------------------------------------------STRING
MEDIUM⚡ldm/modules/image_degradation/bsrgan_light.py20# --------------------------------------------STRING
MEDIUM⚡ldm/modules/image_degradation/bsrgan_light.py25# --------------------------------------------STRING
MEDIUMldm/modules/image_degradation/bsrgan_light.py43# --------------------------------------------STRING
MEDIUMldm/modules/image_degradation/bsrgan_light.py45# --------------------------------------------STRING
MEDIUMldm/modules/image_degradation/bsrgan_light.py222# --------------------------------------------STRING
MEDIUMldm/modules/image_degradation/bsrgan_light.py224# --------------------------------------------STRING
Unused Imports36 hits · 36 pts
SeverityFileLineSnippetContext
LOWnotebook_helpers.py10CODE
LOWmain.py1CODE
LOWmain.py1CODE
LOWmain.py10CODE
LOWmain.py10CODE
LOWmain.py16CODE
LOWmain.py16CODE
LOWscripts/inpaint.py1CODE
LOWscripts/txt2img.py1CODE
LOWscripts/txt2img.py1CODE
LOWscripts/txt2img.py15CODE
LOWscripts/knn2img.py1CODE
LOWscripts/knn2img.py2CODE
LOWscripts/knn2img.py4CODE
LOWscripts/knn2img.py10CODE
LOWscripts/img2img.py3CODE
LOWscripts/img2img.py3CODE
LOWldm/util.py6CODE
LOWldm/util.py7CODE
LOWldm/models/diffusion/ddim.py6CODE
LOWldm/models/diffusion/plms.py6CODE
LOWldm/models/diffusion/dpm_solver/dpm_solver.py2CODE
LOWldm/models/diffusion/dpm_solver/__init__.py1CODE
LOWldm/modules/x_transformer.py8CODE
LOWldm/modules/losses/__init__.py1CODE
LOWldm/modules/losses/vqperceptual.py4CODE
LOWldm/modules/losses/contperceptual.py4CODE
LOWldm/modules/encoders/modules.py5CODE
LOWldm/modules/image_degradation/__init__.py1CODE
LOWldm/modules/image_degradation/__init__.py2CODE
LOWldm/modules/diffusionmodules/util.py11CODE
LOWldm/modules/diffusionmodules/openaimodel.py2CODE
LOWldm/modules/diffusionmodules/openaimodel.py4CODE
LOWldm/data/base.py2CODE
LOWldm/data/base.py2CODE
LOWldm/data/base.py2CODE
Deep Nesting30 hits · 28 pts
SeverityFileLineSnippetContext
LOWnotebook_helpers.py59CODE
LOWmain.py340CODE
LOWscripts/txt2img.py98CODE
LOWscripts/img2img.py60CODE
LOWscripts/sample_diffusion.py36CODE
LOWscripts/sample_diffusion.py143CODE
LOWldm/models/diffusion/plms.py173CODE
LOWldm/models/diffusion/ddpm.py509CODE
LOWldm/models/diffusion/ddpm.py654CODE
LOWldm/models/diffusion/ddpm.py1251CODE
LOWldm/models/diffusion/ddpm.py1402CODE
LOWldm/models/diffusion/dpm_solver/dpm_solver.py177CODE
LOWldm/models/diffusion/dpm_solver/dpm_solver.py289CODE
LOWldm/models/diffusion/dpm_solver/dpm_solver.py321CODE
LOWldm/models/diffusion/dpm_solver/dpm_solver.py965CODE
LOWldm/modules/x_transformer.py371CODE
LOWldm/modules/x_transformer.py481CODE
LOWldm/modules/image_degradation/bsrgan.py438CODE
LOWldm/modules/image_degradation/bsrgan.py530CODE
LOWldm/modules/image_degradation/bsrgan.py617CODE
LOWldm/modules/image_degradation/utils_image.py380CODE
LOWldm/modules/image_degradation/utils_image.py401CODE
LOWldm/modules/image_degradation/utils_image.py441CODE
LOWldm/modules/image_degradation/utils_image.py642CODE
LOWldm/modules/image_degradation/bsrgan_light.py442CODE
LOWldm/modules/image_degradation/bsrgan_light.py534CODE
LOWldm/modules/diffusionmodules/util.py21CODE
LOWldm/modules/diffusionmodules/openaimodel.py443CODE
LOWldm/modules/diffusionmodules/openaimodel.py751CODE
LOWldm/data/imagenet.py150CODE
AI Structural Patterns28 hits · 28 pts
SeverityFileLineSnippetContext
LOWnotebook_helpers.py188CODE
LOWnotebook_helpers.py208CODE
LOWmain.py163CODE
LOWscripts/knn2img.py161CODE
LOWldm/models/autoencoder.py15CODE
LOWldm/models/diffusion/ddim.py57CODE
LOWldm/models/diffusion/ddim.py114CODE
LOWldm/models/diffusion/ddim.py166CODE
LOWldm/models/diffusion/classifier.py30CODE
LOWldm/models/diffusion/plms.py58CODE
LOWldm/models/diffusion/plms.py115CODE
LOWldm/models/diffusion/plms.py173CODE
LOWldm/models/diffusion/ddpm.py46CODE
LOWldm/models/diffusion/ddpm.py426CODE
LOWldm/models/diffusion/ddpm.py1079CODE
LOWldm/models/diffusion/ddpm.py1110CODE
LOWldm/models/diffusion/ddpm.py1166CODE
LOWldm/models/diffusion/ddpm.py1217CODE
LOWldm/models/diffusion/ddpm.py1251CODE
LOWldm/models/diffusion/dpm_solver/dpm_solver.py177CODE
LOWldm/models/diffusion/dpm_solver/dpm_solver.py965CODE
LOWldm/models/diffusion/dpm_solver/sampler.py22CODE
LOWldm/modules/x_transformer.py216CODE
LOWldm/modules/x_transformer.py371CODE
LOWldm/modules/losses/vqperceptual.py44CODE
LOWldm/modules/losses/contperceptual.py8CODE
LOWldm/modules/diffusionmodules/openaimodel.py443CODE
LOWldm/modules/diffusionmodules/openaimodel.py751CODE
Hyper-Verbose Identifiers21 hits · 20 pts
SeverityFileLineSnippetContext
LOWnotebook_helpers.py208def make_convolutional_sample(batch, model, mode="vanilla", custom_steps=None, eta=1.0, swap_mode=False, masked=False,CODE
LOWmain.py257 def on_pretrain_routine_start(self, trainer, pl_module):CODE
LOWscripts/sample_diffusion.py79def make_convolutional_sample(model, batch_size, vanilla=False, custom_steps=None, eta=1.0,):CODE
LOWldm/util.py96def _do_parallel_data_prefetch(func, Q, data, idx, idx_to_fn=False):CODE
LOWldm/models/diffusion/ddpm.py530 def _get_denoise_row_from_list(self, samples, desc='', force_no_decoder_quantization=False):CODE
LOWldm/models/diffusion/ddpm.py766 def differentiable_decode_first_stage(self, z, predict_cids=False, force_not_quantize=False):CODE
LOWldm/models/diffusion/dpm_solver/dpm_solver.py439 def get_orders_and_timesteps_for_singlestep_solver(self, steps, order, skip_type, t_T, t_0, device):CODE
LOWldm/models/diffusion/dpm_solver/dpm_solver.py551 def singlestep_dpm_solver_second_update(self, x, s, t, r1=0.5, model_s=None, return_intermediate=False, solver_type=CODE
LOWldm/models/diffusion/dpm_solver/dpm_solver.py633 def singlestep_dpm_solver_third_update(self, x, s, t, r1=1./3., r2=2./3., model_s=None, model_s1=None, return_intermCODE
LOWldm/models/diffusion/dpm_solver/dpm_solver.py755 def multistep_dpm_solver_second_update(self, x, model_prev_list, t_prev_list, t, solver_type="dpm_solver"):CODE
LOWldm/models/diffusion/dpm_solver/dpm_solver.py812 def multistep_dpm_solver_third_update(self, x, model_prev_list, t_prev_list, t, solver_type='dpm_solver'):CODE
LOWldm/models/diffusion/dpm_solver/dpm_solver.py859 def singlestep_dpm_solver_update(self, x, s, t, order, return_intermediate=False, solver_type='dpm_solver', r1=None,CODE
LOWldm/models/diffusion/dpm_solver/dpm_solver.py885 def multistep_dpm_solver_update(self, x, model_prev_list, t_prev_list, t, order, solver_type='dpm_solver'):CODE
LOWldm/modules/losses/vqperceptual.py11def hinge_d_loss_with_exemplar_weights(logits_real, logits_fake, weights):CODE
LOWldm/modules/losses/vqperceptual.py85 def calculate_adaptive_weight(self, nll_loss, g_loss, last_layer=None):CODE
LOWldm/modules/losses/contperceptual.py32 def calculate_adaptive_weight(self, nll_loss, g_loss, last_layer=None):CODE
LOWldm/modules/image_degradation/bsrgan.py530def degradation_bsrgan_variant(image, sf=4, isp_model=None):CODE
LOWldm/modules/image_degradation/utils_image.py708def calculate_weights_indices(in_length, out_length, scale, kernel, kernel_width, antialiasing):CODE
LOWldm/modules/image_degradation/bsrgan_light.py534def degradation_bsrgan_variant(image, sf=4, isp_model=None):CODE
LOWldm/modules/diffusionmodules/util.py63def make_ddim_sampling_parameters(alphacums, ddim_timesteps, eta, verbose=True):CODE
LOWldm/data/imagenet.py80 def _prepare_human_to_integer_label(self):CODE
Empty Error Handlers3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHnotebook_helpers.py264except:CODE
HIGHmain.py414except AttributeError:CODE
HIGHmain.py285except FileNotFoundError:CODE
Excessive Try-Catch Wrapping5 hits · 6 pts
SeverityFileLineSnippetContext
LOWmain.py720 except Exception:CODE
LOWmain.py725 except Exception:CODE
LOWscripts/txt2img.py84 except Exception:CODE
MEDIUMscripts/txt2img.py77def load_replacement(x):CODE
LOWldm/util.py180 except Exception as e:CODE
Over-Commented Block3 hits · 3 pts
SeverityFileLineSnippetContext
LOWmain.py421 # `--key value` arguments are interpreted as arguments to the trainer.COMMENT
LOWmain.py441 # params:COMMENT
LOWldm/modules/image_degradation/bsrgan_light.py361# img += np.random.normal(0, noise_level / 255.0, img.shape).astype(np.float32)COMMENT
AI Slop Vocabulary1 hit · 1 pts
SeverityFileLineSnippetContext
LOWldm/modules/encoders/modules.py9from ldm.modules.x_transformer import Encoder, TransformerWrapper # TODO: can we directly rely on lucidrains code and sCODE