GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration.
This report summarizes scanner evidence for TencentARC/GFPGAN, a Python project with 37,738 GitHub stars. SynthScan examined 6,526 lines of code across 47 source files, recording 54 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 13.8 (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.
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.
Can maintainers explain intent, assumptions, and trade-offs? 35 finding(s).
Are imports declared and package/API names verified? 7 finding(s).
Are wrappers, guards, and repeated structures necessary? 37 finding(s).
Which changes need focused human review? 54 finding(s).
Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.
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 54 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 |
|---|---|---|---|---|
| HIGH | gfpgan/archs/stylegan2_bilinear_arch.py | 0 | forward function for stylegan2generatorbilinearsft. args: styles (list[tensor]): sample codes of styles. conditions (lis | STRING |
| HIGH | gfpgan/archs/stylegan2_clean_arch.py | 0 | forward function for stylegan2generatorbilinearsft. args: styles (list[tensor]): sample codes of styles. conditions (lis | STRING |
| HIGH | gfpgan/archs/gfpganv1_arch.py | 0 | forward function for stylegan2generatorbilinearsft. args: styles (list[tensor]): sample codes of styles. conditions (lis | STRING |
| HIGH | gfpgan/archs/gfpganv1_clean_arch.py | 0 | forward function for stylegan2generatorbilinearsft. args: styles (list[tensor]): sample codes of styles. conditions (lis | STRING |
| HIGH | gfpgan/archs/gfpgan_bilinear_arch.py | 0 | forward function for stylegan2generatorbilinearsft. args: styles (list[tensor]): sample codes of styles. conditions (lis | STRING |
| HIGH | gfpgan/archs/gfpganv1_arch.py | 0 | forward function for gfpganbilinear. args: x (tensor): input images. return_latents (bool): whether to return style late | STRING |
| HIGH | gfpgan/archs/gfpganv1_clean_arch.py | 0 | forward function for gfpganbilinear. args: x (tensor): input images. return_latents (bool): whether to return style late | STRING |
| HIGH | gfpgan/archs/gfpgan_bilinear_arch.py | 0 | forward function for gfpganbilinear. args: x (tensor): input images. return_latents (bool): whether to return style late | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 32 | CODE | |
| LOW | gfpgan/archs/stylegan2_bilinear_arch.py | 153 | CODE | |
| LOW | gfpgan/archs/stylegan2_bilinear_arch.py | 205 | CODE | |
| LOW | gfpgan/archs/stylegan2_bilinear_arch.py | 270 | CODE | |
| LOW | gfpgan/archs/stylegan2_bilinear_arch.py | 520 | CODE | |
| LOW | gfpgan/archs/stylegan2_bilinear_arch.py | 613 | CODE | |
| LOW | gfpgan/archs/arcface_arch.py | 53 | CODE | |
| LOW | gfpgan/archs/arcface_arch.py | 100 | CODE | |
| LOW | gfpgan/archs/arcface_arch.py | 146 | CODE | |
| LOW | gfpgan/archs/stylegan2_clean_arch.py | 99 | CODE | |
| LOW | gfpgan/archs/stylegan2_clean_arch.py | 138 | CODE | |
| LOW | gfpgan/archs/stylegan2_clean_arch.py | 191 | CODE | |
| LOW | gfpgan/archs/gfpganv1_arch.py | 217 | CODE | |
| LOW | gfpgan/archs/gfpganv1_arch.py | 243 | CODE | |
| LOW | gfpgan/archs/restoreformer_arch.py | 260 | CODE | |
| LOW | gfpgan/archs/restoreformer_arch.py | 364 | CODE | |
| LOW | gfpgan/archs/restoreformer_arch.py | 469 | CODE | |
| LOW | gfpgan/archs/restoreformer_arch.py | 575 | CODE | |
| LOW | gfpgan/archs/gfpganv1_clean_arch.py | 149 | CODE | |
| LOW | gfpgan/archs/gfpganv1_clean_arch.py | 174 | CODE | |
| LOW | gfpgan/archs/gfpgan_bilinear_arch.py | 156 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | cog_predict.py | 152 | CODE | |
| LOW | cog_predict.py | 66 | CODE | |
| LOW | inference_gfpgan.py | 12 | CODE | |
| LOW | gfpgan/utils.py | 32 | CODE | |
| LOW | gfpgan/models/gfpgan_model.py | 489 | CODE | |
| LOW | gfpgan/archs/arcface_arch.py | 183 | CODE | |
| LOW | scripts/convert_gfpganv_to_clean.py | 8 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gfpgan/__init__.py | 2 | CODE | |
| LOW | gfpgan/__init__.py | 3 | CODE | |
| LOW | gfpgan/__init__.py | 4 | CODE | |
| LOW | gfpgan/__init__.py | 5 | CODE | |
| LOW | gfpgan/train.py | 5 | CODE | |
| LOW | gfpgan/train.py | 6 | CODE | |
| LOW | gfpgan/train.py | 7 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | cog_predict.py | 2 | # This file is used for deploying replicate models | COMMENT |
| MEDIUM | cog.yaml | 1 | # This file is used for constructing replicate env | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | cog_predict.py | 23 | except Exception: | CODE |
| LOW | cog_predict.py | 136 | except Exception as error: | CODE |
| LOW | cog_predict.py | 145 | except Exception as error: | CODE |
| LOW | cog_predict.py | 160 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_gfpgan_arch.py | 101 | def test_facialcomponentdiscriminator(): | CODE |
| LOW | tests/test_ffhq_degradation_dataset.py | 7 | def test_ffhq_degradation_dataset(): | CODE |
| LOW | gfpgan/models/gfpgan_model.py | 554 | def _log_validation_metric_values(self, current_iter, dataset_name, tb_logger): | CODE |
| LOW | gfpgan/data/ffhq_degradation_dataset.py | 120 | def get_component_coordinates(self, index, status): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | gfpgan/archs/restoreformer_arch.py | 61 | # min_encodings shape: torch.Size([2048, 512]) | COMMENT |