Public report of RVC-Boss/GPT-SoVITS, published 14 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 14 November 2026, 00:41 UTC · Survey ID cd_daad6f7db7d145a88fba36660a8ef825
RVC-Boss/GPT-SoVITS
Measured 14 November 2026, 00:41 UTC, at code version 6d51ffc
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
Down 4 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A medium codebase: 42,323 lines of product code in 3 projects, tests not counted · Estimated rebuild effort: about 0.3 person-years · Weakest lens: Production Readiness, 22
Findings by how serious they are
47 critical573 serious103 minor
15 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 00:41 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
50of 50 dimensions measured by tools.
704of 723 findings point to an exact file and line, so you can open each one in the code. The other 19 concern the repository as a whole, such as missing documentation.
50dimensions across 6 lenses, read from 42,323 lines of product code in 3 projects.
RVC-Boss/GPT-SoVITS falls short of our standard for production, in part because we found no automated security scanning of the code, its secrets or its dependencies. It scores 32 out of 100 and is rated Weak, and 38 of its 47 critical findings are security problems.
Production Readiness, at 22, is the weakest lens and counts most in the score. The best first step for the work it takes is recording design decisions, worth about 6 points. Adding access checks comes next, worth about 7 points. Raising Production Readiness to 70 would lift the score to about 41.
Fourteen pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Ten places in the code run text as code, which an attacker could use, and six pipeline steps run downloads nobody checks. Pinning each tool to an exact version, replacing text run as code with direct calls and checking each download against a checksum would close these risks. Limiting each secret to its own step would fix the four secrets exposed to more of the pipeline than needed, and fixing the weaknesses the scanner points to would deal with the two security weaknesses in the code. The six parts of the code nobody has worked on for a long time need someone to learn and document them before anyone changes them.
The product code is 42,323 lines, about €37,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Production Readiness rose from 22 to 70, the lowest score rated Strong, the score would rise from 32 to about 41.
Code composition: what the lines of code are
Product code 98%Tests 2%
New since the last survey: 129 findings
These 129 critical or serious findings weren't in the previous survey, on 25 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Code Duplication · Near-duplicate member family (4 members, 35 shared lines) GPT_SoVITS/module/data_utils.py
Code Duplication · Near-duplicate member pair (80 shared lines) GPT_SoVITS/s2_train.py
Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) GPT_SoVITS/module/models.py
Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) GPT_SoVITS/module/models.py
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) GPT_SoVITS/TTS_infer_pack/TTS.py
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) GPT_SoVITS/export_torch_script_v3v4.py
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) GPT_SoVITS/module/models.py
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED
Code Duplication · Edited copy of a member (64 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (70 corresponding lines) GPT_SoVITS/export_torch_script.py
Code Duplication · Edited copy of a member (85 corresponding lines) GPT_SoVITS/AR/modules/activation.py
Code Duplication · Edited copy of a member (63 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (51 corresponding lines) GPT_SoVITS/AR/models/t2s_model.py
Code Duplication · Edited copy of a member (40 corresponding lines) GPT_SoVITS/AR/models/t2s_model.py
Code Duplication · Edited copy of a member (50 corresponding lines) GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py
Code Duplication · Edited copy of a member (26 corresponding lines) GPT_SoVITS/module/models.py
Code Duplication · Edited copy of a member (45 corresponding lines) GPT_SoVITS/Accel/PyTorch/AR/export.py
Code Duplication · Edited copy of a member (26 corresponding lines) GPT_SoVITS/module/attentions.py
Code Duplication · Edited copies of one member (4 members, 31+ corresponding lines) GPT_SoVITS/AR/models/t2s_model.py
Code Duplication · Edited copy of a member (17 corresponding lines) GPT_SoVITS/module/models.py
Code Duplication · Edited copy of a member (46 corresponding lines) GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py
Code Duplication · Edited copy of a member (40 corresponding lines) GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py
Code Duplication · Edited copy of a member (23 corresponding lines) GPT_SoVITS/AR/models/t2s_model_onnx.py
Code Duplication · Edited copy of a member (34 corresponding lines) GPT_SoVITS/module/mel_processing.py
Code Duplication · Edited copy of a member (43 corresponding lines) GPT_SoVITS/export_torch_script_v3v4.py
Code Duplication · Edited copy of a member (42 corresponding lines) GPT_SoVITS/module/attentions.py
Code Duplication · Edited copy of a member (22 corresponding lines) GPT_SoVITS/text/tone_sandhi.py
Code Duplication · Edited copy of a member (23 corresponding lines) GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py
Code Duplication · Edited copy of a member (44 corresponding lines) GPT_SoVITS/module/models.py
Code Duplication · Edited copy of a member (38 corresponding lines) GPT_SoVITS/export_torch_script_v3v4.py
Code Duplication · Edited copies of one member (3 members, 21+ corresponding lines) GPT_SoVITS/Accel/MLX/AR/backends/mlx_varlen.py
Code Duplication · Edited copy of a member (38 corresponding lines) GPT_SoVITS/AR/models/t2s_lightning_module.py
Code Duplication · Edited copy of a member (20 corresponding lines) GPT_SoVITS/module/attentions.py
Code Duplication · Edited copy of a member (22 corresponding lines) GPT_SoVITS/utils.py
Code Duplication · Edited copy of a member (30 corresponding lines) GPT_SoVITS/Accel/MLX/G2PW/model.py
Code Duplication · Edited copy of a member (24 corresponding lines) GPT_SoVITS/Accel/MLX/AR/runner_mlx.py
Code Duplication · Edited copy of a member (17 corresponding lines) GPT_SoVITS/Accel/PyTorch/AR/export.py
Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) GPT_SoVITS/Accel/MLX/AR/backends/mlx_static.py
Code Duplication · Edited copy of a member (18 corresponding lines) GPT_SoVITS/AR/models/t2s_model_onnx.py
Code Duplication · Edited copy of a member (13 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (19 corresponding lines) GPT_SoVITS/module/models.py
Code Duplication · Edited copy of a member (19 corresponding lines) GPT_SoVITS/Accel/PyTorch/AR/backends/flash_attn_varlen_cuda_graph.py
Code Duplication · Edited copy of a member (22 corresponding lines) GPT_SoVITS/module/attentions.py
Code Duplication · Edited copy of a member (27 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (15 corresponding lines) GPT_SoVITS/AR/modules/scaling.py
Code Duplication · Edited copy of a member (11 corresponding lines) GPT_SoVITS/export_torch_script.py
Code Duplication · Edited copy of a member (10 corresponding lines) GPT_SoVITS/module/commons.py
Code Duplication · Edited copy of a member (20 corresponding lines) GPT_SoVITS/AR/models/t2s_lightning_module.py
Code Duplication · Edited copy of a member (24 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (11 corresponding lines) GPT_SoVITS/Accel/MLX/G2PW/model.py
Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) GPT_SoVITS/TTS_infer_pack/TTS.py
Code Duplication · Edited copy of a member (11 corresponding lines) GPT_SoVITS/Accel/MLX/AR/runner_mlx.py
Code Duplication · Edited copy of a member (10 corresponding lines) GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py
Code Duplication · Edited copy of a member (16 corresponding lines) GPT_SoVITS/Accel/MLX/AR/sample_funcs_mlx.py
Code Duplication · Edited copy of a member (22 corresponding lines) GPT_SoVITS/module/attentions.py
Code Duplication · Edited copy of a member (10 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (17 corresponding lines) GPT_SoVITS/module/attentions.py
Code Duplication · Edited copy of a member (8 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (7 corresponding lines) GPT_SoVITS/AR/modules/embedding.py
Code Duplication · Edited copy of a member (7 corresponding lines) GPT_SoVITS/TTS_infer_pack/TTS.py
Code Duplication · Edited copy of a member (11 corresponding lines) GPT_SoVITS/module/losses.py
Code Duplication · Edited copy of a member (5 corresponding lines) GPT_SoVITS/Accel/MLX/G2PW/model.py
Code Duplication · Edited copy of a member (7 corresponding lines) GPT_SoVITS/text/tone_sandhi.py
Code Duplication · Edited copy of a member (7 corresponding lines) GPT_SoVITS/AR/models/t2s_model.py
Code Duplication · Edited copy of a member (8 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (25 corresponding lines) GPT_SoVITS/AR/models/utils.py
Code Duplication · Edited copy of a member (10 corresponding lines) GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py
Code Duplication · Edited copy of a member (11 corresponding lines) GPT_SoVITS/module/models.py
Code Duplication · Edited copy of a member (10 corresponding lines) GPT_SoVITS/Accel/MLX/AR/backends/mlx_static.py
Code Duplication · Edited copy of a member (6 corresponding lines) GPT_SoVITS/TTS_infer_pack/TTS.py
Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) GPT_SoVITS/module/models.py
Code Duplication · Edited copy of a member (7 corresponding lines) GPT_SoVITS/text/g2pw/dataset.py
Code Duplication · Edited copies of one member (5 members, 13+ corresponding lines) REDACTED
Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) GPT_SoVITS/export_torch_script_v3v4.py
Code Duplication · Edited copy of a member (9 corresponding lines) GPT_SoVITS/module/attentions.py
Code Duplication · Edited copy of a member (6 corresponding lines) GPT_SoVITS/module/models.py
Code Duplication · Edited copies of one member (4 members, 6+ corresponding lines) GPT_SoVITS/Accel/PyTorch/AR/backends/flash_attn_varlen_cuda_graph.py
Code Duplication · Edited copy of a member (9 corresponding lines) GPT_SoVITS/export_torch_script.py
Code Duplication · Edited copy of a member (4 corresponding lines) GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py
Code Duplication · Edited copy of a member (5 corresponding lines) GPT_SoVITS/f5_tts/model/modules.py
Code Duplication · Edited copy of a member (10 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (27 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (3 corresponding lines) GPT_SoVITS/Accel/PyTorch/AR/export.py
Code Duplication · Edited copy of a member (8 corresponding lines) GPT_SoVITS/module/attentions.py
Code Duplication · Edited copy of a member (4 corresponding lines) GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py
Code Duplication · Edited copy of a member (3 corresponding lines) GPT_SoVITS/AR/models/t2s_model.py
Code Duplication · Edited copy of a member (4 corresponding lines) GPT_SoVITS/text/chinese.py
Code Duplication · Edited copy of a member (3 corresponding lines) GPT_SoVITS/module/attentions_onnx.py
Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) GPT_SoVITS/Accel/MLX/AR/backends/mlx_static.py
Code Duplication · Edited copy of a member (4 corresponding lines) GPT_SoVITS/AR/models/utils.py
Code Duplication · Edited copy of a member (4 corresponding lines) GPT_SoVITS/Accel/PyTorch/AR/backends/flash_attn_varlen_cuda_graph.py
Code Duplication · Edited copies of one member (5 members, 4+ corresponding lines) GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py
Code Duplication · Edited copy of a member (4 corresponding lines) GPT_SoVITS/AR/modules/embedding.py
Code Duplication · Edited copy of a member (3 corresponding lines) GPT_SoVITS/Accel/MLX/AR/backends/mlx_static.py
Code Duplication · Edited copy of a member (3 corresponding lines) GPT_SoVITS/module/models.py
Code Duplication · Edited copy of a member (3 corresponding lines) GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py
Code Duplication · Edited copy of a member (3 corresponding lines) GPT_SoVITS/AR/models/t2s_model.py
Code Duplication · Edited copy of a member (7 corresponding lines) GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py
Code Duplication · Edited copy of a member (4 corresponding lines) GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py
Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 65 findings
These 65 critical or serious findings were in the previous survey, on 25 October 2026, and are gone from this one.
€12,000 to €61,000, for 204 to 647 hours of work, about 0.3 person-years for one engineer
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 32. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Medium: 42,323 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED.
Raises the score by about 6 points · Low effort · ADR Quality
2
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
Raises the score by about 7 points · Medium effort · Access Controls
3
Resolve the 1 Banned license finding(s) in License Compliance.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €37,000 to build again, about 0.3 person-years of work. Its weakest lens is Production Readiness, at 22 (Critical). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 6 points for low effort, because it clears the 1 ADR Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 4.8 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 8% to 18% on every change. The history of the code shows how much it changes: about 12,331 lines over the last 90 days, which is about 50,009 lines a year. At that pace, the extra work comes to an estimated 10 to 60.2 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
135 modules, with 43 dependencies between them. 2 loops run through 5 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 95 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
GPT_SoVITS.Accel.MLX.G2PW uses GPT_SoVITS.Accel.MLX.G2PW.model, so a change to GPT_SoVITS.Accel.MLX.G2PW.model can break GPT_SoVITS.Accel.MLX.G2PW, while a change to GPT_SoVITS.Accel.MLX.G2PW can't break GPT_SoVITS.Accel.MLX.G2PW.model.
Position
Below the diagonal: GPT_SoVITS.Accel.MLX.G2PW uses a module listed above it, which is the healthy direction.
GPT_SoVITS.Accel.PyTorch.AR.quantization uses GPT_SoVITS.Accel.PyTorch.nn, so a change to GPT_SoVITS.Accel.PyTorch.nn can break GPT_SoVITS.Accel.PyTorch.AR.quantization, while a change to GPT_SoVITS.Accel.PyTorch.AR.quantization can't break GPT_SoVITS.Accel.PyTorch.nn.
Position
Below the diagonal: GPT_SoVITS.Accel.PyTorch.AR.quantization uses a module listed above it, which is the healthy direction.
15→22 GPT_SoVITS.Accel.PyTorch.AR.runner uses GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abcpart of a loop✕
Connections
1 pair of types, where a type in GPT_SoVITS.Accel.PyTorch.AR.runner uses a type in GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc.
GPT_SoVITS.Accel.PyTorch.AR.runner uses GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc, so a change to GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc can break GPT_SoVITS.Accel.PyTorch.AR.runner, while a change to GPT_SoVITS.Accel.PyTorch.AR.runner can't break GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
15→32 GPT_SoVITS.Accel.PyTorch.AR.runner uses GPT_SoVITS.Accel.PyTorch.AR.structspart of a loop✕
Connections
2 pairs of types, where a type in GPT_SoVITS.Accel.PyTorch.AR.runner uses a type in GPT_SoVITS.Accel.PyTorch.AR.structs.
GPT_SoVITS.Accel.PyTorch.AR.runner uses GPT_SoVITS.Accel.PyTorch.AR.structs, so a change to GPT_SoVITS.Accel.PyTorch.AR.structs can break GPT_SoVITS.Accel.PyTorch.AR.runner, while a change to GPT_SoVITS.Accel.PyTorch.AR.runner can't break GPT_SoVITS.Accel.PyTorch.AR.structs.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
GPT_SoVITS.Accel.PyTorch.G2PW.model uses GPT_SoVITS.Accel.PyTorch.nn, so a change to GPT_SoVITS.Accel.PyTorch.nn can break GPT_SoVITS.Accel.PyTorch.G2PW.model, while a change to GPT_SoVITS.Accel.PyTorch.G2PW.model can't break GPT_SoVITS.Accel.PyTorch.nn.
Position
Below the diagonal: GPT_SoVITS.Accel.PyTorch.G2PW.model uses a module listed above it, which is the healthy direction.
GPT_SoVITS.BigVGAN uses GPT_SoVITS.BigVGAN.env, so a change to GPT_SoVITS.BigVGAN.env can break GPT_SoVITS.BigVGAN, while a change to GPT_SoVITS.BigVGAN can't break GPT_SoVITS.BigVGAN.env.
Position
Below the diagonal: GPT_SoVITS.BigVGAN uses a module listed above it, which is the healthy direction.
GPT_SoVITS.BigVGAN.bigvgan uses GPT_SoVITS.BigVGAN.env, so a change to GPT_SoVITS.BigVGAN.env can break GPT_SoVITS.BigVGAN.bigvgan, while a change to GPT_SoVITS.BigVGAN.bigvgan can't break GPT_SoVITS.BigVGAN.env.
Position
Below the diagonal: GPT_SoVITS.BigVGAN.bigvgan uses a module listed above it, which is the healthy direction.
GPT_SoVITS.export_torch_script uses GPT_SoVITS.AR.models.t2s_lightning_module, so a change to GPT_SoVITS.AR.models.t2s_lightning_module can break GPT_SoVITS.export_torch_script, while a change to GPT_SoVITS.export_torch_script can't break GPT_SoVITS.AR.models.t2s_lightning_module.
Position
Below the diagonal: GPT_SoVITS.export_torch_script uses a module listed above it, which is the healthy direction.
GPT_SoVITS.export_torch_script uses GPT_SoVITS.sv, so a change to GPT_SoVITS.sv can break GPT_SoVITS.export_torch_script, while a change to GPT_SoVITS.export_torch_script can't break GPT_SoVITS.sv.
Position
Below the diagonal: GPT_SoVITS.export_torch_script uses a module listed above it, which is the healthy direction.
GPT_SoVITS.module uses GPT_SoVITS.module.cache_dit, so a change to GPT_SoVITS.module.cache_dit can break GPT_SoVITS.module, while a change to GPT_SoVITS.module can't break GPT_SoVITS.module.cache_dit.
Position
Below the diagonal: GPT_SoVITS.module uses a module listed above it, which is the healthy direction.
GPT_SoVITS.module.models uses GPT_SoVITS.module.cache_dit, so a change to GPT_SoVITS.module.cache_dit can break GPT_SoVITS.module.models, while a change to GPT_SoVITS.module.models can't break GPT_SoVITS.module.cache_dit.
Position
Below the diagonal: GPT_SoVITS.module.models uses a module listed above it, which is the healthy direction.
GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc uses GPT_SoVITS.Accel.PyTorch.nn, so a change to GPT_SoVITS.Accel.PyTorch.nn can break GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc, while a change to GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc can't break GPT_SoVITS.Accel.PyTorch.nn.
Position
Below the diagonal: GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc uses a module listed above it, which is the healthy direction.
GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc uses GPT_SoVITS.Accel.PyTorch.AR.runner, so a change to GPT_SoVITS.Accel.PyTorch.AR.runner can break GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc, while a change to GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc can't break GPT_SoVITS.Accel.PyTorch.AR.runner.
Position
Below the diagonal: GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc uses a module listed above it, which is the healthy direction.
22→32 GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc uses GPT_SoVITS.Accel.PyTorch.AR.structspart of a loop✕
Connections
3 pairs of types, where a type in GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc uses a type in GPT_SoVITS.Accel.PyTorch.AR.structs.
GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc uses GPT_SoVITS.Accel.PyTorch.AR.structs, so a change to GPT_SoVITS.Accel.PyTorch.AR.structs can break GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc, while a change to GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc can't break GPT_SoVITS.Accel.PyTorch.AR.structs.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
GPT_SoVITS.Accel.PyTorch.G2PW uses GPT_SoVITS.Accel.PyTorch.G2PW.model, so a change to GPT_SoVITS.Accel.PyTorch.G2PW.model can break GPT_SoVITS.Accel.PyTorch.G2PW, while a change to GPT_SoVITS.Accel.PyTorch.G2PW can't break GPT_SoVITS.Accel.PyTorch.G2PW.model.
Position
Below the diagonal: GPT_SoVITS.Accel.PyTorch.G2PW uses a module listed above it, which is the healthy direction.
GPT_SoVITS.export_torch_script_v3v4 uses GPT_SoVITS.f5_tts.model.backbones.dit, so a change to GPT_SoVITS.f5_tts.model.backbones.dit can break GPT_SoVITS.export_torch_script_v3v4, while a change to GPT_SoVITS.export_torch_script_v3v4 can't break GPT_SoVITS.f5_tts.model.backbones.dit.
Position
Below the diagonal: GPT_SoVITS.export_torch_script_v3v4 uses a module listed above it, which is the healthy direction.
GPT_SoVITS.export_torch_script_v3v4 uses GPT_SoVITS.module.models_onnx, so a change to GPT_SoVITS.module.models_onnx can break GPT_SoVITS.export_torch_script_v3v4, while a change to GPT_SoVITS.export_torch_script_v3v4 can't break GPT_SoVITS.module.models_onnx.
Position
Below the diagonal: GPT_SoVITS.export_torch_script_v3v4 uses a module listed above it, which is the healthy direction.
GPT_SoVITS.export_torch_script_v3v4 uses GPT_SoVITS.export_torch_script, so a change to GPT_SoVITS.export_torch_script can break GPT_SoVITS.export_torch_script_v3v4, while a change to GPT_SoVITS.export_torch_script_v3v4 can't break GPT_SoVITS.export_torch_script.
Position
Below the diagonal: GPT_SoVITS.export_torch_script_v3v4 uses a module listed above it, which is the healthy direction.
GPT_SoVITS.module.models_v5 uses GPT_SoVITS.module.models, so a change to GPT_SoVITS.module.models can break GPT_SoVITS.module.models_v5, while a change to GPT_SoVITS.module.models_v5 can't break GPT_SoVITS.module.models.
Position
Below the diagonal: GPT_SoVITS.module.models_v5 uses a module listed above it, which is the healthy direction.
GPT_SoVITS.stream_v2pro uses GPT_SoVITS.export_torch_script, so a change to GPT_SoVITS.export_torch_script can break GPT_SoVITS.stream_v2pro, while a change to GPT_SoVITS.stream_v2pro can't break GPT_SoVITS.export_torch_script.
Position
Below the diagonal: GPT_SoVITS.stream_v2pro uses a module listed above it, which is the healthy direction.
GPT_SoVITS uses GPT_SoVITS.AR.models.t2s_lightning_module, so a change to GPT_SoVITS.AR.models.t2s_lightning_module can break GPT_SoVITS, while a change to GPT_SoVITS can't break GPT_SoVITS.AR.models.t2s_lightning_module.
Position
Below the diagonal: GPT_SoVITS uses a module listed above it, which is the healthy direction.
GPT_SoVITS uses GPT_SoVITS.export_torch_script_v3v4, so a change to GPT_SoVITS.export_torch_script_v3v4 can break GPT_SoVITS, while a change to GPT_SoVITS can't break GPT_SoVITS.export_torch_script_v3v4.
Position
Below the diagonal: GPT_SoVITS uses a module listed above it, which is the healthy direction.
4 pairs of types, where a type in GPT_SoVITS.Accel.PyTorch.AR.backends.flash_attn_varlen_cuda_graph uses a type in GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc.
GPT_SoVITS.Accel.PyTorch.AR.backends.flash_attn_varlen_cuda_graph uses GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc, so a change to GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc can break GPT_SoVITS.Accel.PyTorch.AR.backends.flash_attn_varlen_cuda_graph, while a change to GPT_SoVITS.Accel.PyTorch.AR.backends.flash_attn_varlen_cuda_graph can't break GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc.
Position
Below the diagonal: GPT_SoVITS.Accel.PyTorch.AR.backends.flash_attn_varlen_cuda_graph uses a module listed above it, which is the healthy direction.
4 pairs of types, where a type in GPT_SoVITS.Accel.PyTorch.AR.backends.torch_static_cuda_graph uses a type in GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc.
GPT_SoVITS.Accel.PyTorch.AR.backends.torch_static_cuda_graph uses GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc, so a change to GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc can break GPT_SoVITS.Accel.PyTorch.AR.backends.torch_static_cuda_graph, while a change to GPT_SoVITS.Accel.PyTorch.AR.backends.torch_static_cuda_graph can't break GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc.
Position
Below the diagonal: GPT_SoVITS.Accel.PyTorch.AR.backends.torch_static_cuda_graph uses a module listed above it, which is the healthy direction.
GPT_SoVITS.Accel.PyTorch.AR.backends.torch_varlen uses GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc, so a change to GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc can break GPT_SoVITS.Accel.PyTorch.AR.backends.torch_varlen, while a change to GPT_SoVITS.Accel.PyTorch.AR.backends.torch_varlen can't break GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc.
Position
Below the diagonal: GPT_SoVITS.Accel.PyTorch.AR.backends.torch_varlen uses a module listed above it, which is the healthy direction.
GPT_SoVITS.Accel.PyTorch.AR.export uses GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc, so a change to GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc can break GPT_SoVITS.Accel.PyTorch.AR.export, while a change to GPT_SoVITS.Accel.PyTorch.AR.export can't break GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc.
Position
Below the diagonal: GPT_SoVITS.Accel.PyTorch.AR.export uses a module listed above it, which is the healthy direction.
GPT_SoVITS.Accel.PyTorch.AR.structs uses GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc, so a change to GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc can break GPT_SoVITS.Accel.PyTorch.AR.structs, while a change to GPT_SoVITS.Accel.PyTorch.AR.structs can't break GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc.
Position
Below the diagonal: GPT_SoVITS.Accel.PyTorch.AR.structs uses a module listed above it, which is the healthy direction.
GPT_SoVITS.Accel.MLX.AR.structs_mlx uses GPT_SoVITS.Accel.PyTorch.AR.structs, so a change to GPT_SoVITS.Accel.PyTorch.AR.structs can break GPT_SoVITS.Accel.MLX.AR.structs_mlx, while a change to GPT_SoVITS.Accel.MLX.AR.structs_mlx can't break GPT_SoVITS.Accel.PyTorch.AR.structs.
Position
Below the diagonal: GPT_SoVITS.Accel.MLX.AR.structs_mlx uses a module listed above it, which is the healthy direction.
GPT_SoVITS.Accel.PyTorch.AR uses GPT_SoVITS.Accel.PyTorch.nn, so a change to GPT_SoVITS.Accel.PyTorch.nn can break GPT_SoVITS.Accel.PyTorch.AR, while a change to GPT_SoVITS.Accel.PyTorch.AR can't break GPT_SoVITS.Accel.PyTorch.nn.
Position
Below the diagonal: GPT_SoVITS.Accel.PyTorch.AR uses a module listed above it, which is the healthy direction.
GPT_SoVITS.Accel.PyTorch.AR uses GPT_SoVITS.Accel.PyTorch.AR.export, so a change to GPT_SoVITS.Accel.PyTorch.AR.export can break GPT_SoVITS.Accel.PyTorch.AR, while a change to GPT_SoVITS.Accel.PyTorch.AR can't break GPT_SoVITS.Accel.PyTorch.AR.export.
Position
Below the diagonal: GPT_SoVITS.Accel.PyTorch.AR uses a module listed above it, which is the healthy direction.
GPT_SoVITS.Accel.PyTorch.AR.t2s_engine uses GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc, so a change to GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc can break GPT_SoVITS.Accel.PyTorch.AR.t2s_engine, while a change to GPT_SoVITS.Accel.PyTorch.AR.t2s_engine can't break GPT_SoVITS.Accel.PyTorch.AR.t2s_model_abc.
Position
Below the diagonal: GPT_SoVITS.Accel.PyTorch.AR.t2s_engine uses a module listed above it, which is the healthy direction.
GPT_SoVITS.Accel.PyTorch.AR.t2s_engine uses GPT_SoVITS.Accel.PyTorch.AR.structs, so a change to GPT_SoVITS.Accel.PyTorch.AR.structs can break GPT_SoVITS.Accel.PyTorch.AR.t2s_engine, while a change to GPT_SoVITS.Accel.PyTorch.AR.t2s_engine can't break GPT_SoVITS.Accel.PyTorch.AR.structs.
Position
Below the diagonal: GPT_SoVITS.Accel.PyTorch.AR.t2s_engine uses a module listed above it, which is the healthy direction.
GPT_SoVITS.Accel.MLX.AR.runner_mlx uses GPT_SoVITS.Accel.PyTorch.AR.structs, so a change to GPT_SoVITS.Accel.PyTorch.AR.structs can break GPT_SoVITS.Accel.MLX.AR.runner_mlx, while a change to GPT_SoVITS.Accel.MLX.AR.runner_mlx can't break GPT_SoVITS.Accel.PyTorch.AR.structs.
Position
Below the diagonal: GPT_SoVITS.Accel.MLX.AR.runner_mlx uses a module listed above it, which is the healthy direction.
GPT_SoVITS.Accel.MLX.AR.runner_mlx uses GPT_SoVITS.Accel.MLX.AR.structs_mlx, so a change to GPT_SoVITS.Accel.MLX.AR.structs_mlx can break GPT_SoVITS.Accel.MLX.AR.runner_mlx, while a change to GPT_SoVITS.Accel.MLX.AR.runner_mlx can't break GPT_SoVITS.Accel.MLX.AR.structs_mlx.
Position
Below the diagonal: GPT_SoVITS.Accel.MLX.AR.runner_mlx uses a module listed above it, which is the healthy direction.
36→37 GPT_SoVITS.Accel.MLX.AR.runner_mlx uses GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlxpart of a loop✕
Connections
1 pair of types, where a type in GPT_SoVITS.Accel.MLX.AR.runner_mlx uses a type in GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx.
GPT_SoVITS.Accel.MLX.AR.runner_mlx uses GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx, so a change to GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx can break GPT_SoVITS.Accel.MLX.AR.runner_mlx, while a change to GPT_SoVITS.Accel.MLX.AR.runner_mlx can't break GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx uses GPT_SoVITS.Accel.MLX.AR.structs_mlx, so a change to GPT_SoVITS.Accel.MLX.AR.structs_mlx can break GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx, while a change to GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx can't break GPT_SoVITS.Accel.MLX.AR.structs_mlx.
Position
Below the diagonal: GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx uses a module listed above it, which is the healthy direction.
GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx uses GPT_SoVITS.Accel.MLX.AR.runner_mlx, so a change to GPT_SoVITS.Accel.MLX.AR.runner_mlx can break GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx, while a change to GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx can't break GPT_SoVITS.Accel.MLX.AR.runner_mlx.
Position
Below the diagonal: GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx uses a module listed above it, which is the healthy direction.
GPT_SoVITS.Accel.MLX.AR.backends.mlx_static uses GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx, so a change to GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx can break GPT_SoVITS.Accel.MLX.AR.backends.mlx_static, while a change to GPT_SoVITS.Accel.MLX.AR.backends.mlx_static can't break GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx.
Position
Below the diagonal: GPT_SoVITS.Accel.MLX.AR.backends.mlx_static uses a module listed above it, which is the healthy direction.
GPT_SoVITS.Accel.MLX.AR.backends.mlx_varlen uses GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx, so a change to GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx can break GPT_SoVITS.Accel.MLX.AR.backends.mlx_varlen, while a change to GPT_SoVITS.Accel.MLX.AR.backends.mlx_varlen can't break GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx.
Position
Below the diagonal: GPT_SoVITS.Accel.MLX.AR.backends.mlx_varlen uses a module listed above it, which is the healthy direction.
GPT_SoVITS.Accel.MLX.AR.t2s_engine_mlx uses GPT_SoVITS.Accel.PyTorch.AR.structs, so a change to GPT_SoVITS.Accel.PyTorch.AR.structs can break GPT_SoVITS.Accel.MLX.AR.t2s_engine_mlx, while a change to GPT_SoVITS.Accel.MLX.AR.t2s_engine_mlx can't break GPT_SoVITS.Accel.PyTorch.AR.structs.
Position
Below the diagonal: GPT_SoVITS.Accel.MLX.AR.t2s_engine_mlx uses a module listed above it, which is the healthy direction.
GPT_SoVITS.Accel.MLX.AR.t2s_engine_mlx uses GPT_SoVITS.Accel.MLX.AR.structs_mlx, so a change to GPT_SoVITS.Accel.MLX.AR.structs_mlx can break GPT_SoVITS.Accel.MLX.AR.t2s_engine_mlx, while a change to GPT_SoVITS.Accel.MLX.AR.t2s_engine_mlx can't break GPT_SoVITS.Accel.MLX.AR.structs_mlx.
Position
Below the diagonal: GPT_SoVITS.Accel.MLX.AR.t2s_engine_mlx uses a module listed above it, which is the healthy direction.
GPT_SoVITS.Accel.MLX.AR.t2s_engine_mlx uses GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx, so a change to GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx can break GPT_SoVITS.Accel.MLX.AR.t2s_engine_mlx, while a change to GPT_SoVITS.Accel.MLX.AR.t2s_engine_mlx can't break GPT_SoVITS.Accel.MLX.AR.t2s_model_abc_mlx.
Position
Below the diagonal: GPT_SoVITS.Accel.MLX.AR.t2s_engine_mlx uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 59% · Adequate · gated by D2, D4 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
62
High / Critical
A03:2025 — Software Supply Chain Failures
9
High / Critical
A02:2025 — Security Misconfiguration
6
High / Critical
Roadmap
Top priorities: Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do; Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED; Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED.
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Reconcile the README with reality: tools/AP_BWE_main/README.md links to `REDACTED`, but `tools/AP_BWE_main/REDACTED` does not exist; tools/AP_BWE_main/README.md links to `VCTK-Corpus-0.92`, but `tools/AP_BWE_main/VCTK-Corpus-0.92` does not exist; tools/AP_BWE_main/README.md links to `VCTK-Corpus-0.92/training.txt`, but `tools/AP_BWE_main/VCTK-Corpus-0.92/training.txt` does not exist; tools/AP_BWE_main/README.md links to `VCTK-Corpus-0.92/test.txt`, but `tools/AP_BWE_main/VCTK-Corpus-0.92/test.txt` does not exist; tools/AP_BWE_main/README.md links to `Figures/model.png`, but `tools/AP_BWE_main/Figures/model.png` does not exist.
Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 47
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 573
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 103
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 15
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 50 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 50 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 704 of 723 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.py) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.py) and this repository declares a Python test suite (repository root, 2 test files), but it was not re-run: its dependency install failed (pip exit 1: Failed building wheel for pyopenjtalk error: subprocess-exited-with-error), so its suite was not run against dependencies it does not declare. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. This repository's source is written only in languages whose packages are published through a manifest, and no manifest in the tree makes a publication act: either there is no package manifest of any ecosystem (no package.json, pyproject.toml, setup.py, gemspec, Cargo.toml, pom.xml, build.gradle, composer.json, pubspec.yaml or mix.exs), or every one present declares in its package manager's own terms that it is not published (an npm package marked "private": true, a Cargo package with publish = false, a pubspec with publish_to: none, a Composer "project", a Poetry project with package-mode = false, or the "Private :: Do Not Upload" classifier). With no publication act there is no intentionally-exposed surface for API consistency to be judged over.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `(repository root)` (40104 LoC, 469 module-visible types across 38 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (REDACTED). compose up failed (exit 15 — the compose project is invalid) — service "GPT-SoVITS-CU126-Lite" refers to undefined volume tools/asr/models: invalid compose project; runtime evidence skipped.
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P1 CI/CD gates — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript (Vue and Svelte components included), Java, Rust, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned REDACTED, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
+ 29 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with TTS.run (cyclomatic 110), inference_webui.get_tts_wav (cyclomatic 73). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 5.9 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 58 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 120 down to 120 or less in Cognitive Complexity — start with TTS.run (cognitive 226), inference_webui.get_tts_wav (cognitive 156), api.get_tts_wav (cognitive 135). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cognitive Complexity from 2.6 to about 3.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.6 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
12 over-large unit(s) detected — types, modules or files that carry too much.
FileTooLong: ./REDACTED · ×12REDACTED
What to do
Resolve the 12 FileTooLong finding(s) in God Classes — start with REDACTED, TTS.py, models.py. — One of this dimension's main actionable groups (12 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
271 duplicated block group(s) detected. 23.2 % of the production lines (9,820 of 42,323) are in a reported copy. A further 138 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 46 of the 409 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 157 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 27 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with attentions.py (3), export_torch_script.py (2), models.py (2). — One of this dimension's main actionable groups (27 warning-level).
Resolve the 20 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with models.py (3), model.py (2), export_torch_script.py (2). — One of this dimension's main actionable groups (20 warning-level).
Resolve the 15 Edited copy of a member (3 corresponding lines) finding(s) in Code Duplication — start with models.py (3), export.py (2), t2s_model.py (2). — One of this dimension's main actionable groups (15 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling0.0 / 10Critical✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
3 production modules (source-import), 1 dependency cycle(s), 0 unstable depended-on module(s). No manifest declares this repository's modules, so the modules are its top-level source directories and the edges the imports between them; 0 module(s) off the main sequence.
Circular dependency
What to do
Resolve the 1 Circular dependency finding(s) in Coupling. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
1 outdated, 0 yanked pinned Python distributions. 1 of 75 shipped distributions were graded against pypi.org (0 not published there, 74 declared without an exact pin, which installs the newest release the declaration admits and so cannot be behind one). Only EXACT pins are graded for currency: a floor or a range already installs the newest release it admits, so reporting one would report this repository for being current. Whether a deliberate upper cap has itself gone stale is a different and weaker question, and is not asked. Whether any distribution is UNMAINTAINED is not graded — PyPI publishes no maintenance status, and release age does not stand in for one. Lockfiles are not read (poetry.lock, uv.lock, Pipfile.lock, pdm.lock), so a lock-resolved install is outside this verdict. Known CVEs in this dependency graph are D30's question.
Outdated: onnxruntime-gpu
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
1 of 206 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 75 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (131 reached that way). Requirements it states ONLY under an extra, a PEP 735 dependency group, a Poetry dev group or a dev-named requirements file are excluded: pip does not install any of them for a consumer. ★ This repository commits no dependency lockfile that this pass reads, so each licence is the one PyPI publishes for the distribution's CURRENT release rather than for a pinned version. 27 of them publish no licence on PyPI this pass can read; that is missing data, not a violation, and none of them is charged. A further 6 direct requirement(s) are installed from a URL or a version-control checkout and publish no licence this pass can read; they are outside this verdict.
Banned license: frozendict
What to do
Resolve the 1 Banned license finding(s) in License Compliance. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d14_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 3 Hotspot finding(s) in Churn × Complexity Hotspots — start with TTS.py, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.5 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
6 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is GPT_SoVITS/module/modules.py. Counted over 117 of the 156 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
8 deducted task-comment markers across 42323 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
TodoComment · ×8REDACTED:234
What to do
Resolve the 8 TodoComment finding(s) in Explicit Debt — start with REDACTED (2), attentions.py (2), patched_mha_with_cache.py (2). — One of this dimension's main actionable groups (8 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
62 finding(s): 0 critical, 36 high, 8 medium, 18 low. 14 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 10 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (10 issue-level).
Resolve the 6 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (6). — One of this dimension's main actionable groups (6 issue-level).
No action in Static Analysis (SAST) — all 14 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (14 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 1 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 4 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (4). — One of this dimension's main actionable groups (4 warning-level).
Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
22 of 117 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is GPT_SoVITS/export_torch_script_v3v4.py. Counted over 117 of the 156 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 6 Orphaned knowledge finding(s) in Knowledge Freshness — start with export_torch_script_v3v4.py, export_torch_script.py, models_onnx.py. — One of this dimension's main actionable groups (6 issue-level).
Resolve the 16 Orphaned file finding(s) in Knowledge Freshness — start with bs_roformer.py, onnx_export.py, attentions_onnx.py. — One of this dimension's main actionable groups (16 recommendation-level).
Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 0 platform declaration(s) and 75 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
The projects (root) → GPT_SoVITS → (root) (one cycle inside a mutually-dependent group of 3 projects) form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
What to do
Break project reference cycles by extracting shared abstractions into a separate project; keep the graph a DAG.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
This repository serves requests — a request handler (@app.post() (REDACTED:1360) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected. — REDACTED:1360
What to do
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Most of the production code is in directories of its own, but 6 application file(s) sit at the repository root beside the build and tooling files (`REDACTED`, `REDACTED`, `config.py`, `test_api_v2_streaming.py`, `test_official_streaming.py` and 1 more).
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
tools/AP_BWE_main/README.md links to `REDACTED`, but `tools/AP_BWE_main/REDACTED` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — tools/AP_BWE_main/README.md:20
tools/AP_BWE_main/README.md links to `VCTK-Corpus-0.92`, but `tools/AP_BWE_main/VCTK-Corpus-0.92` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — tools/AP_BWE_main/README.md:22
tools/AP_BWE_main/README.md links to `VCTK-Corpus-0.92/training.txt`, but `tools/AP_BWE_main/VCTK-Corpus-0.92/training.txt` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — tools/AP_BWE_main/README.md:28
tools/AP_BWE_main/README.md links to `VCTK-Corpus-0.92/test.txt`, but `tools/AP_BWE_main/VCTK-Corpus-0.92/test.txt` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — tools/AP_BWE_main/README.md:28
tools/AP_BWE_main/README.md links to `Figures/model.png`, but `tools/AP_BWE_main/Figures/model.png` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — tools/AP_BWE_main/README.md:59
What to do
Reconcile the README with reality: tools/AP_BWE_main/README.md links to `REDACTED`, but `tools/AP_BWE_main/REDACTED` does not exist; tools/AP_BWE_main/README.md links to `VCTK-Corpus-0.92`, but `tools/AP_BWE_main/VCTK-Corpus-0.92` does not exist; tools/AP_BWE_main/README.md links to `VCTK-Corpus-0.92/training.txt`, but `tools/AP_BWE_main/VCTK-Corpus-0.92/training.txt` does not exist; tools/AP_BWE_main/README.md links to `VCTK-Corpus-0.92/test.txt`, but `tools/AP_BWE_main/VCTK-Corpus-0.92/test.txt` does not exist; tools/AP_BWE_main/README.md links to `Figures/model.png`, but `tools/AP_BWE_main/Figures/model.png` does not exist.
Do you agree with this assessment?
P1 · CI/CD gates8.5 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
What to do
Run the test suite in CI via an explicit runner step for your stack, and gate merges on it.
Do you agree with this assessment?
P2 · Observability7.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 2 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
What to do
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Deployment is orchestrated by compose, but no service declares a `healthcheck:` and nothing pins a previous image to fall back to — the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse.
What to do
Add a `healthcheck:` to the served compose service — probing the endpoint it already answers on where it has one — with `depends_on: condition: service_healthy` on whatever waits for it, and keep the deployed image tag immutable and recorded so rolling back is re-pointing at the previous tag rather than rebuilding.
Do you agree with this assessment?
P5 · DR & Backup0.0 / 10Critical✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced — a volume that survives a container recreate is not a tested restore from catastrophic loss.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — GPT_SoVITS/text/g2pw/onnx_api.py:82
What to do
Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back. Also whether a `finally` that gives the primitive back unconditionally can run in a state where the method does not hold it: after a timed wait whose result was discarded, after an acquire inside the `try` that can fail, after the body already released it, or never, because a `return` left between the acquire and the `try`.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×19) — REDACTED:213, REDACTED:225, REDACTED:236, …
`except` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — REDACTED:149, REDACTED:160
`except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — GPT_SoVITS/s1_train.py:144, GPT_SoVITS/AR/utils/__init__.py:34
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
`info` at line 437 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:437
`info` at line 1139 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:1139
`info` at line 1140 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:1140
`info` at line 1141 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:1141
`info` at line 1142 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:1142
`warning` at line 1292 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:1292
`warning` at line 1295 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:1295
`info` at line 1302 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:1302
`info` at line 1303 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:1303
`info` at line 1304 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:1304
`info` at line 1314 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:1314
`info` at line 1330 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:1330
`info` at line 607 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — GPT_SoVITS/export_torch_script_v3v4.py:607
`info` at line 617 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — GPT_SoVITS/export_torch_script_v3v4.py:617
`info` at line 633 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — GPT_SoVITS/export_torch_script_v3v4.py:633
`info` at line 258 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — GPT_SoVITS/utils.py:258
`info` at line 339 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — GPT_SoVITS/AR/modules/optim.py:339
`warning` at line 357 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — GPT_SoVITS/AR/modules/optim.py:357
`info` at line 417 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — GPT_SoVITS/AR/modules/optim.py:417
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 29 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P6 Release Hygiene — not evidenced — no changelog, version stamp or semver release tag in the repo
Not included — 63 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not applicable: this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads.
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — compose up failed (exit 15 — the compose project is invalid) — service "GPT-SoVITS-CU126-Lite" refers to undefined volume tools/asr/models: invalid compose project; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or MongoEngine model, a migration or a SQL schema — and no database or data-store client (Django ORM, SQLAlchemy, psycopg, PyMongo, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential on a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or mongoengine model, in a migration or in a SQL schema — and no database or data-store client (django.db, sqlalchemy, psycopg2, pymongo, sqlite3, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential on a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or mongoengine model, in a migration or in a SQL schema — and no database or data-store client (django.db, sqlalchemy, psycopg2, pymongo, sqlite3, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D10 Test Quality — ~959 lines of test source are present (.py) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included — the .py suite was found but not re-run
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D19 Documentation Quality — No runnable or published unit to look for an example in, and no multi-project root README to look for a map in; the other documentation kinds are withheld (see the gaps), so documentation quality is not applicable here.
D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 20 candidate(s) found and not reported.
D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .py, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D27 Navigability — symbol resolution incomplete — navigability not assessed
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (4 value object(s))
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for a pytest-benchmark or pytest-codspeed dependency with tests taking the `benchmark` fixture, an asv.conf.json with its `time_`/`mem_`/`peakmem_` benchmarks, or a pyperf Runner, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X2 Cancellation propagation — no C# was loaded; this repository's Python was read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Orphaned knowledge GPT_SoVITS/export_torch_script_v3v4.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge GPT_SoVITS/export_torch_script.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge GPT_SoVITS/module/models_onnx.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge GPT_SoVITS/module/attentions.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge GPT_SoVITS/stream_v2pro.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
Orphaned knowledge tools/uvr5/bs_roformer/mel_band_roformer.py:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Project dependency cycle — The projects (root) → GPT_SoVITS → (root) (one cycle inside a mutually-dependent group of 3 projects) form a reference cycle. Cyclic dependencies prevent independent build/test/deploy, blur ownership, and tend to grow into a big ball of mud. Break the cycle by extracting the shared types into a separate project both can reference.
Banned license: frozendict — `frozendict` 2.5.1 is published on PyPI under `LGPL-3.0-only`, which this policy bans, and it is in the SHIPPED closure of this repository — so it is installed by everything that depends on this repository, not just by its test environment. A distribution offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package, or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
Duplicated block (8 lines × 2) GPT_SoVITS/AR/models/t2s_model.py:262— GPT_SoVITS/AR/models/t2s_model.py:262-269 | GPT_SoVITS/AR/models/t2s_model_onnx.py:251-258 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:408— GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:408-415 | GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py:470-477 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py` and `GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) GPT_SoVITS/export_torch_script.py:354— GPT_SoVITS/export_torch_script.py:354-361 | GPT_SoVITS/onnx_export.py:202-209 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) GPT_SoVITS/export_torch_script.py:606— GPT_SoVITS/export_torch_script.py:606-613 | GPT_SoVITS/export_torch_script.py:970-977 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) GPT_SoVITS/export_torch_script_v3v4.py:843— GPT_SoVITS/export_torch_script_v3v4.py:843-850 | REDACTED:1038-1045 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) GPT_SoVITS/module/attentions.py:77— GPT_SoVITS/module/attentions.py:77-84 | GPT_SoVITS/module/attentions.py:159-166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) GPT_SoVITS/module/attentions.py:326— GPT_SoVITS/module/attentions.py:326-333 | GPT_SoVITS/module/attentions_onnx.py:289-296 — before extracting anything, compare `GPT_SoVITS/module/attentions.py` and `GPT_SoVITS/module/attentions_onnx.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) GPT_SoVITS/module/attentions.py:367— GPT_SoVITS/module/attentions.py:367-374 | GPT_SoVITS/module/attentions_onnx.py:331-338 — before extracting anything, compare `GPT_SoVITS/module/attentions.py` and `GPT_SoVITS/module/attentions_onnx.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `GPT_SoVITS/module/attentions_onnx.py:340` calls `padding`, `_same_padding` and `GPT_SoVITS/module/attentions.py:376` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) GPT_SoVITS/module/data_utils.py:137— GPT_SoVITS/module/data_utils.py:137-144 | GPT_SoVITS/module/data_utils.py:635-642 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `GPT_SoVITS/module/data_utils.py:643` calls `spectrogram_torch`, `spec_to_mel_torch`, `norm_spec` and `GPT_SoVITS/module/data_utils.py:145` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) GPT_SoVITS/module/models.py:721— GPT_SoVITS/module/models.py:721-728 | GPT_SoVITS/module/models_onnx.py:657-664 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) GPT_SoVITS/module/models.py:762— GPT_SoVITS/module/models.py:762-769 | GPT_SoVITS/module/models_onnx.py:698-705 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) GPT_SoVITS/text/cleaner.py:22— GPT_SoVITS/text/cleaner.py:22-29 | GPT_SoVITS/text/cleaner.py:59-66 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) GPT_SoVITS/text/en_normalization/expend.py:118— GPT_SoVITS/text/en_normalization/expend.py:118-125 | GPT_SoVITS/text/en_normalization/expend.py:142-152 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) REDACTED:403— REDACTED:403-410 | REDACTED:746-753 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:403` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:67— GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:67-74 | GPT_SoVITS/Accel/PyTorch/AR/runner.py:68-75 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/AR/runner_mlx.py` and `GPT_SoVITS/Accel/PyTorch/AR/runner.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) GPT_SoVITS/Accel/MLX/G2PW/model.py:59— GPT_SoVITS/Accel/MLX/G2PW/model.py:59-66 | GPT_SoVITS/Accel/PyTorch/G2PW/model.py:59-66 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/G2PW/model.py` and `GPT_SoVITS/Accel/PyTorch/G2PW/model.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) GPT_SoVITS/TTS_infer_pack/TTS.py:50— GPT_SoVITS/TTS_infer_pack/TTS.py:50-57 | REDACTED:537-544 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) REDACTED:178— REDACTED:178-185 | REDACTED:508-515 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) GPT_SoVITS/utils.py:135— GPT_SoVITS/utils.py:135-142 | GPT_SoVITS/utils.py:168-175 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) GPT_SoVITS/Accel/MLX/G2PW/model.py:111— GPT_SoVITS/Accel/MLX/G2PW/model.py:111-118 | GPT_SoVITS/Accel/PyTorch/G2PW/model.py:114-121 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/G2PW/model.py` and `GPT_SoVITS/Accel/PyTorch/G2PW/model.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) REDACTED:453— REDACTED:453-460 | REDACTED:230-237 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) GPT_SoVITS/module/transforms.py:124— GPT_SoVITS/module/transforms.py:124-131 | GPT_SoVITS/module/transforms.py:135-142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) tools/asr/fasterwhisper_asr.py:138— tools/asr/fasterwhisper_asr.py:138-145 | tools/asr/funasr_asr.py:156-163 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `tools/asr/fasterwhisper_asr.py:148` calls `load_cudnn` and `tools/asr/funasr_asr.py:166` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) tools/uvr5/lib/lib_v5/nets_61968KB.py:81— tools/uvr5/lib/lib_v5/nets_61968KB.py:81-88 | tools/uvr5/lib/lib_v5/nets_new.py:89-96 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) tools/uvr5/lib/lib_v5/layers_123821KB.py:98— tools/uvr5/lib/lib_v5/layers_123821KB.py:98-105 | tools/uvr5/lib/lib_v5/layers_new.py:80-87 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) GPT_SoVITS/AR/models/t2s_model.py:765— GPT_SoVITS/AR/models/t2s_model.py:765-771 | GPT_SoVITS/export_torch_script.py:536-541 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) GPT_SoVITS/Accel/MLX/G2PW/model.py:214— GPT_SoVITS/Accel/MLX/G2PW/model.py:214-219 | GPT_SoVITS/Accel/PyTorch/G2PW/model.py:215-220 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/G2PW/model.py` and `GPT_SoVITS/Accel/PyTorch/G2PW/model.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 2) GPT_SoVITS/TTS_infer_pack/TTS.py:1506— GPT_SoVITS/TTS_infer_pack/TTS.py:1506-1512 | GPT_SoVITS/TTS_infer_pack/TTS.py:1525-1530 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/TTS_infer_pack/TTS.py:1506` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) GPT_SoVITS/export_torch_script.py:522— GPT_SoVITS/export_torch_script.py:522-527 | GPT_SoVITS/stream_v2pro.py:111-118 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) GPT_SoVITS/export_torch_script.py:692— GPT_SoVITS/export_torch_script.py:692-697 | GPT_SoVITS/export_torch_script.py:795-801 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `GPT_SoVITS/export_torch_script.py:803` calls `sv_model` and `GPT_SoVITS/export_torch_script.py:699` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) GPT_SoVITS/export_torch_script_v3v4.py:830— GPT_SoVITS/export_torch_script_v3v4.py:830-835 | REDACTED:1019-1025 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) REDACTED:870— REDACTED:870-875 | REDACTED:846-851 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) GPT_SoVITS/module/models.py:517— GPT_SoVITS/module/models.py:517-522 | GPT_SoVITS/module/models_onnx.py:459-464 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/module/models.py:517` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) GPT_SoVITS/module/models.py:1333— GPT_SoVITS/module/models.py:1333-1338 | GPT_SoVITS/module/models.py:1483-1490 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `GPT_SoVITS/module/models.py:1339` calls `eval` and `GPT_SoVITS/module/models.py:1491` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) REDACTED:403— REDACTED:403-408 | REDACTED:410-415 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) GPT_SoVITS/module/attentions.py:70— GPT_SoVITS/module/attentions.py:70-75 | GPT_SoVITS/module/attentions.py:581-586 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `GPT_SoVITS/module/attentions.py:579` calls `subsequent_mask`, `size`, `to` and `GPT_SoVITS/module/attentions.py:68` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) GPT_SoVITS/module/ddp_utils.py:63— GPT_SoVITS/module/ddp_utils.py:63-68 | GPT_SoVITS/module/ddp_utils.py:120-125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:134— GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:134-139 | GPT_SoVITS/Accel/PyTorch/AR/runner.py:202-207 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/AR/runner_mlx.py` and `GPT_SoVITS/Accel/PyTorch/AR/runner.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:32— GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:32-37 | GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py:36-41 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py` and `GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) GPT_SoVITS/Accel/MLX/G2PW/model.py:101— GPT_SoVITS/Accel/MLX/G2PW/model.py:101-106 | GPT_SoVITS/Accel/PyTorch/G2PW/model.py:104-109 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/G2PW/model.py` and `GPT_SoVITS/Accel/PyTorch/G2PW/model.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `input_ids` to `Array` in one and `Tensor` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 2) GPT_SoVITS/module/attentions_onnx.py:13— GPT_SoVITS/module/attentions_onnx.py:13-18 | GPT_SoVITS/module/modules.py:22-27 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) GPT_SoVITS/module/attentions_onnx.py:28— GPT_SoVITS/module/attentions_onnx.py:28-33 | GPT_SoVITS/module/commons.py:98-103 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 2) GPT_SoVITS/Accel/PyTorch/AR/backends/torch_static_cuda_graph.py:35— GPT_SoVITS/Accel/PyTorch/AR/backends/torch_static_cuda_graph.py:35-40 | GPT_SoVITS/Accel/PyTorch/AR/backends/torch_varlen.py:37-42 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) GPT_SoVITS/module/models.py:1349— GPT_SoVITS/module/models.py:1349-1354 | GPT_SoVITS/module/models.py:1503-1508 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) tools/uvr5/lib/lib_v5/layers_123821KB.py:86— tools/uvr5/lib/lib_v5/layers_123821KB.py:86-91 | tools/uvr5/lib/lib_v5/layers_new.py:67-72 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Swallowed exception (empty catch) REDACTED:213— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:225— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:236— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:441— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:242— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:330— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:391— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:437— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:448— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:459— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) GPT_SoVITS/onnx_export.py:346— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) GPT_SoVITS/onnx_export.py:390— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) GPT_SoVITS/s1_train.py:60— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) GPT_SoVITS/s2_train.py:506— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) GPT_SoVITS/text/g2pw/onnx_api.py:24— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) GPT_SoVITS/TTS_infer_pack/TTS.py:290— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) GPT_SoVITS/TTS_infer_pack/TTS.py:1721— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py:241— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:244— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×15
Edited copy of a member (3 corresponding lines) GPT_SoVITS/Accel/PyTorch/AR/export.py:59— GPT_SoVITS/Accel/PyTorch/AR/export.py:59-62 | GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py:188-190 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) GPT_SoVITS/AR/models/t2s_model.py:253— GPT_SoVITS/AR/models/t2s_model.py:253-257 | GPT_SoVITS/export_torch_script.py:331-333 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) GPT_SoVITS/module/attentions_onnx.py:21— GPT_SoVITS/module/attentions_onnx.py:21-23 | GPT_SoVITS/module/modules.py:30-32 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) GPT_SoVITS/Accel/MLX/AR/backends/mlx_static.py:106— GPT_SoVITS/Accel/MLX/AR/backends/mlx_static.py:106-108 | GPT_SoVITS/Accel/PyTorch/AR/backends/torch_varlen.py:128-130 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) GPT_SoVITS/module/models.py:716— GPT_SoVITS/module/models.py:716-718 | GPT_SoVITS/module/models_onnx.py:652-654 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:29— GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:29-31 | REDACTED:690-692 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) GPT_SoVITS/AR/models/t2s_model.py:82— GPT_SoVITS/AR/models/t2s_model.py:82-84 | GPT_SoVITS/export_torch_script.py:198-200 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) GPT_SoVITS/Accel/PyTorch/AR/export.py:66— GPT_SoVITS/Accel/PyTorch/AR/export.py:66-68 | GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py:149-154 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) GPT_SoVITS/Accel/MLX/AR/backends/mlx_static.py:111— GPT_SoVITS/Accel/MLX/AR/backends/mlx_static.py:111-113 | GPT_SoVITS/Accel/PyTorch/AR/backends/torch_varlen.py:133-135 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:298— GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:298-307 | GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py:355-357 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) GPT_SoVITS/module/models.py:268— GPT_SoVITS/module/models.py:268-270 | GPT_SoVITS/module/models_onnx.py:909-911 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) GPT_SoVITS/module/models.py:1098— GPT_SoVITS/module/models.py:1098-1100 | GPT_SoVITS/module/models_onnx.py:1085-1087 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) GPT_SoVITS/module/commons.py:7— GPT_SoVITS/module/commons.py:7-9 | tools/AP_BWE_main/models/model.py:13-15 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) tools/uvr5/lib/lib_v5/layers_123821KB.py:54— tools/uvr5/lib/lib_v5/layers_123821KB.py:54-56 | tools/uvr5/lib/lib_v5/layers_new.py:31-33 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) tools/uvr5/lib/lib_v5/layers_123821KB.py:67— tools/uvr5/lib/lib_v5/layers_123821KB.py:67-69 | tools/uvr5/lib/lib_v5/layers_new.py:44-47 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (9 lines × 2) GPT_SoVITS/AR/modules/patched_mha_with_cache.py:320— GPT_SoVITS/AR/modules/patched_mha_with_cache.py:320-328 | GPT_SoVITS/AR/modules/patched_mha_with_cache.py:329-337 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:198— GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:198-206 | GPT_SoVITS/Accel/PyTorch/AR/runner.py:266-274 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/AR/runner_mlx.py` and `GPT_SoVITS/Accel/PyTorch/AR/runner.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:209— GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:209-217 | GPT_SoVITS/Accel/PyTorch/AR/runner.py:277-285 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/AR/runner_mlx.py` and `GPT_SoVITS/Accel/PyTorch/AR/runner.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) GPT_SoVITS/export_torch_script.py:48— GPT_SoVITS/export_torch_script.py:48-56 | REDACTED:139-147 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) REDACTED:404— REDACTED:404-412 | REDACTED:480-488 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) GPT_SoVITS/text/tone_sandhi.py:680— GPT_SoVITS/text/tone_sandhi.py:680-688 | GPT_SoVITS/text/tone_sandhi.py:709-717 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/text/tone_sandhi.py:680` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:99— GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:99-107 | GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py:81-89 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py` and `GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) GPT_SoVITS/Accel/MLX/AR/backends/mlx_static.py:24— GPT_SoVITS/Accel/MLX/AR/backends/mlx_static.py:24-32 | GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:187-195 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) GPT_SoVITS/Accel/MLX/G2PW/model.py:69— GPT_SoVITS/Accel/MLX/G2PW/model.py:69-77 | GPT_SoVITS/Accel/PyTorch/G2PW/model.py:69-77 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/G2PW/model.py` and `GPT_SoVITS/Accel/PyTorch/G2PW/model.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `x` to `Array` in one and `Tensor` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 2) GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:225— GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:225-233 | REDACTED:1277-1285 — before extracting anything, compare `GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) REDACTED:17— REDACTED:17-25 | REDACTED:17-25 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) GPT_SoVITS/text/chinese.py:173— GPT_SoVITS/text/chinese.py:173-181 | GPT_SoVITS/text/chinese2.py:325-333 — before extracting anything, compare `GPT_SoVITS/text/chinese.py` and `GPT_SoVITS/text/chinese2.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 2) tools/uvr5/bs_roformer/bs_roformer.py:251— tools/uvr5/bs_roformer/bs_roformer.py:251-259 | tools/uvr5/bs_roformer/mel_band_roformer.py:260-268 — before extracting anything, compare `tools/uvr5/bs_roformer/bs_roformer.py` and `tools/uvr5/bs_roformer/mel_band_roformer.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 294 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py:129— GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py:129-135 | GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py:176-182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) GPT_SoVITS/module/attentions.py:312— GPT_SoVITS/module/attentions.py:312-318 | GPT_SoVITS/module/attentions_onnx.py:275-281 — before extracting anything, compare `GPT_SoVITS/module/attentions.py` and `GPT_SoVITS/module/attentions_onnx.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) GPT_SoVITS/module/attentions.py:386— GPT_SoVITS/module/attentions.py:386-392 | GPT_SoVITS/module/attentions_onnx.py:353-359 — before extracting anything, compare `GPT_SoVITS/module/attentions.py` and `GPT_SoVITS/module/attentions_onnx.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) GPT_SoVITS/module/models.py:947— GPT_SoVITS/module/models.py:947-953 | GPT_SoVITS/module/models.py:1486-1492 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) REDACTED:75— REDACTED:75-81 | GPT_SoVITS/sv.py:26-32 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:74` calls `res` and `GPT_SoVITS/sv.py:25` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) GPT_SoVITS/text/tone_sandhi.py:695— GPT_SoVITS/text/tone_sandhi.py:695-702 | GPT_SoVITS/text/tone_sandhi.py:724-730 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) GPT_SoVITS/AR/models/t2s_model.py:127— GPT_SoVITS/AR/models/t2s_model.py:127-133 | GPT_SoVITS/export_torch_script.py:239-245 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) GPT_SoVITS/AR/modules/embedding.py:15— GPT_SoVITS/AR/modules/embedding.py:15-21 | GPT_SoVITS/AR/modules/embedding_onnx.py:15-21 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) GPT_SoVITS/Accel/PyTorch/AR/backends/torch_static_cuda_graph.py:21— GPT_SoVITS/Accel/PyTorch/AR/backends/torch_static_cuda_graph.py:21-27 | GPT_SoVITS/Accel/PyTorch/AR/backends/torch_varlen.py:23-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) GPT_SoVITS/module/attentions.py:377— GPT_SoVITS/module/attentions.py:377-383 | GPT_SoVITS/module/attentions_onnx.py:344-350 — before extracting anything, compare `GPT_SoVITS/module/attentions.py` and `GPT_SoVITS/module/attentions_onnx.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `GPT_SoVITS/module/attentions_onnx.py:340` calls `padding`, `_same_padding` and `GPT_SoVITS/module/attentions.py:374` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) GPT_SoVITS/module/models.py:323— GPT_SoVITS/module/models.py:323-329 | GPT_SoVITS/module/models_onnx.py:265-271 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) GPT_SoVITS/module/models.py:733— GPT_SoVITS/module/models.py:733-739 | GPT_SoVITS/module/models_onnx.py:669-675 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/module/models.py:733` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) tools/uvr5/vr.py:112— tools/uvr5/vr.py:112-118 | tools/uvr5/vr.py:283-289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) GPT_SoVITS/AR/models/t2s_model.py:560— GPT_SoVITS/AR/models/t2s_model.py:560-566 | GPT_SoVITS/AR/models/t2s_model_onnx.py:385-389 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) GPT_SoVITS/AR/models/t2s_model_onnx.py:384— GPT_SoVITS/AR/models/t2s_model_onnx.py:384-388 | GPT_SoVITS/export_torch_script.py:529-533 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) GPT_SoVITS/export_torch_script_v3v4.py:654— GPT_SoVITS/export_torch_script_v3v4.py:654-658 | GPT_SoVITS/module/models_onnx.py:939-943 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) GPT_SoVITS/module/models.py:1372— GPT_SoVITS/module/models.py:1372-1376 | GPT_SoVITS/module/models.py:1532-1536 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) GPT_SoVITS/AR/modules/transformer.py:337— GPT_SoVITS/AR/modules/transformer.py:337-341 | GPT_SoVITS/AR/modules/transformer_onnx.py:256-260 — before extracting anything, compare `GPT_SoVITS/AR/modules/transformer.py` and `GPT_SoVITS/AR/modules/transformer_onnx.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) REDACTED:13— REDACTED:13-17 | GPT_SoVITS/utils.py:68-72 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) GPT_SoVITS/AR/models/utils.py:245— GPT_SoVITS/AR/models/utils.py:245-249 | GPT_SoVITS/AR/models/utils.py:253-257 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) GPT_SoVITS/Accel/MLX/G2PW/model.py:94— GPT_SoVITS/Accel/MLX/G2PW/model.py:94-98 | GPT_SoVITS/Accel/PyTorch/G2PW/model.py:96-100 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/G2PW/model.py` and `GPT_SoVITS/Accel/PyTorch/G2PW/model.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) REDACTED:854— REDACTED:854-858 | REDACTED:83-87 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) GPT_SoVITS/module/attentions.py:58— GPT_SoVITS/module/attentions.py:58-62 | GPT_SoVITS/module/attentions.py:537-541 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) GPT_SoVITS/module/attentions_onnx.py:372— GPT_SoVITS/module/attentions_onnx.py:372-376 | GPT_SoVITS/module/mrte_model.py:19-23 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) GPT_SoVITS/module/models.py:1362— GPT_SoVITS/module/models.py:1362-1366 | GPT_SoVITS/module/models.py:1526-1530 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) tools/uvr5/bs_roformer/bs_roformer.py:183— tools/uvr5/bs_roformer/bs_roformer.py:183-187 | tools/uvr5/bs_roformer/mel_band_roformer.py:192-196 — before extracting anything, compare `tools/uvr5/bs_roformer/bs_roformer.py` and `tools/uvr5/bs_roformer/mel_band_roformer.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 294 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
FileTooLong: ./REDACTED REDACTED— FileTooLong — 1631 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1131 over it, 3.26× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: TTS_infer_pack/TTS.py GPT_SoVITS/TTS_infer_pack/TTS.py— FileTooLong — 1502 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1002 over it, 3.00× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: module/models.py GPT_SoVITS/module/models.py— FileTooLong — 1276 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 776 over it, 2.55× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: REDACTED REDACTED— FileTooLong — 1272 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 772 over it, 2.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: GPT_SoVITS/export_torch_script_v3v4.py GPT_SoVITS/export_torch_script_v3v4.py— FileTooLong — 887 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 387 over it, 1.77× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: module/models_onnx.py GPT_SoVITS/module/models_onnx.py— FileTooLong — 866 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 366 over it, 1.73× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: GPT_SoVITS/export_torch_script.py GPT_SoVITS/export_torch_script.py— FileTooLong — 815 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 315 over it, 1.63× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: module/data_utils.py GPT_SoVITS/module/data_utils.py— FileTooLong — 802 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 302 over it, 1.60× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: models/t2s_model.py GPT_SoVITS/AR/models/t2s_model.py— FileTooLong — 731 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 231 over it, 1.46× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: module/modules.py GPT_SoVITS/module/modules.py— FileTooLong — 709 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 209 over it, 1.42× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: module/attentions.py GPT_SoVITS/module/attentions.py— FileTooLong — 535 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 35 over it, 1.07× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: GPT_SoVITS/s2_train.py GPT_SoVITS/s2_train.py— FileTooLong — 520 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 20 over it, 1.04× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
Duplicated block (16 lines × 2) GPT_SoVITS/AR/modules/transformer.py:36— GPT_SoVITS/AR/modules/transformer.py:36-51 | GPT_SoVITS/AR/modules/transformer_onnx.py:36-51 — before extracting anything, compare `GPT_SoVITS/AR/modules/transformer.py` and `GPT_SoVITS/AR/modules/transformer_onnx.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:233— GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:233-248 | GPT_SoVITS/Accel/PyTorch/AR/runner.py:309-324 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/AR/runner_mlx.py` and `GPT_SoVITS/Accel/PyTorch/AR/runner.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:233` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:249` calls `array` and `GPT_SoVITS/Accel/PyTorch/AR/runner.py:325` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (16 lines × 2) GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py:71— GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py:71-86 | REDACTED:1171-1186 — before extracting anything, compare `GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) REDACTED:276— REDACTED:276-291 | REDACTED:362-377 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:276` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) REDACTED:747— REDACTED:747-762 | REDACTED:594-609 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (16 lines × 2) GPT_SoVITS/module/attentions.py:419— GPT_SoVITS/module/attentions.py:419-434 | GPT_SoVITS/module/attentions.py:470-485 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/module/attentions.py:419` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) GPT_SoVITS/module/models.py:691— GPT_SoVITS/module/models.py:691-706 | GPT_SoVITS/module/models_onnx.py:627-642 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (16 lines × 2) GPT_SoVITS/module/models.py:785— GPT_SoVITS/module/models.py:785-800 | GPT_SoVITS/module/models_onnx.py:721-736 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) REDACTED:712— REDACTED:712-727 | REDACTED:293-308 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (16 lines × 2) GPT_SoVITS/module/models.py:743— GPT_SoVITS/module/models.py:743-758 | GPT_SoVITS/module/models_onnx.py:679-694 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/module/models.py:743` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) tools/uvr5/bs_roformer/bs_roformer.py:384— tools/uvr5/bs_roformer/bs_roformer.py:384-399 | tools/uvr5/bs_roformer/mel_band_roformer.py:328-343 — before extracting anything, compare `tools/uvr5/bs_roformer/bs_roformer.py` and `tools/uvr5/bs_roformer/mel_band_roformer.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 294 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/uvr5/bs_roformer/bs_roformer.py:384` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) tools/AP_BWE_main/models/model.py:253— tools/AP_BWE_main/models/model.py:253-268 | tools/AP_BWE_main/models/model.py:347-362 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:300— GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:300-310 | GPT_SoVITS/Accel/PyTorch/AR/runner.py:378-388 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/AR/runner_mlx.py` and `GPT_SoVITS/Accel/PyTorch/AR/runner.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) GPT_SoVITS/Accel/logger.py:115— GPT_SoVITS/Accel/logger.py:115-125 | GPT_SoVITS/Accel/logger.py:179-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) GPT_SoVITS/module/data_utils.py:384— GPT_SoVITS/module/data_utils.py:384-394 | GPT_SoVITS/module/data_utils.py:622-632 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11 lines × 2) GPT_SoVITS/module/models.py:579— GPT_SoVITS/module/models.py:579-589 | GPT_SoVITS/module/models_onnx.py:521-531 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/module/models.py:579` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) GPT_SoVITS/s2_train.py:92— GPT_SoVITS/s2_train.py:92-102 | GPT_SoVITS/s2_train_v3.py:92-102 — before extracting anything, compare `GPT_SoVITS/s2_train.py` and `GPT_SoVITS/s2_train_v3.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 253 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) REDACTED:550— REDACTED:550-560 | REDACTED:642-652 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:550` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) GPT_SoVITS/Accel/PyTorch/AR/export.py:329— GPT_SoVITS/Accel/PyTorch/AR/export.py:329-339 | GPT_SoVITS/Accel/PyTorch/AR/export.py:377-387 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) GPT_SoVITS/AR/models/t2s_model.py:184— GPT_SoVITS/AR/models/t2s_model.py:184-194 | GPT_SoVITS/export_torch_script.py:282-292 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) GPT_SoVITS/module/attentions.py:295— GPT_SoVITS/module/attentions.py:295-305 | GPT_SoVITS/module/attentions_onnx.py:258-268 — before extracting anything, compare `GPT_SoVITS/module/attentions.py` and `GPT_SoVITS/module/attentions_onnx.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:38— GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:38-48 | GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:44-54 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) tools/uvr5/bs_roformer/bs_roformer.py:222— tools/uvr5/bs_roformer/bs_roformer.py:222-232 | tools/uvr5/bs_roformer/mel_band_roformer.py:231-241 — before extracting anything, compare `tools/uvr5/bs_roformer/bs_roformer.py` and `tools/uvr5/bs_roformer/mel_band_roformer.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 294 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) tools/uvr5/bs_roformer/bs_roformer.py:238— tools/uvr5/bs_roformer/bs_roformer.py:238-248 | tools/uvr5/bs_roformer/mel_band_roformer.py:247-257 — before extracting anything, compare `tools/uvr5/bs_roformer/bs_roformer.py` and `tools/uvr5/bs_roformer/mel_band_roformer.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 294 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×10
Edited copy of a member (4 corresponding lines) GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py:145— GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py:145-148 | REDACTED:1230-1233 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py:154— GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py:154-157 | REDACTED:1237-1240 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) GPT_SoVITS/text/chinese.py:77— GPT_SoVITS/text/chinese.py:77-80 | GPT_SoVITS/text/chinese2.py:74-77 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) GPT_SoVITS/AR/models/utils.py:10— GPT_SoVITS/AR/models/utils.py:10-13 | GPT_SoVITS/module/commons.py:118-121 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) GPT_SoVITS/Accel/PyTorch/AR/backends/flash_attn_varlen_cuda_graph.py:24— GPT_SoVITS/Accel/PyTorch/AR/backends/flash_attn_varlen_cuda_graph.py:24-29 | GPT_SoVITS/Accel/PyTorch/AR/export.py:73-76 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) GPT_SoVITS/AR/modules/embedding.py:75— GPT_SoVITS/AR/modules/embedding.py:75-78 | GPT_SoVITS/AR/modules/embedding_onnx.py:60-63 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:212— GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:212-215 | GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py:262-265 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:142— GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:142-145 | GPT_SoVITS/Accel/PyTorch/AR/runner.py:210-213 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) GPT_SoVITS/AR/modules/transformer.py:119— GPT_SoVITS/AR/modules/transformer.py:119-122 | GPT_SoVITS/AR/modules/transformer_onnx.py:119-122 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:153— GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:153-156 | GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py:152-155 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (15 lines × 2) GPT_SoVITS/AR/models/t2s_model.py:105— GPT_SoVITS/AR/models/t2s_model.py:105-119 | GPT_SoVITS/export_torch_script.py:221-235 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (15 lines × 2) GPT_SoVITS/AR/modules/activation.py:181— GPT_SoVITS/AR/modules/activation.py:181-195 | GPT_SoVITS/AR/modules/activation_onnx.py:131-145 — before extracting anything, compare `GPT_SoVITS/AR/modules/activation.py` and `GPT_SoVITS/AR/modules/activation_onnx.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) GPT_SoVITS/AR/modules/transformer.py:59— GPT_SoVITS/AR/modules/transformer.py:59-73 | GPT_SoVITS/AR/modules/transformer_onnx.py:59-73 — before extracting anything, compare `GPT_SoVITS/AR/modules/transformer.py` and `GPT_SoVITS/AR/modules/transformer_onnx.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) GPT_SoVITS/AR/modules/transformer.py:344— GPT_SoVITS/AR/modules/transformer.py:344-358 | GPT_SoVITS/AR/modules/transformer_onnx.py:263-277 — before extracting anything, compare `GPT_SoVITS/AR/modules/transformer.py` and `GPT_SoVITS/AR/modules/transformer_onnx.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:115— GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:115-129 | GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py:97-111 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py` and `GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (15 lines × 2) GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:35— GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:35-49 | REDACTED:810-824 — before extracting anything, compare `GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) GPT_SoVITS/export_torch_script_v3v4.py:286— GPT_SoVITS/export_torch_script_v3v4.py:286-300 | GPT_SoVITS/export_torch_script_v3v4.py:366-380 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (15 lines × 2) GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:274— GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:274-288 | GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py:338-352 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py` and `GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) tools/uvr5/bs_roformer/bs_roformer.py:78— tools/uvr5/bs_roformer/bs_roformer.py:78-92 | tools/uvr5/bs_roformer/mel_band_roformer.py:87-101 — before extracting anything, compare `tools/uvr5/bs_roformer/bs_roformer.py` and `tools/uvr5/bs_roformer/mel_band_roformer.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 294 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) tools/uvr5/bs_roformer/bs_roformer.py:95— tools/uvr5/bs_roformer/bs_roformer.py:95-109 | tools/uvr5/bs_roformer/mel_band_roformer.py:104-118 — before extracting anything, compare `tools/uvr5/bs_roformer/bs_roformer.py` and `tools/uvr5/bs_roformer/mel_band_roformer.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 294 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×9
Edited copy of a member (10 corresponding lines) GPT_SoVITS/module/commons.py:161— GPT_SoVITS/module/commons.py:161-172 | GPT_SoVITS/module/commons.py:176-185 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:185— GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:185-194 | GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py:187-196 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) REDACTED:60— REDACTED:60-70 | GPT_SoVITS/sv.py:13-22 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:378— GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:378-387 | GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py:437-452 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) GPT_SoVITS/Accel/MLX/AR/backends/mlx_static.py:116— GPT_SoVITS/Accel/MLX/AR/backends/mlx_static.py:116-125 | GPT_SoVITS/Accel/PyTorch/AR/backends/torch_varlen.py:138-147 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) REDACTED:831— REDACTED:831-840 | REDACTED:355-364 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) GPT_SoVITS/AR/modules/transformer.py:316— GPT_SoVITS/AR/modules/transformer.py:316-325 | GPT_SoVITS/AR/modules/transformer_onnx.py:236-245 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) tools/uvr5/lib/lib_v5/layers_123821KB.py:86— tools/uvr5/lib/lib_v5/layers_123821KB.py:86-95 | tools/uvr5/lib/lib_v5/layers_new.py:67-77 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) tools/uvr5/lib/lib_v5/layers_123821KB.py:72— tools/uvr5/lib/lib_v5/layers_123821KB.py:72-81 | tools/uvr5/lib/lib_v5/layers_new.py:50-62 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (10 lines × 2) GPT_SoVITS/AR/models/t2s_model_onnx.py:56— GPT_SoVITS/AR/models/t2s_model_onnx.py:56-65 | GPT_SoVITS/AR/models/utils.py:174-183 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) GPT_SoVITS/Accel/PyTorch/AR/runner.py:38— GPT_SoVITS/Accel/PyTorch/AR/runner.py:38-47 | GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py:44-53 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) REDACTED:660— REDACTED:660-669 | REDACTED:532-541 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 2) REDACTED:298— REDACTED:298-307 | REDACTED:313-322 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:298` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) GPT_SoVITS/AR/models/t2s_model.py:144— GPT_SoVITS/AR/models/t2s_model.py:144-153 | GPT_SoVITS/export_torch_script.py:250-259 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `padding_mask` to `Optional[torch.Tensor]` in one and `Optional[torch.Tensor] = None` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 2) GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:141— GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:141-150 | GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py:140-149 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py` and `GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 2) GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:248— GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:248-258 | GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py:315-324 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py` and `GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `x` to `Array` in one and `Tensor` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 2) tools/uvr5/bs_roformer/bs_roformer.py:61— tools/uvr5/bs_roformer/bs_roformer.py:61-70 | tools/uvr5/bs_roformer/mel_band_roformer.py:70-79 — before extracting anything, compare `tools/uvr5/bs_roformer/bs_roformer.py` and `tools/uvr5/bs_roformer/mel_band_roformer.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 294 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) tools/uvr5/bs_roformer/bs_roformer.py:134— tools/uvr5/bs_roformer/bs_roformer.py:134-143 | tools/uvr5/bs_roformer/mel_band_roformer.py:143-152 — before extracting anything, compare `tools/uvr5/bs_roformer/bs_roformer.py` and `tools/uvr5/bs_roformer/mel_band_roformer.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 294 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
TodoComment REDACTED:234— # todo: eng text normalize — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:175— # todo: jap text normalize — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment REDACTED:270— # todo: implement tones and word2ph — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment GPT_SoVITS/module/attentions.py:409— # TODO: refine this type — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment GPT_SoVITS/module/attentions.py:459— # TODO: refine this type — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment GPT_SoVITS/module/ddp_utils.py:147— # TODO: DDPSink is currently enabled for unused parameter detection and — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment GPT_SoVITS/AR/modules/patched_mha_with_cache.py:323— # TODO finish disentangling control flow so we don't do in-projections when statics are passed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment GPT_SoVITS/AR/modules/patched_mha_with_cache.py:332— # TODO finish disentangling control flow so we don't do in-projections when statics are passed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×7
Members sharing a duplicated core (4 members, 50+ identical tokens) GPT_SoVITS/AR/models/t2s_model.py:523— GPT_SoVITS/AR/models/t2s_model.py:523-576 | GPT_SoVITS/AR/models/t2s_model.py:831-962 | GPT_SoVITS/export_torch_script.py:452-545 | GPT_SoVITS/stream_v2pro.py:30-91 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) GPT_SoVITS/TTS_infer_pack/TTS.py:705— GPT_SoVITS/TTS_infer_pack/TTS.py:705-766 | GPT_SoVITS/export_torch_script_v3v4.py:520-541 | REDACTED:483-510 | REDACTED:259-287 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) GPT_SoVITS/export_torch_script_v3v4.py:708— GPT_SoVITS/export_torch_script_v3v4.py:708-924 | GPT_SoVITS/export_torch_script_v3v4.py:938-1046 | GPT_SoVITS/export_torch_script_v3v4.py:1056-1118 | REDACTED:875-1115 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) GPT_SoVITS/module/data_utils.py:110— GPT_SoVITS/module/data_utils.py:110-134 | GPT_SoVITS/module/data_utils.py:376-394 | GPT_SoVITS/module/data_utils.py:614-632 | GPT_SoVITS/module/data_utils.py:825-843 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) GPT_SoVITS/module/data_utils.py:137— GPT_SoVITS/module/data_utils.py:137-145 | GPT_SoVITS/module/data_utils.py:397-427 | GPT_SoVITS/module/data_utils.py:635-646 | GPT_SoVITS/module/data_utils.py:846-876 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) GPT_SoVITS/module/models.py:936— GPT_SoVITS/module/models.py:936-972 | GPT_SoVITS/module/models.py:997-1040 | GPT_SoVITS/module/models.py:1045-1095 | GPT_SoVITS/module/models_onnx.py:880-906 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:784— REDACTED:784-849 | REDACTED:874-940 | REDACTED:964-1026 | REDACTED:1061-1248 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×7
Edited copy of a member (7 corresponding lines) GPT_SoVITS/AR/modules/embedding.py:44— GPT_SoVITS/AR/modules/embedding.py:44-52 | GPT_SoVITS/AR/modules/embedding_onnx.py:44-50 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) GPT_SoVITS/TTS_infer_pack/TTS.py:118— GPT_SoVITS/TTS_infer_pack/TTS.py:118-125 | REDACTED:605-611 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) GPT_SoVITS/text/tone_sandhi.py:733— GPT_SoVITS/text/tone_sandhi.py:733-739 | GPT_SoVITS/text/tone_sandhi.py:742-748 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) GPT_SoVITS/AR/models/t2s_model.py:237— GPT_SoVITS/AR/models/t2s_model.py:237-243 | GPT_SoVITS/export_torch_script.py:322-328 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) GPT_SoVITS/text/g2pw/dataset.py:207— GPT_SoVITS/text/g2pw/dataset.py:207-213 | GPT_SoVITS/text/g2pw/dataset.py:217-223 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:132— GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:132-138 | GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py:114-124 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) tools/uvr5/lib/lib_v5/nets_61968KB.py:116— tools/uvr5/lib/lib_v5/nets_61968KB.py:116-122 | tools/uvr5/lib/lib_v5/nets_new.py:109-115 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×6
Edited copy of a member (11 corresponding lines) GPT_SoVITS/export_torch_script.py:881— GPT_SoVITS/eres2net/ERes2NetV2.py:241-251 | GPT_SoVITS/export_torch_script.py:881-893 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) GPT_SoVITS/Accel/MLX/G2PW/model.py:208— GPT_SoVITS/Accel/MLX/G2PW/model.py:208-219 | GPT_SoVITS/Accel/PyTorch/G2PW/model.py:210-220 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:24— GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:24-34 | GPT_SoVITS/Accel/PyTorch/AR/runner.py:24-34 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) GPT_SoVITS/module/losses.py:18— GPT_SoVITS/module/losses.py:18-30 | tools/AP_BWE_main/models/model.py:413-423 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) GPT_SoVITS/module/models.py:611— GPT_SoVITS/module/models.py:611-621 | GPT_SoVITS/module/models_onnx.py:553-563 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) GPT_SoVITS/text/en_normalization/expend.py:267— GPT_SoVITS/text/en_normalization/expend.py:267-277 | GPT_SoVITS/text/zh_normalization/num.py:62-73 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (13 lines × 2) GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:105— GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:105-117 | GPT_SoVITS/Accel/PyTorch/AR/runner.py:169-181 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/AR/runner_mlx.py` and `GPT_SoVITS/Accel/PyTorch/AR/runner.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) GPT_SoVITS/export_torch_script.py:768— GPT_SoVITS/export_torch_script.py:768-780 | GPT_SoVITS/stream_v2pro.py:284-296 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (13 lines × 2) GPT_SoVITS/Accel/MLX/G2PW/model.py:138— GPT_SoVITS/Accel/MLX/G2PW/model.py:138-150 | GPT_SoVITS/Accel/PyTorch/G2PW/model.py:141-153 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/G2PW/model.py` and `GPT_SoVITS/Accel/PyTorch/G2PW/model.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) GPT_SoVITS/module/models.py:596— GPT_SoVITS/module/models.py:596-608 | GPT_SoVITS/module/models_onnx.py:538-550 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) tools/uvr5/bs_roformer/bs_roformer.py:119— tools/uvr5/bs_roformer/bs_roformer.py:119-131 | tools/uvr5/bs_roformer/mel_band_roformer.py:128-140 — before extracting anything, compare `tools/uvr5/bs_roformer/bs_roformer.py` and `tools/uvr5/bs_roformer/mel_band_roformer.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 294 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 3) GPT_SoVITS/Accel/PyTorch/AR/backends/flash_attn_varlen_cuda_graph.py:32— GPT_SoVITS/Accel/PyTorch/AR/backends/flash_attn_varlen_cuda_graph.py:32-36 | GPT_SoVITS/Accel/PyTorch/AR/backends/torch_static_cuda_graph.py:30-34 | GPT_SoVITS/Accel/PyTorch/AR/backends/torch_varlen.py:32-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (5 lines × 3) GPT_SoVITS/Accel/PyTorch/AR/backends/flash_attn_varlen_cuda_graph.py:55— GPT_SoVITS/Accel/PyTorch/AR/backends/flash_attn_varlen_cuda_graph.py:55-59 | GPT_SoVITS/Accel/PyTorch/AR/backends/torch_static_cuda_graph.py:53-57 | GPT_SoVITS/Accel/PyTorch/AR/backends/torch_varlen.py:59-63 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (5 lines × 3) GPT_SoVITS/module/models.py:987— GPT_SoVITS/module/models.py:987-991 | GPT_SoVITS/module/models.py:1035-1039 | GPT_SoVITS/module/models_onnx.py:901-905 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 3) GPT_SoVITS/s2_train.py:380— GPT_SoVITS/s2_train.py:380-384 | GPT_SoVITS/s2_train_v3.py:346-351 | GPT_SoVITS/s2_train_v3_lora.py:308-313 — before extracting anything, compare `GPT_SoVITS/s2_train.py` and `GPT_SoVITS/s2_train_v3.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 253 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/s2_train.py:380` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `GPT_SoVITS/s2_train.py:379` calls `cuda` and `GPT_SoVITS/s2_train_v3.py:346` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 3) GPT_SoVITS/Accel/PyTorch/AR/backends/flash_attn_varlen_cuda_graph.py:74— GPT_SoVITS/Accel/PyTorch/AR/backends/flash_attn_varlen_cuda_graph.py:74-78 | GPT_SoVITS/Accel/PyTorch/AR/backends/torch_static_cuda_graph.py:72-76 | GPT_SoVITS/Accel/PyTorch/AR/backends/torch_varlen.py:78-82 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×4
Edited copy of a member (22 corresponding lines) GPT_SoVITS/text/tone_sandhi.py:680— GPT_SoVITS/text/tone_sandhi.py:680-702 | GPT_SoVITS/text/tone_sandhi.py:709-730 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) GPT_SoVITS/utils.py:121— GPT_SoVITS/utils.py:121-142 | GPT_SoVITS/utils.py:146-175 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) GPT_SoVITS/module/attentions.py:612— GPT_SoVITS/module/attentions.py:612-638 | GPT_SoVITS/module/modules.py:411-432 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) GPT_SoVITS/module/attentions.py:413— GPT_SoVITS/module/attentions.py:413-434 | GPT_SoVITS/module/attentions.py:463-485 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (31 lines × 2) GPT_SoVITS/module/models.py:170— GPT_SoVITS/module/models.py:170-200 | GPT_SoVITS/module/models_onnx.py:162-192 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (31 lines × 2) GPT_SoVITS/module/models.py:1277— GPT_SoVITS/module/models.py:1277-1307 | GPT_SoVITS/module/models_onnx.py:1017-1047 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (31 lines × 2) GPT_SoVITS/s2_train.py:133— GPT_SoVITS/s2_train.py:133-163 | GPT_SoVITS/s2_train_v3.py:133-163 — before extracting anything, compare `GPT_SoVITS/s2_train.py` and `GPT_SoVITS/s2_train_v3.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 253 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (31 lines × 2) GPT_SoVITS/module/models.py:454— GPT_SoVITS/module/models.py:454-484 | GPT_SoVITS/module/models_onnx.py:396-426 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (21 lines × 2) GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:301— GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:301-321 | GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py:313-333 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py` and `GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (21 lines × 2) GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py:164— GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py:164-184 | REDACTED:1245-1265 — before extracting anything, compare `GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py:162` calls `register_method` and `REDACTED:1240` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (21 lines × 2) GPT_SoVITS/module/mel_processing.py:53— GPT_SoVITS/module/mel_processing.py:53-73 | GPT_SoVITS/module/mel_processing.py:118-138 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (21 lines × 2) GPT_SoVITS/TTS_infer_pack/TTS.py:1789— GPT_SoVITS/TTS_infer_pack/TTS.py:1789-1809 | GPT_SoVITS/TTS_infer_pack/TTS.py:1878-1898 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (19 lines × 2) GPT_SoVITS/module/attentions.py:641— GPT_SoVITS/module/attentions.py:641-659 | GPT_SoVITS/module/modules.py:435-453 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (19 lines × 2) GPT_SoVITS/module/models.py:487— GPT_SoVITS/module/models.py:487-505 | GPT_SoVITS/module/models_onnx.py:429-447 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (19 lines × 2) GPT_SoVITS/Accel/MLX/AR/backends/mlx_static.py:65— GPT_SoVITS/Accel/MLX/AR/backends/mlx_static.py:65-83 | GPT_SoVITS/Accel/MLX/AR/backends/mlx_varlen.py:65-83 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/AR/backends/mlx_static.py` and `GPT_SoVITS/Accel/MLX/AR/backends/mlx_varlen.py` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (19 lines × 2) tools/uvr5/bs_roformer/bs_roformer.py:162— tools/uvr5/bs_roformer/bs_roformer.py:162-180 | tools/uvr5/bs_roformer/mel_band_roformer.py:171-189 — before extracting anything, compare `tools/uvr5/bs_roformer/bs_roformer.py` and `tools/uvr5/bs_roformer/mel_band_roformer.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 294 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) GPT_SoVITS/module/models.py:139— GPT_SoVITS/module/models.py:139-152 | GPT_SoVITS/module/models_onnx.py:133-146 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (14 lines × 2) tools/AP_BWE_main/models/model.py:229— tools/AP_BWE_main/models/model.py:229-242 | tools/AP_BWE_main/models/model.py:323-336 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (14 lines × 2) tools/uvr5/lib/lib_v5/layers_123821KB.py:10— tools/uvr5/lib/lib_v5/layers_123821KB.py:10-23 | tools/uvr5/lib/lib_v5/layers_new.py:10-23 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (14 lines × 2) tools/uvr5/bs_roformer/bs_roformer.py:548— tools/uvr5/bs_roformer/bs_roformer.py:548-561 | tools/uvr5/bs_roformer/mel_band_roformer.py:523-536 — before extracting anything, compare `tools/uvr5/bs_roformer/bs_roformer.py` and `tools/uvr5/bs_roformer/mel_band_roformer.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 294 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `tools/uvr5/bs_roformer/bs_roformer.py:544` calls `final_norm` and `tools/uvr5/bs_roformer/mel_band_roformer.py:520` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Swallowed exception (caught, then discarded) REDACTED:149— `except` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:160— `except` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) GPT_SoVITS/s1_train.py:144— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) GPT_SoVITS/AR/utils/__init__.py:34— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Hotspot: GPT_SoVITS/TTS_infer_pack/TTS.py GPT_SoVITS/TTS_infer_pack/TTS.py:1133— GPT_SoVITS/TTS_infer_pack/TTS.py changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 110 in TTS.run at line 1133. 1 of those changes was a fix/bug commit, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 00:26:17 +08:00' --until='2026-11-12 00:26:17 +08:00' --full-history --no-merges -- GPT_SoVITS/TTS_infer_pack/TTS.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:878— REDACTED changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 73 in inference_webui.get_tts_wav at line 878. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 00:26:17 +08:00' --until='2026-11-12 00:26:17 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: REDACTED REDACTED:262— REDACTED changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in inference_webui_fast.change_sovits_weights at line 262. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 00:26:17 +08:00' --until='2026-11-12 00:26:17 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×3
Edited copy of a member (17 corresponding lines) GPT_SoVITS/module/models.py:1362— GPT_SoVITS/module/models.py:1362-1382 | GPT_SoVITS/module/models.py:1526-1542 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) GPT_SoVITS/Accel/PyTorch/AR/export.py:82— GPT_SoVITS/Accel/PyTorch/AR/export.py:82-100 | GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py:241-257 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) GPT_SoVITS/module/attentions.py:348— GPT_SoVITS/module/attentions.py:348-364 | GPT_SoVITS/module/attentions_onnx.py:311-328 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×3
Edited copy of a member (23 corresponding lines) GPT_SoVITS/AR/models/t2s_model_onnx.py:34— GPT_SoVITS/AR/models/t2s_model_onnx.py:34-71 | GPT_SoVITS/export_torch_script.py:81-103 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:395— GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:395-421 | GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py:460-482 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) tools/uvr5/vr.py:21— tools/uvr5/vr.py:21-43 | tools/uvr5/vr.py:192-215 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×3
Edited copy of a member (8 corresponding lines) REDACTED:730— REDACTED:730-738 | REDACTED:743-750 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) REDACTED:73— REDACTED:73-81 | GPT_SoVITS/sv.py:25-32 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) GPT_SoVITS/module/attentions.py:218— GPT_SoVITS/module/attentions.py:218-225 | GPT_SoVITS/module/attentions_onnx.py:184-192 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×3
Edited copy of a member (9 corresponding lines) GPT_SoVITS/module/attentions.py:326— GPT_SoVITS/module/attentions.py:326-334 | GPT_SoVITS/module/attentions_onnx.py:289-297 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) GPT_SoVITS/export_torch_script.py:373— GPT_SoVITS/export_torch_script.py:373-382 | GPT_SoVITS/onnx_export.py:214-222 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) tools/uvr5/lib/lib_v5/layers_123821KB.py:98— tools/uvr5/lib/lib_v5/layers_123821KB.py:98-106 | tools/uvr5/lib/lib_v5/layers_new.py:80-92 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (26 lines × 2) GPT_SoVITS/AR/models/t2s_lightning_module.py:121— GPT_SoVITS/AR/models/t2s_lightning_module.py:121-146 | GPT_SoVITS/AR/models/t2s_lightning_module_onnx.py:85-110 — before extracting anything, compare `GPT_SoVITS/AR/models/t2s_lightning_module.py` and `GPT_SoVITS/AR/models/t2s_lightning_module_onnx.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (26 lines × 2) GPT_SoVITS/module/attentions.py:32— GPT_SoVITS/module/attentions.py:32-57 | GPT_SoVITS/module/attentions_onnx.py:72-97 — before extracting anything, compare `GPT_SoVITS/module/attentions.py` and `GPT_SoVITS/module/attentions_onnx.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (26 lines × 2) GPT_SoVITS/stream_v2pro.py:260— GPT_SoVITS/stream_v2pro.py:260-285 | GPT_SoVITS/stream_v2pro.py:459-484 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/stream_v2pro.py:260` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `GPT_SoVITS/stream_v2pro.py:485` calls `StepVitsModel` and `GPT_SoVITS/stream_v2pro.py:289` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (22 lines × 2) GPT_SoVITS/export_torch_script_v3v4.py:225— GPT_SoVITS/export_torch_script_v3v4.py:225-246 | GPT_SoVITS/export_torch_script_v3v4.py:305-326 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (22 lines × 2) GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py:118— GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py:118-139 | REDACTED:1205-1226 — before extracting anything, compare `GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (22 lines × 2) tools/uvr5/bs_roformer/bs_roformer.py:420— tools/uvr5/bs_roformer/bs_roformer.py:420-441 | tools/uvr5/bs_roformer/mel_band_roformer.py:397-418 — before extracting anything, compare `tools/uvr5/bs_roformer/bs_roformer.py` and `tools/uvr5/bs_roformer/mel_band_roformer.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 294 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 2) GPT_SoVITS/module/models.py:120— GPT_SoVITS/module/models.py:120-136 | GPT_SoVITS/module/models_onnx.py:114-130 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/module/models.py:120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) tools/uvr5/bs_roformer/bs_roformer.py:366— tools/uvr5/bs_roformer/bs_roformer.py:366-382 | tools/uvr5/bs_roformer/mel_band_roformer.py:311-327 — before extracting anything, compare `tools/uvr5/bs_roformer/bs_roformer.py` and `tools/uvr5/bs_roformer/mel_band_roformer.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 294 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tools/uvr5/bs_roformer/bs_roformer.py:366` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) tools/uvr5/vr.py:125— tools/uvr5/vr.py:125-141 | tools/uvr5/vr.py:162-178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) GPT_SoVITS/AR/models/t2s_lightning_module.py:20— GPT_SoVITS/AR/models/t2s_lightning_module.py:20-31 | GPT_SoVITS/AR/models/t2s_lightning_module_onnx.py:20-31 — before extracting anything, compare `GPT_SoVITS/AR/models/t2s_lightning_module.py` and `GPT_SoVITS/AR/models/t2s_lightning_module_onnx.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/AR/models/t2s_lightning_module.py:20` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `Text2SemanticDecoder` names `AR.models.t2s_model` in one and `AR.models.t2s_model_onnx` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 2) GPT_SoVITS/TTS_infer_pack/TTS.py:1817— GPT_SoVITS/TTS_infer_pack/TTS.py:1817-1828 | GPT_SoVITS/TTS_infer_pack/TTS.py:1899-1910 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py:101— GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py:101-112 | REDACTED:1190-1201 — before extracting anything, compare `GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py` and `REDACTED` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py:116` calls `register_method` and `REDACTED:1204` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11–12 lines × 2) GPT_SoVITS/AR/models/utils.py:178— GPT_SoVITS/AR/models/utils.py:178-189 | GPT_SoVITS/export_torch_script.py:93-103 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/AR/models/utils.py:178` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11–12 lines × 2) GPT_SoVITS/utils.py:121— GPT_SoVITS/utils.py:121-131 | GPT_SoVITS/utils.py:146-157 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/utils.py:146` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11–12 lines × 2) REDACTED:817— REDACTED:817-827 | REDACTED:1101-1112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:817` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–10 lines × 2) GPT_SoVITS/AR/models/t2s_model.py:416— GPT_SoVITS/AR/models/t2s_model.py:416-423 | GPT_SoVITS/AR/models/t2s_model.py:426-435 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8–10 lines × 2) GPT_SoVITS/module/attentions.py:249— GPT_SoVITS/module/attentions.py:249-256 | GPT_SoVITS/module/attentions_onnx.py:209-218 — before extracting anything, compare `GPT_SoVITS/module/attentions.py` and `GPT_SoVITS/module/attentions_onnx.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8–10 lines × 2) GPT_SoVITS/text/chinese.py:84— GPT_SoVITS/text/chinese.py:84-91 | GPT_SoVITS/text/chinese2.py:81-90 — before extracting anything, compare `GPT_SoVITS/text/chinese.py` and `GPT_SoVITS/text/chinese2.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 3) GPT_SoVITS/TTS_infer_pack/TTS.py:1831— GPT_SoVITS/TTS_infer_pack/TTS.py:1831-1838 | REDACTED:1116-1123 | REDACTED:1047-1054 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 3) GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:179— GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:179-186 | REDACTED:754-761 | REDACTED:601-608 — before extracting anything, compare `GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) tools/uvr5/vr.py:158— tools/uvr5/vr.py:158-165 | tools/uvr5/vr.py:286-295 | tools/uvr5/vr.py:321-328 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tools/uvr5/vr.py:158` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) GPT_SoVITS/module/data_utils.py:222— GPT_SoVITS/module/data_utils.py:222-228 | GPT_SoVITS/module/data_utils.py:480-487 | GPT_SoVITS/module/data_utils.py:691-698 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `GPT_SoVITS/module/data_utils.py:231` calls `FloatTensor` and `GPT_SoVITS/module/data_utils.py:490` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 3) REDACTED:784— REDACTED:784-790 | REDACTED:874-880 | REDACTED:1061-1067 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7 lines × 3) REDACTED:1008— REDACTED:1008-1014 | REDACTED:1108-1114 | REDACTED:1217-1223 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:1115` calls `join`, `process_info` and `REDACTED:1224` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
MultiheadAttention.__init__ (cognitive 24) GPT_SoVITS/AR/modules/activation.py:78— MultiheadAttention.__init__ has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (21 pts), ternaries 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MultiheadAttention.__init__ (cognitive 24) GPT_SoVITS/AR/modules/activation_onnx.py:19— MultiheadAttention.__init__ has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (21 pts), ternaries 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×2
Edited copy of a member (15 corresponding lines) GPT_SoVITS/module/attentions.py:295— GPT_SoVITS/module/attentions.py:295-309 | GPT_SoVITS/module/attentions_onnx.py:258-272 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) GPT_SoVITS/AR/modules/scaling.py:141— GPT_SoVITS/AR/modules/scaling.py:141-155 | GPT_SoVITS/AR/modules/scaling.py:166-188 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×2
Edited copy of a member (12 corresponding lines) GPT_SoVITS/module/attentions.py:312— GPT_SoVITS/module/attentions.py:312-323 | GPT_SoVITS/module/attentions_onnx.py:275-286 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) tools/uvr5/lib/lib_v5/nets_61968KB.py:10— tools/uvr5/lib/lib_v5/nets_61968KB.py:10-21 | tools/uvr5/lib/lib_v5/nets_new.py:10-23 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (6 members, 50+ identical tokens) GPT_SoVITS/module/models.py:343— GPT_SoVITS/module/models.py:343-360 | GPT_SoVITS/module/models.py:378-389 | GPT_SoVITS/module/models.py:412-430 | GPT_SoVITS/module/models_onnx.py:285-302 | GPT_SoVITS/module/models_onnx.py:320-331 | GPT_SoVITS/module/models_onnx.py:354-372 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) GPT_SoVITS/module/models.py:363— GPT_SoVITS/module/models.py:363-371 | GPT_SoVITS/module/models.py:392-398 | GPT_SoVITS/module/models.py:433-438 | GPT_SoVITS/module/models_onnx.py:305-313 | GPT_SoVITS/module/models_onnx.py:334-340 | GPT_SoVITS/module/models_onnx.py:375-380 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (5 members, 50+ identical tokens) GPT_SoVITS/AR/data/dataset.py:55— GPT_SoVITS/AR/data/dataset.py:55-113 | GPT_SoVITS/module/data_utils.py:25-107 | GPT_SoVITS/module/data_utils.py:287-370 | GPT_SoVITS/module/data_utils.py:525-608 | GPT_SoVITS/module/data_utils.py:736-819 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) GPT_SoVITS/text/cantonese.py:97— GPT_SoVITS/text/cantonese.py:97-103 | GPT_SoVITS/text/chinese.py:48-55 | GPT_SoVITS/text/chinese.py:59-66 | GPT_SoVITS/text/chinese2.py:63-70 | GPT_SoVITS/text/chinese2.py:306-313 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×2
Edited copy of a member (40 corresponding lines) GPT_SoVITS/AR/models/t2s_model.py:262— GPT_SoVITS/AR/models/t2s_model.py:262-353 | GPT_SoVITS/AR/models/t2s_model_onnx.py:251-290 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (40 corresponding lines) GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:201— GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:201-246 | GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py:204-243 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×2
Edited copy of a member (26 corresponding lines) GPT_SoVITS/module/models.py:1331— GPT_SoVITS/module/models.py:1331-1356 | GPT_SoVITS/module/models.py:1481-1520 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) GPT_SoVITS/module/attentions.py:229— GPT_SoVITS/module/attentions.py:229-258 | GPT_SoVITS/module/attentions_onnx.py:196-221 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×2
Edited copy of a member (38 corresponding lines) GPT_SoVITS/export_torch_script_v3v4.py:403— GPT_SoVITS/export_torch_script_v3v4.py:403-440 | GPT_SoVITS/export_torch_script_v3v4.py:463-500 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (38 corresponding lines) GPT_SoVITS/AR/models/t2s_lightning_module.py:43— GPT_SoVITS/AR/models/t2s_lightning_module.py:43-81 | GPT_SoVITS/AR/models/t2s_lightning_module_onnx.py:42-79 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×2
Edited copy of a member (20 corresponding lines) GPT_SoVITS/module/attentions.py:65— GPT_SoVITS/module/attentions.py:65-84 | GPT_SoVITS/module/attentions.py:572-595 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) GPT_SoVITS/AR/models/t2s_lightning_module.py:20— GPT_SoVITS/AR/models/t2s_lightning_module.py:20-40 | GPT_SoVITS/AR/models/t2s_lightning_module_onnx.py:20-39 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×2
Edited copy of a member (24 corresponding lines) GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:105— GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:105-128 | GPT_SoVITS/Accel/PyTorch/AR/runner.py:169-196 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) REDACTED:272— REDACTED:272-296 | REDACTED:303-326 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×2
Edited copy of a member (13 corresponding lines) REDACTED:178— REDACTED:178-190 | REDACTED:508-521 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) tools/uvr5/lib/lib_v5/nets_61968KB.py:24— tools/uvr5/lib/lib_v5/nets_61968KB.py:24-36 | tools/uvr5/lib/lib_v5/nets_new.py:26-40 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×2
Edited copy of a member (19 corresponding lines) GPT_SoVITS/module/models.py:573— GPT_SoVITS/module/models.py:573-591 | GPT_SoVITS/module/models_onnx.py:515-533 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) GPT_SoVITS/Accel/PyTorch/AR/backends/flash_attn_varlen_cuda_graph.py:32— GPT_SoVITS/Accel/PyTorch/AR/backends/flash_attn_varlen_cuda_graph.py:32-50 | GPT_SoVITS/Accel/PyTorch/AR/backends/torch_static_cuda_graph.py:30-48 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×2
Edited copy of a member (27 corresponding lines) REDACTED:701— REDACTED:701-727 | REDACTED:282-308 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) REDACTED:749— REDACTED:749-782 | REDACTED:323-349 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×2
Edited copy of a member (16 corresponding lines) GPT_SoVITS/Accel/MLX/AR/sample_funcs_mlx.py:117— GPT_SoVITS/Accel/MLX/AR/sample_funcs_mlx.py:117-132 | GPT_SoVITS/Accel/PyTorch/AR/sample_funcs.py:133-148 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) tools/uvr5/bs_roformer/bs_roformer.py:217— tools/uvr5/bs_roformer/bs_roformer.py:217-232 | tools/uvr5/bs_roformer/mel_band_roformer.py:226-241 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×2
Edited copy of a member (5 corresponding lines) GPT_SoVITS/Accel/MLX/G2PW/model.py:94— GPT_SoVITS/Accel/MLX/G2PW/model.py:94-98 | GPT_SoVITS/Accel/PyTorch/G2PW/model.py:96-101 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) GPT_SoVITS/f5_tts/model/modules.py:160— GPT_SoVITS/f5_tts/model/modules.py:160-164 | GPT_SoVITS/f5_tts/model/modules.py:181-185 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×2
Edited copy of a member (6 corresponding lines) GPT_SoVITS/TTS_infer_pack/TTS.py:563— GPT_SoVITS/TTS_infer_pack/TTS.py:563-568 | GPT_SoVITS/TTS_infer_pack/TTS.py:571-577 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) GPT_SoVITS/module/models.py:629— GPT_SoVITS/module/models.py:629-637 | GPT_SoVITS/module/models_onnx.py:568-573 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×2
Edited copies of one member (3 members, 13+ corresponding lines) GPT_SoVITS/module/models.py:517— GPT_SoVITS/module/models.py:517-570 | GPT_SoVITS/module/models_onnx.py:459-512 | tools/AP_BWE_main/models/model.py:149-161 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) GPT_SoVITS/export_torch_script_v3v4.py:504— GPT_SoVITS/export_torch_script_v3v4.py:504-516 | REDACTED:464-479 | REDACTED:241-255 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 4+ corresponding lines) · ×2
Edited copies of one member (3 members, 4+ corresponding lines) GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:207— GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:207-210 | REDACTED:650-653 | REDACTED:525-528 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 4+ corresponding lines) REDACTED:1270— REDACTED:1270-1273 | REDACTED:235-238 | config.py:94-97 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (34 lines × 2) GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:326— GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:326-359 | GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py:372-405 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py` and `GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:326` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (34 lines × 2) GPT_SoVITS/module/attentions.py:182— GPT_SoVITS/module/attentions.py:182-215 | GPT_SoVITS/module/attentions_onnx.py:148-181 — before extracting anything, compare `GPT_SoVITS/module/attentions.py` and `GPT_SoVITS/module/attentions_onnx.py` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (33 lines × 2) GPT_SoVITS/export_torch_script_v3v4.py:403— GPT_SoVITS/export_torch_script_v3v4.py:403-435 | GPT_SoVITS/export_torch_script_v3v4.py:463-495 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (33 lines × 2) GPT_SoVITS/module/models.py:868— GPT_SoVITS/module/models.py:868-900 | GPT_SoVITS/module/models_onnx.py:807-839 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (29 lines × 2) GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:218— GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:218-246 | GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py:215-243 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py` and `GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (29 lines × 2) GPT_SoVITS/export_torch_script_v3v4.py:963— GPT_SoVITS/export_torch_script_v3v4.py:963-991 | GPT_SoVITS/export_torch_script_v3v4.py:1082-1110 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (27 lines × 2) REDACTED:620— REDACTED:620-646 | REDACTED:643-669 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (27 lines × 2) GPT_SoVITS/module/models.py:662— GPT_SoVITS/module/models.py:662-688 | GPT_SoVITS/module/models_onnx.py:598-624 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (23 lines × 2) GPT_SoVITS/export_torch_script_v3v4.py:258— GPT_SoVITS/export_torch_script_v3v4.py:258-280 | GPT_SoVITS/export_torch_script_v3v4.py:338-360 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (23 lines × 2) GPT_SoVITS/module/models.py:298— GPT_SoVITS/module/models.py:298-320 | GPT_SoVITS/module/models_onnx.py:240-262 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (20 lines × 2) GPT_SoVITS/export_torch_script.py:139— GPT_SoVITS/export_torch_script.py:139-158 | GPT_SoVITS/onnx_export.py:20-39 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (20 lines × 2) tools/AP_BWE_main/models/model.py:273— tools/AP_BWE_main/models/model.py:273-292 | tools/AP_BWE_main/models/model.py:367-386 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (30 lines × 2) GPT_SoVITS/module/models.py:39— GPT_SoVITS/module/models.py:39-68 | GPT_SoVITS/module/models_onnx.py:33-62 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (30 lines × 2) GPT_SoVITS/module/models.py:997— GPT_SoVITS/module/models.py:997-1026 | GPT_SoVITS/module/models.py:1045-1074 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 3) GPT_SoVITS/module/models.py:640— GPT_SoVITS/module/models.py:640-652 | GPT_SoVITS/module/models_onnx.py:576-588 | tools/AP_BWE_main/models/model.py:200-212 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (13 lines × 3) GPT_SoVITS/s2_train.py:76— GPT_SoVITS/s2_train.py:76-88 | GPT_SoVITS/s2_train_v3.py:76-88 | GPT_SoVITS/s2_train_v3_lora.py:77-89 — before extracting anything, compare `GPT_SoVITS/s2_train.py` and `GPT_SoVITS/s2_train_v3.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 253 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 3) GPT_SoVITS/AR/models/t2s_model.py:164— GPT_SoVITS/AR/models/t2s_model.py:164-174 | GPT_SoVITS/export_torch_script.py:269-279 | GPT_SoVITS/export_torch_script.py:302-312 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11 lines × 3) GPT_SoVITS/export_torch_script.py:753— GPT_SoVITS/export_torch_script.py:753-763 | GPT_SoVITS/stream_v2pro.py:269-279 | GPT_SoVITS/stream_v2pro.py:468-478 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/export_torch_script.py:753` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 4) GPT_SoVITS/AR/models/t2s_model.py:539— GPT_SoVITS/AR/models/t2s_model.py:539-548 | GPT_SoVITS/AR/models/t2s_model.py:869-878 | GPT_SoVITS/export_torch_script.py:482-491 | GPT_SoVITS/stream_v2pro.py:54-63 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (10 lines × 4) GPT_SoVITS/TTS_infer_pack/TTS.py:736— GPT_SoVITS/TTS_infer_pack/TTS.py:736-745 | GPT_SoVITS/export_torch_script_v3v4.py:522-531 | REDACTED:486-495 | REDACTED:265-274 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/TTS_infer_pack/TTS.py:736` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) GPT_SoVITS/s2_train.py:93— GPT_SoVITS/s2_train.py:93-102 | GPT_SoVITS/s2_train_v3.py:93-102 | GPT_SoVITS/s2_train_v3_lora.py:94-103 — before extracting anything, compare `GPT_SoVITS/s2_train.py` and `GPT_SoVITS/s2_train_v3.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 253 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 3) GPT_SoVITS/s2_train.py:452— GPT_SoVITS/s2_train.py:452-461 | GPT_SoVITS/s2_train_v3.py:368-377 | GPT_SoVITS/s2_train_v3_lora.py:329-338 — before extracting anything, compare `GPT_SoVITS/s2_train.py` and `GPT_SoVITS/s2_train_v3.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 253 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 3) GPT_SoVITS/export_torch_script.py:884— GPT_SoVITS/eres2net/ERes2NetV2.py:220-228 | GPT_SoVITS/eres2net/ERes2NetV2.py:241-249 | GPT_SoVITS/export_torch_script.py:884-892 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (9 lines × 3) GPT_SoVITS/module/models.py:573— GPT_SoVITS/module/models.py:573-581 | GPT_SoVITS/module/models_onnx.py:515-523 | tools/AP_BWE_main/models/model.py:164-172 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/module/models.py:573` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 5) GPT_SoVITS/AR/data/dataset.py:74— GPT_SoVITS/AR/data/dataset.py:74-81 | GPT_SoVITS/module/data_utils.py:40-47 | GPT_SoVITS/module/data_utils.py:296-303 | GPT_SoVITS/module/data_utils.py:534-541 | GPT_SoVITS/module/data_utils.py:745-752 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `GPT_SoVITS/module/data_utils.py:39` calls `set`, `list`, `listdir` and `GPT_SoVITS/module/data_utils.py:295` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 5) GPT_SoVITS/module/models.py:919— GPT_SoVITS/module/models.py:919-926 | GPT_SoVITS/module/models.py:1303-1310 | GPT_SoVITS/module/models.py:1461-1468 | GPT_SoVITS/module/models_onnx.py:859-866 | GPT_SoVITS/module/models_onnx.py:1043-1050 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6–7 lines × 2) GPT_SoVITS/AR/models/t2s_model.py:558— GPT_SoVITS/AR/models/t2s_model.py:558-564 | GPT_SoVITS/AR/models/t2s_model.py:909-914 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6–7 lines × 2) GPT_SoVITS/AR/modules/embedding.py:44— GPT_SoVITS/AR/modules/embedding.py:44-50 | GPT_SoVITS/AR/modules/embedding_onnx.py:44-49 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 4) GPT_SoVITS/module/data_utils.py:216— GPT_SoVITS/module/data_utils.py:216-220 | GPT_SoVITS/module/data_utils.py:473-478 | GPT_SoVITS/module/data_utils.py:684-689 | GPT_SoVITS/module/data_utils.py:922-926 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `GPT_SoVITS/module/data_utils.py:920` calls `LongTensor` and `GPT_SoVITS/module/data_utils.py:213` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 4) tools/uvr5/vr.py:114— tools/uvr5/vr.py:114-120 | tools/uvr5/vr.py:157-161 | tools/uvr5/vr.py:285-291 | tools/uvr5/vr.py:320-324 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
No authorization REDACTED:1360— This repository serves requests — a request handler (@app.post() (REDACTED:1360) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected.
TTS.run (cyclomatic 110) GPT_SoVITS/TTS_infer_pack/TTS.py:1133— TTS.run has cyclomatic complexity 110 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
inference_webui.get_tts_wav (cyclomatic 73) REDACTED:878— inference_webui.get_tts_wav has cyclomatic complexity 73 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
api.get_tts_wav (cyclomatic 57) REDACTED:854— api.get_tts_wav has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MultiheadAttention.forward (cyclomatic 42) GPT_SoVITS/AR/modules/activation.py:204— MultiheadAttention.forward has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
patched_mha_with_cache.multi_head_attention_forward_patched (cyclomatic 42) GPT_SoVITS/AR/modules/patched_mha_with_cache.py:13— patched_mha_with_cache.multi_head_attention_forward_patched has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
streaming.stream_v5_windows (cyclomatic 36) GPT_SoVITS/TTS_infer_pack/streaming.py:210— streaming.stream_v5_windows has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LangSegmenter.getTexts (cyclomatic 36) GPT_SoVITS/text/LangSegmenter/langsegmenter.py:90— LangSegmenter.getTexts has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AccelInference.infer_stream (cyclomatic 29) GPT_SoVITS/Accel/adapter.py:150— AccelInference.infer_stream has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DDP.forward (cyclomatic 29) GPT_SoVITS/module/ddp_utils.py:58— DDP.forward has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
streaming.validate_streaming_options (cyclomatic 27) GPT_SoVITS/TTS_infer_pack/streaming.py:9— streaming.validate_streaming_options has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
inference_webui.change_sovits_weights (cyclomatic 27) REDACTED:237— inference_webui.change_sovits_weights has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
korean.hangul_number (cyclomatic 27) GPT_SoVITS/text/korean.py:183— korean.hangul_number has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
api.get_phones_and_bert (cyclomatic 27) REDACTED:547— api.get_phones_and_bert has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ModelRunner.decode_step (cyclomatic 26) GPT_SoVITS/Accel/PyTorch/AR/runner.py:276— ModelRunner.decode_step has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TextPreprocessor.get_phones_and_bert (cyclomatic 26) GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:122— TextPreprocessor.get_phones_and_bert has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
inference_webui.get_phones_and_bert (cyclomatic 26) REDACTED:698— inference_webui.get_phones_and_bert has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Text2SemanticDecoder.infer_panel_batch_infer (cyclomatic 25) GPT_SoVITS/AR/models/t2s_model.py:583— Text2SemanticDecoder.infer_panel_batch_infer has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ToneSandhi._neural_sandhi (cyclomatic 25) GPT_SoVITS/text/tone_sandhi.py:495— ToneSandhi._neural_sandhi has cyclomatic complexity 25 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
Text2SemanticDecoder.infer_panel_naive (cyclomatic 23) GPT_SoVITS/AR/models/t2s_model.py:816— Text2SemanticDecoder.infer_panel_naive has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
streaming.v2_token_chunks (cyclomatic 23) GPT_SoVITS/TTS_infer_pack/streaming.py:141— streaming.v2_token_chunks has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
s2_train._run (cyclomatic 22) GPT_SoVITS/s2_train.py:91— s2_train._run has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
webui.open1abc (cyclomatic 22) REDACTED:1049— webui.open1abc has cyclomatic complexity 22 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ModelRunner.decode_step (cyclomatic 21) GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:208— ModelRunner.decode_step has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TTS.using_vocoder_synthesis_batched_infer (cyclomatic 20) GPT_SoVITS/TTS_infer_pack/TTS.py:1858— TTS.using_vocoder_synthesis_batched_infer has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
s2_train.train_and_evaluate (cyclomatic 20) GPT_SoVITS/s2_train.py:326— s2_train.train_and_evaluate has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
export_torch_script_v3v4.export_1 (cyclomatic 19) GPT_SoVITS/export_torch_script_v3v4.py:707— export_torch_script_v3v4.export_1 has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
stream_v2pro.test_stream (cyclomatic 19) GPT_SoVITS/stream_v2pro.py:240— stream_v2pro.test_stream has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
chinese2._g2p (cyclomatic 19) GPT_SoVITS/text/chinese2.py:180— chinese2._g2p has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
api_v2.tts_handle (cyclomatic 18) REDACTED:429— api_v2.tts_handle has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TTS_Config.__init__ (cyclomatic 17) GPT_SoVITS/TTS_infer_pack/TTS.py:384— TTS_Config.__init__ has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TTS.enable_half_precision (cyclomatic 17) GPT_SoVITS/TTS_infer_pack/TTS.py:783— TTS.enable_half_precision has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
inference_webui_fast.change_sovits_weights (cyclomatic 17) REDACTED:262— inference_webui_fast.change_sovits_weights has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
japanese.pyopenjtalk_g2p_prosody (cyclomatic 17) REDACTED:183— japanese.pyopenjtalk_g2p_prosody has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ToneSandhi._three_sandhi (cyclomatic 16) GPT_SoVITS/text/tone_sandhi.py:586— ToneSandhi._three_sandhi has cyclomatic complexity 16 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
TTS.run (cognitive 226) GPT_SoVITS/TTS_infer_pack/TTS.py:1133— TTS.run has cognitive complexity 226 (threshold 15). Drivers by points: if/else 55 (107 pts), ternaries 23 (67 pts), boolean chains 28, loops 8 (23 pts), error handling 1 (nesting depth added 111). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
inference_webui.get_tts_wav (cognitive 156) REDACTED:878— inference_webui.get_tts_wav has cognitive complexity 156 (threshold 15). Drivers by points: if/else 51 (94 pts), ternaries 12 (35 pts), loops 7 (16 pts), boolean chains 6, error handling 1 (5 pts) (nesting depth added 79). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
api.get_tts_wav (cognitive 135) REDACTED:854— api.get_tts_wav has cognitive complexity 135 (threshold 15). Drivers by points: if/else 44 (89 pts), ternaries 12 (32 pts), loops 3 (8 pts), error handling 1 (4 pts), boolean chains 2 (nesting depth added 73). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
LangSegmenter.getTexts (cognitive 85) GPT_SoVITS/text/LangSegmenter/langsegmenter.py:90— LangSegmenter.getTexts has cognitive complexity 85 (threshold 15). Drivers by points: if/else 29 (72 pts), loops 5 (10 pts), boolean chains 3 (nesting depth added 48). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
streaming.stream_v5_windows (cognitive 79) GPT_SoVITS/TTS_infer_pack/streaming.py:210— streaming.stream_v5_windows has cognitive complexity 79 (threshold 15). Drivers by points: if/else 20 (48 pts), ternaries 8 (21 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
patched_mha_with_cache.multi_head_attention_forward_patched (cognitive 76) GPT_SoVITS/AR/modules/patched_mha_with_cache.py:13— patched_mha_with_cache.multi_head_attention_forward_patched has cognitive complexity 76 (threshold 15). Drivers by points: if/else 49 (71 pts), boolean chains 5 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
chinese2._g2p (cognitive 64) GPT_SoVITS/text/chinese2.py:180— chinese2._g2p has cognitive complexity 64 (threshold 15). Drivers by points: if/else 17 (49 pts), loops 5 (13 pts), ternaries 1 (2 pts) (nesting depth added 41). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
DDP.forward (cognitive 57) GPT_SoVITS/module/ddp_utils.py:58— DDP.forward has cognitive complexity 57 (threshold 15). Drivers by points: if/else 22 (43 pts), boolean chains 8, loops 2 (6 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
streaming.v2_token_chunks (cognitive 56) GPT_SoVITS/TTS_infer_pack/streaming.py:141— streaming.v2_token_chunks has cognitive complexity 56 (threshold 15). Drivers by points: if/else 13 (36 pts), ternaries 4 (12 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AccelInference.infer_stream (cognitive 53) GPT_SoVITS/Accel/adapter.py:150— AccelInference.infer_stream has cognitive complexity 53 (threshold 15). Drivers by points: if/else 17 (36 pts), ternaries 3 (8 pts), boolean chains 6, error handling 1 (2 pts), loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Text2SemanticDecoder.infer_panel_batch_infer (cognitive 49) GPT_SoVITS/AR/models/t2s_model.py:583— Text2SemanticDecoder.infer_panel_batch_infer has cognitive complexity 49 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 6 (14 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
s2_train.train_and_evaluate (cognitive 47) GPT_SoVITS/s2_train.py:326— s2_train.train_and_evaluate has cognitive complexity 47 (threshold 15). Drivers by points: if/else 20 (37 pts), error handling 1 (4 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
webui.open1abc (cognitive 46) REDACTED:1049— webui.open1abc has cognitive complexity 46 (threshold 15). Drivers by points: loops 10 (28 pts), if/else 6 (9 pts), boolean chains 4, ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 24). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Text2SemanticDecoder.infer_panel_naive (cognitive 41) GPT_SoVITS/AR/models/t2s_model.py:816— Text2SemanticDecoder.infer_panel_naive has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (31 pts), boolean chains 5, ternaries 1 (4 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MultiheadAttention.forward (cognitive 41) GPT_SoVITS/AR/modules/activation.py:204— MultiheadAttention.forward has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 11, ternaries 3 (9 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
inference_webui.change_sovits_weights (cognitive 41) REDACTED:237— inference_webui.change_sovits_weights has cognitive complexity 41 (threshold 15). Drivers by points: if/else 22 (26 pts), ternaries 7 (10 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
api.get_phones_and_bert (cognitive 40) REDACTED:547— api.get_phones_and_bert has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 8 (15 pts), boolean chains 4, ternaries 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextPreprocessor.get_phones_and_bert (cognitive 39) GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:122— TextPreprocessor.get_phones_and_bert has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 8 (15 pts), boolean chains 4 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
inference_webui.get_phones_and_bert (cognitive 39) REDACTED:698— inference_webui.get_phones_and_bert has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 8 (15 pts), boolean chains 4 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ModelRunner.decode_step (cognitive 36) GPT_SoVITS/Accel/PyTorch/AR/runner.py:276— ModelRunner.decode_step has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (27 pts), boolean chains 4, loops 3, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
chinese._g2p (cognitive 34) GPT_SoVITS/text/chinese.py:94— chinese._g2p has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 3 (5 pts) (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
T2SEngine._background_loop (cognitive 33) GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py:298— T2SEngine._background_loop has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 5 (11 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
s2_train._run (cognitive 33) GPT_SoVITS/s2_train.py:91— s2_train._run has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 4 (8 pts), loops 3, boolean chains 2, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
my_model_ckpt.on_train_epoch_end (cognitive 30) GPT_SoVITS/s1_train.py:46— my_model_ckpt.on_train_epoch_end has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (8 pts), error handling 1 (5 pts), boolean chains 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
s2_train_v3_lora.train_and_evaluate (cognitive 30) GPT_SoVITS/s2_train_v3_lora.py:270— s2_train_v3_lora.train_and_evaluate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
dataset.prepare_onnx_input (cognitive 29) GPT_SoVITS/text/g2pw/dataset.py:31— dataset.prepare_onnx_input has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (18 pts), ternaries 3 (7 pts), error handling 1 (3 pts), loops 1 (nesting depth added 12). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
ModelRunner.decode_step (cognitive 28) GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:208— ModelRunner.decode_step has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (23 pts), loops 3, boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cantonese.jyuping_to_initials_finals_tones (cognitive 28) GPT_SoVITS/text/cantonese.py:118— cantonese.jyuping_to_initials_finals_tones has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (5 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TTS.enable_half_precision (cognitive 27) GPT_SoVITS/TTS_infer_pack/TTS.py:783— TTS.enable_half_precision has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
streaming.validate_streaming_options (cognitive 27) GPT_SoVITS/TTS_infer_pack/streaming.py:9— streaming.validate_streaming_options has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 12, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ToneSandhi._three_sandhi (cognitive 27) GPT_SoVITS/text/tone_sandhi.py:586— ToneSandhi._three_sandhi has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
ScaledAdam._get_clipping_scale (cognitive 25) GPT_SoVITS/AR/modules/optim.py:279— ScaledAdam._get_clipping_scale has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 2 (3 pts), error handling 1 (2 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 9). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
TTS.to_batch (cognitive 25) GPT_SoVITS/TTS_infer_pack/TTS.py:956— TTS.to_batch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 6 (11 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
inference_webui_fast.change_sovits_weights (cognitive 25) REDACTED:262— inference_webui_fast.change_sovits_weights has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 7 (10 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stream_v2pro.test_stream (cognitive 25) GPT_SoVITS/stream_v2pro.py:240— stream_v2pro.test_stream has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (20 pts), loops 3, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TTS.using_vocoder_synthesis_batched_infer (cognitive 24) GPT_SoVITS/TTS_infer_pack/TTS.py:1858— TTS.using_vocoder_synthesis_batched_infer has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 6, loops 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
export_torch_script_v3v4.export_1 (cognitive 24) GPT_SoVITS/export_torch_script_v3v4.py:707— export_torch_script_v3v4.export_1 has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (16 pts), ternaries 7, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
CFM.inference (cognitive 24) GPT_SoVITS/module/models.py:1121— CFM.inference has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 5 (9 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.get_weights_names (cognitive 24) config.py:100— config.get_weights_names has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 6 (8 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
s2_train_v3.train_and_evaluate (cognitive 23) GPT_SoVITS/s2_train_v3.py:285— s2_train_v3.train_and_evaluate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
api_v2.tts_handle (cognitive 23) REDACTED:429— api_v2.tts_handle has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
T2SEngine._background_loop (cognitive 22) GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:296— T2SEngine._background_loop has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (9 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Text2SemanticDecoder.infer (cognitive 21) GPT_SoVITS/AR/models/t2s_model_onnx.py:337— Text2SemanticDecoder.infer has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
korean.hangul_number (cognitive 21) GPT_SoVITS/text/korean.py:183— korean.hangul_number has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
api.get_sovits_weights (cognitive 21) REDACTED:389— api.get_sovits_weights has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (18 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AccelInference.infer_batch (cognitive 20) GPT_SoVITS/Accel/adapter.py:85— AccelInference.infer_batch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (7 pts), ternaries 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TTS.audio_postprocess (cognitive 20) GPT_SoVITS/TTS_infer_pack/TTS.py:1724— TTS.audio_postprocess has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
s2_train_v3_lora._run (cognitive 20) GPT_SoVITS/s2_train_v3_lora.py:92— s2_train_v3_lora._run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3, ternaries 2, boolean chains 1, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
japanese.pyopenjtalk_g2p_prosody (cognitive 20) REDACTED:183— japanese.pyopenjtalk_g2p_prosody has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 5, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TTS.init_vits_weights (cognitive 19) GPT_SoVITS/TTS_infer_pack/TTS.py:579— TTS.init_vits_weights has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
TextPreprocessor.pre_seg_text (cognitive 19) GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:77— TextPreprocessor.pre_seg_text has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (5 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextAudioSpeakerLoader.__init__ (cognitive 19) GPT_SoVITS/module/data_utils.py:24— TextAudioSpeakerLoader.__init__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 3 (4 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
s2_train_v3._run (cognitive 19) GPT_SoVITS/s2_train_v3.py:91— s2_train_v3._run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (4 pts), loops 2, boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ToneSandhi._neural_sandhi (cognitive 19) GPT_SoVITS/text/tone_sandhi.py:495— ToneSandhi._neural_sandhi has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, if/else 3 (5 pts), loops 2 (nesting depth added 2). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
Text2SemanticDataset.init_batch (cognitive 18) GPT_SoVITS/AR/data/dataset.py:117— Text2SemanticDataset.init_batch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ToneSandhi._merge_yi (cognitive 18) GPT_SoVITS/text/tone_sandhi.py:651— ToneSandhi._merge_yi has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, ternaries 1 (3 pts), loops 2 (nesting depth added 7). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
DistributedBucketSampler.__init__ (cognitive 17) GPT_SoVITS/AR/data/bucket_sampler.py:29— DistributedBucketSampler.__init__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TTS_Config.__init__ (cognitive 17) GPT_SoVITS/TTS_infer_pack/TTS.py:384— TTS_Config.__init__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DiT.forward (cognitive 17) GPT_SoVITS/f5_tts/model/backbones/dit.py:157— DiT.forward has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cleaner.clean_text (cognitive 16) GPT_SoVITS/text/cleaner.py:21— cleaner.clean_text has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
en_G2p.qryword (cognitive 16) REDACTED:309— en_G2p.qryword has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_G2PWBaseOnnxConverter._prepare_data (cognitive 16) GPT_SoVITS/text/g2pw/onnx_api.py:248— _G2PWBaseOnnxConverter._prepare_data has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (6 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Change coupling: REDACTED ↔ REDACTED REDACTED:1— `REDACTED` and `REDACTED` change together 57% of the time (12 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `59c44686` feat: add cache-dit (DBCache) block caching to the DiT sampler (#2868); `04a44eb9` Sync 20261031 v5 code update and remove unused v5_inference module; `ac846f5b` Add v5 inference support to CUDA graph acceleration branch — run `git show` on any of them.
D4 · Code Duplication· Near-duplicate member family (5 members, 26 shared lines) · ×1
Near-duplicate member family (5 members, 26 shared lines) GPT_SoVITS/module/models.py:860— GPT_SoVITS/module/models.py:860-933 | GPT_SoVITS/module/models.py:1269-1326 | GPT_SoVITS/module/models.py:1419-1478 | GPT_SoVITS/module/models_onnx.py:799-877 | GPT_SoVITS/module/models_onnx.py:1009-1063 — These 5 members are variants of one another: a block of 26 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 35 shared lines) · ×1
Near-duplicate member family (4 members, 35 shared lines) GPT_SoVITS/module/data_utils.py:200— GPT_SoVITS/module/data_utils.py:200-276 | GPT_SoVITS/module/data_utils.py:448-514 | GPT_SoVITS/module/data_utils.py:667-725 | GPT_SoVITS/module/data_utils.py:897-972 — These 4 members are variants of one another: a block of 35 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Near-duplicate member pair (100 shared lines) GPT_SoVITS/s2_train.py:92— GPT_SoVITS/s2_train.py:92-323 | GPT_SoVITS/s2_train_v3.py:92-282 — These two members are variants of one another: 100 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (80 shared lines) GPT_SoVITS/s2_train.py:327— GPT_SoVITS/s2_train.py:327-587 | GPT_SoVITS/s2_train_v3.py:297-473 — These two members are variants of one another: 80 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (36 shared lines) GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:209— GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:209-324 | GPT_SoVITS/Accel/PyTorch/AR/runner.py:277-407 — These two members are variants of one another: 36 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (64 corresponding lines) · ×1
Edited copy of a member (64 corresponding lines) REDACTED:699— REDACTED:699-764 | REDACTED:548-611 — These two members are one piece of code written twice and then edited apart: 64 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (70 corresponding lines) · ×1
Edited copy of a member (70 corresponding lines) GPT_SoVITS/export_torch_script.py:637— GPT_SoVITS/export_torch_script.py:637-706 | GPT_SoVITS/export_torch_script.py:720-824 — These two members are one piece of code written twice and then edited apart: 70 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (85 corresponding lines) · ×1
Edited copy of a member (85 corresponding lines) GPT_SoVITS/AR/modules/activation.py:94— GPT_SoVITS/AR/modules/activation.py:94-178 | GPT_SoVITS/AR/modules/activation_onnx.py:35-128 — These two members are one piece of code written twice and then edited apart: 85 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (63 corresponding lines) · ×1
Edited copy of a member (63 corresponding lines) REDACTED:507— REDACTED:507-574 | REDACTED:604-666 — These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (51 corresponding lines) · ×1
Edited copy of a member (51 corresponding lines) GPT_SoVITS/AR/models/t2s_model.py:356— GPT_SoVITS/AR/models/t2s_model.py:356-406 | GPT_SoVITS/AR/models/t2s_model.py:451-510 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (50 corresponding lines) · ×1
Edited copy of a member (50 corresponding lines) GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:326— GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:326-375 | GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py:372-428 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (45 corresponding lines) · ×1
Edited copy of a member (45 corresponding lines) GPT_SoVITS/Accel/PyTorch/AR/export.py:329— GPT_SoVITS/Accel/PyTorch/AR/export.py:329-373 | GPT_SoVITS/Accel/PyTorch/AR/export.py:377-429 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 31+ corresponding lines) · ×1
Edited copies of one member (4 members, 31+ corresponding lines) GPT_SoVITS/AR/models/t2s_model.py:142— GPT_SoVITS/AR/models/t2s_model.py:142-174 | GPT_SoVITS/AR/models/t2s_model.py:184-221 | GPT_SoVITS/export_torch_script.py:248-279 | GPT_SoVITS/export_torch_script.py:282-312 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 31 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (46 corresponding lines) · ×1
Edited copy of a member (46 corresponding lines) GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:249— GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:249-294 | GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py:246-295 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×1
Edited copy of a member (34 corresponding lines) GPT_SoVITS/module/mel_processing.py:41— GPT_SoVITS/module/mel_processing.py:41-74 | GPT_SoVITS/module/mel_processing.py:94-143 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (43 corresponding lines) · ×1
Edited copy of a member (43 corresponding lines) GPT_SoVITS/export_torch_script_v3v4.py:258— GPT_SoVITS/export_torch_script_v3v4.py:258-300 | GPT_SoVITS/export_torch_script_v3v4.py:338-380 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (42 corresponding lines) · ×1
Edited copy of a member (42 corresponding lines) GPT_SoVITS/module/attentions.py:528— GPT_SoVITS/module/attentions.py:528-569 | GPT_SoVITS/module/attentions_onnx.py:49-97 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (44 corresponding lines) · ×1
Edited copy of a member (44 corresponding lines) GPT_SoVITS/module/models.py:170— GPT_SoVITS/module/models.py:170-213 | GPT_SoVITS/module/models_onnx.py:162-205 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 21+ corresponding lines) · ×1
Edited copies of one member (3 members, 21+ corresponding lines) GPT_SoVITS/Accel/MLX/AR/backends/mlx_varlen.py:24— GPT_SoVITS/Accel/MLX/AR/backends/mlx_varlen.py:24-44 | GPT_SoVITS/Accel/PyTorch/AR/backends/torch_varlen.py:32-54 | GPT_SoVITS/Accel/PyTorch/AR/export.py:103-127 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×1
Edited copy of a member (30 corresponding lines) GPT_SoVITS/Accel/MLX/G2PW/model.py:175— GPT_SoVITS/Accel/MLX/G2PW/model.py:175-204 | GPT_SoVITS/Accel/PyTorch/G2PW/model.py:175-206 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×1
Edited copies of one member (3 members, 12+ corresponding lines) GPT_SoVITS/Accel/MLX/AR/backends/mlx_static.py:24— GPT_SoVITS/Accel/MLX/AR/backends/mlx_static.py:24-44 | GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:187-207 | GPT_SoVITS/Accel/MLX/G2PW/model.py:33-44 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×1
Edited copy of a member (18 corresponding lines) GPT_SoVITS/AR/models/t2s_model_onnx.py:318— GPT_SoVITS/AR/models/t2s_model_onnx.py:318-335 | GPT_SoVITS/onnx_export.py:107-130 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×1
Edited copies of one member (3 members, 14+ corresponding lines) GPT_SoVITS/TTS_infer_pack/TTS.py:1098— GPT_SoVITS/TTS_infer_pack/TTS.py:1098-1130 | REDACTED:862-875 | REDACTED:833-851 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×1
Edited copy of a member (25 corresponding lines) GPT_SoVITS/AR/models/utils.py:17— GPT_SoVITS/AR/models/utils.py:17-41 | GPT_SoVITS/AR/models/utils.py:45-74 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 13+ corresponding lines) · ×1
Edited copies of one member (5 members, 13+ corresponding lines) REDACTED:764— REDACTED:764-776 | REDACTED:853-865 | REDACTED:944-956 | REDACTED:1030-1042 | REDACTED:1252-1264 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 6+ corresponding lines) · ×1
Edited copies of one member (4 members, 6+ corresponding lines) GPT_SoVITS/Accel/PyTorch/AR/backends/flash_attn_varlen_cuda_graph.py:55— GPT_SoVITS/Accel/PyTorch/AR/backends/flash_attn_varlen_cuda_graph.py:55-60 | GPT_SoVITS/Accel/PyTorch/AR/backends/torch_static_cuda_graph.py:53-58 | GPT_SoVITS/Accel/PyTorch/AR/backends/torch_varlen.py:59-64 | GPT_SoVITS/Accel/PyTorch/AR/export.py:132-137 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×1
Edited copies of one member (3 members, 7+ corresponding lines) GPT_SoVITS/Accel/MLX/AR/backends/mlx_static.py:93— GPT_SoVITS/Accel/MLX/AR/backends/mlx_static.py:93-103 | GPT_SoVITS/Accel/MLX/AR/backends/mlx_varlen.py:93-99 | GPT_SoVITS/Accel/PyTorch/AR/backends/torch_static_cuda_graph.py:86-104 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 4+ corresponding lines) · ×1
Edited copies of one member (5 members, 4+ corresponding lines) GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:236— GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:236-239 | GPT_SoVITS/text/chinese.py:70-73 | GPT_SoVITS/text/chinese2.py:317-320 | REDACTED:125-128 | REDACTED:139-142 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×1
Edited copies of one member (3 members, 11+ corresponding lines) GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:235— GPT_SoVITS/Accel/MLX/AR/t2s_model_abc_mlx.py:235-245 | GPT_SoVITS/Accel/PyTorch/AR/export.py:153-164 | GPT_SoVITS/Accel/PyTorch/AR/t2s_model_abc.py:296-307 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 4+ corresponding lines) · ×1
Edited copies of one member (6 members, 4+ corresponding lines) GPT_SoVITS/TTS_infer_pack/TTS.py:211— GPT_SoVITS/TTS_infer_pack/TTS.py:211-214 | GPT_SoVITS/export_torch_script.py:177-180 | GPT_SoVITS/export_torch_script_v3v4.py:568-571 | REDACTED:209-212 | GPT_SoVITS/onnx_export.py:58-61 | REDACTED:630-633 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 2+ corresponding lines) · ×1
Edited copies of one member (3 members, 2+ corresponding lines) GPT_SoVITS/AR/models/t2s_model_onnx.py:77— GPT_SoVITS/AR/models/t2s_model_onnx.py:77-78 | GPT_SoVITS/AR/models/utils.py:143-144 | GPT_SoVITS/export_torch_script.py:109-110 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (2 corresponding lines) · ×1
Edited copy of a member (2 corresponding lines) GPT_SoVITS/AR/modules/transformer.py:329— GPT_SoVITS/AR/modules/transformer.py:329-330 | GPT_SoVITS/AR/modules/transformer_onnx.py:248-249 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (69–86 lines × 2) GPT_SoVITS/s2_train_v3.py:297— GPT_SoVITS/s2_train_v3.py:297-382 | GPT_SoVITS/s2_train_v3_lora.py:271-339 — before extracting anything, compare `GPT_SoVITS/s2_train_v3.py` and `GPT_SoVITS/s2_train_v3_lora.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/s2_train_v3.py:297` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (59 lines × 2) GPT_SoVITS/text/chinese.py:110— GPT_SoVITS/text/chinese.py:110-168 | GPT_SoVITS/text/chinese2.py:244-302 — before extracting anything, compare `GPT_SoVITS/text/chinese.py` and `GPT_SoVITS/text/chinese2.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (37–54 lines × 2) GPT_SoVITS/AR/modules/transformer.py:197— GPT_SoVITS/AR/modules/transformer.py:197-250 | GPT_SoVITS/AR/modules/transformer_onnx.py:169-205 — before extracting anything, compare `GPT_SoVITS/AR/modules/transformer.py` and `GPT_SoVITS/AR/modules/transformer_onnx.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 105 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: `MultiheadAttention` names `AR.modules.activation` in one and `AR.modules.activation_onnx` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (46–49 lines × 2) GPT_SoVITS/AR/models/t2s_model.py:356— GPT_SoVITS/AR/models/t2s_model.py:356-404 | GPT_SoVITS/AR/models/t2s_model.py:455-500 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (46 lines × 3) GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:124— GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:124-169 | REDACTED:699-744 | REDACTED:548-593 — before extracting anything, compare `GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (39 lines × 2) GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:256— GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:256-294 | GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py:257-295 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py` and `GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py:297` calls `inference_mode` and `GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:296` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (37–38 lines × 2) REDACTED:246— REDACTED:246-283 | REDACTED:268-304 — before extracting anything, compare `REDACTED` and `REDACTED` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:246` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (35–37 lines × 2) GPT_SoVITS/AR/modules/activation.py:142— GPT_SoVITS/AR/modules/activation.py:142-178 | GPT_SoVITS/AR/modules/activation_onnx.py:94-128 — before extracting anything, compare `GPT_SoVITS/AR/modules/activation.py` and `GPT_SoVITS/AR/modules/activation_onnx.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/AR/modules/activation.py:142` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–37 lines × 2) GPT_SoVITS/s2_train_v3.py:225— GPT_SoVITS/s2_train_v3.py:225-261 | GPT_SoVITS/s2_train_v3_lora.py:230-247 — before extracting anything, compare `GPT_SoVITS/s2_train_v3.py` and `GPT_SoVITS/s2_train_v3_lora.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/s2_train_v3.py:225` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (35 lines × 2) GPT_SoVITS/AR/models/t2s_lightning_module.py:47— GPT_SoVITS/AR/models/t2s_lightning_module.py:47-81 | GPT_SoVITS/AR/models/t2s_lightning_module_onnx.py:45-79 — before extracting anything, compare `GPT_SoVITS/AR/models/t2s_lightning_module.py` and `GPT_SoVITS/AR/models/t2s_lightning_module_onnx.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/AR/models/t2s_lightning_module.py:47` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (63–71 lines × 2) GPT_SoVITS/s2_train.py:518— GPT_SoVITS/s2_train.py:518-580 | GPT_SoVITS/s2_train_v3.py:397-467 — before extracting anything, compare `GPT_SoVITS/s2_train.py` and `GPT_SoVITS/s2_train_v3.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 253 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/s2_train.py:518` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–33 lines × 2) GPT_SoVITS/s2_train_v3.py:384— GPT_SoVITS/s2_train_v3.py:384-416 | GPT_SoVITS/s2_train_v3_lora.py:341-356 — before extracting anything, compare `GPT_SoVITS/s2_train_v3.py` and `GPT_SoVITS/s2_train_v3_lora.py` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 268 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/s2_train_v3.py:384` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (29–31 lines × 2) GPT_SoVITS/module/data_utils.py:397— GPT_SoVITS/module/data_utils.py:397-427 | GPT_SoVITS/module/data_utils.py:846-874 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (56 lines × 4) GPT_SoVITS/module/data_utils.py:52— GPT_SoVITS/module/data_utils.py:52-107 | GPT_SoVITS/module/data_utils.py:306-361 | GPT_SoVITS/module/data_utils.py:544-599 | GPT_SoVITS/module/data_utils.py:755-810 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/module/data_utils.py:52` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `GPT_SoVITS/module/data_utils.py:50` calls `list`, `set` and `GPT_SoVITS/module/data_utils.py:304` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (30 lines × 3) GPT_SoVITS/s2_train.py:292— GPT_SoVITS/s2_train.py:292-321 | GPT_SoVITS/s2_train_v3.py:251-280 | GPT_SoVITS/s2_train_v3_lora.py:237-266 — before extracting anything, compare `GPT_SoVITS/s2_train.py` and `GPT_SoVITS/s2_train_v3.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 253 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `GPT_SoVITS/s2_train.py:322` calls `step` and `GPT_SoVITS/s2_train_v3_lora.py:267` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (28 lines × 2) GPT_SoVITS/s2_train.py:229— GPT_SoVITS/s2_train.py:229-256 | GPT_SoVITS/s2_train_v3.py:198-225 — before extracting anything, compare `GPT_SoVITS/s2_train.py` and `GPT_SoVITS/s2_train_v3.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 253 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (25–26 lines × 2) REDACTED:971— REDACTED:971-996 | REDACTED:1181-1205 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (23–25 lines × 6) REDACTED:792— REDACTED:792-815 | REDACTED:881-905 | REDACTED:976-999 | REDACTED:1076-1099 | REDACTED:1123-1146 | REDACTED:1186-1208 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:792` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21–25 lines × 2) GPT_SoVITS/AR/models/t2s_model.py:298— GPT_SoVITS/AR/models/t2s_model.py:298-322 | GPT_SoVITS/AR/models/t2s_model_onnx.py:268-288 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/AR/models/t2s_model.py:298` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–24 lines × 3) GPT_SoVITS/s2_train.py:516— GPT_SoVITS/s2_train.py:516-529 | GPT_SoVITS/s2_train_v3.py:395-418 | GPT_SoVITS/s2_train_v3_lora.py:344-357 — before extracting anything, compare `GPT_SoVITS/s2_train.py` and `GPT_SoVITS/s2_train_v3.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 253 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/s2_train.py:516` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (22–24 lines × 2) GPT_SoVITS/AR/modules/activation.py:94— GPT_SoVITS/AR/modules/activation.py:94-115 | GPT_SoVITS/AR/modules/activation_onnx.py:35-58 — before extracting anything, compare `GPT_SoVITS/AR/modules/activation.py` and `GPT_SoVITS/AR/modules/activation_onnx.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/AR/modules/activation.py:94` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (24 lines × 2) REDACTED:907— REDACTED:907-930 | REDACTED:1148-1171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:907` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–22 lines × 4) GPT_SoVITS/module/data_utils.py:233— GPT_SoVITS/module/data_utils.py:233-250 | GPT_SoVITS/module/data_utils.py:490-511 | GPT_SoVITS/module/data_utils.py:701-722 | GPT_SoVITS/module/data_utils.py:938-959 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `GPT_SoVITS/module/data_utils.py:231` calls `FloatTensor` and `GPT_SoVITS/module/data_utils.py:487` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (21–22 lines × 2) GPT_SoVITS/export_torch_script.py:637— GPT_SoVITS/export_torch_script.py:637-657 | GPT_SoVITS/export_torch_script.py:723-744 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (19–21 lines × 2) GPT_SoVITS/AR/models/t2s_model.py:333— GPT_SoVITS/AR/models/t2s_model.py:333-353 | GPT_SoVITS/export_torch_script.py:416-434 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/AR/models/t2s_model.py:333` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–20 lines × 2) GPT_SoVITS/module/models.py:908— GPT_SoVITS/module/models.py:908-918 | GPT_SoVITS/module/models_onnx.py:838-857 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/module/models.py:908` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 3) GPT_SoVITS/s2_train.py:54— GPT_SoVITS/s2_train.py:54-72 | GPT_SoVITS/s2_train_v3.py:54-72 | GPT_SoVITS/s2_train_v3_lora.py:55-73 — before extracting anything, compare `GPT_SoVITS/s2_train.py` and `GPT_SoVITS/s2_train_v3.py` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 253 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18 lines × 5) GPT_SoVITS/module/models.py:860— GPT_SoVITS/module/models.py:860-877 | GPT_SoVITS/module/models.py:1269-1286 | GPT_SoVITS/module/models.py:1419-1436 | GPT_SoVITS/module/models_onnx.py:799-816 | GPT_SoVITS/module/models_onnx.py:1009-1026 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 2) GPT_SoVITS/stream_v2pro.py:289— GPT_SoVITS/stream_v2pro.py:289-306 | GPT_SoVITS/stream_v2pro.py:489-506 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 3) GPT_SoVITS/AR/modules/activation.py:364— GPT_SoVITS/AR/modules/activation.py:364-380 | GPT_SoVITS/AR/modules/activation.py:390-406 | GPT_SoVITS/AR/modules/activation_onnx.py:168-184 — before extracting anything, compare `GPT_SoVITS/AR/modules/activation.py` and `GPT_SoVITS/AR/modules/activation_onnx.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12–17 lines × 2) GPT_SoVITS/AR/modules/patched_mha_with_cache.py:266— GPT_SoVITS/AR/modules/patched_mha_with_cache.py:266-282 | GPT_SoVITS/AR/modules/patched_mha_with_cache_onnx.py:57-68 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (45 lines × 2) GPT_SoVITS/module/models.py:71— GPT_SoVITS/module/models.py:71-115 | GPT_SoVITS/module/models_onnx.py:65-109 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10–15 lines × 6) GPT_SoVITS/module/models.py:343— GPT_SoVITS/module/models.py:343-357 | GPT_SoVITS/module/models.py:378-387 | GPT_SoVITS/module/models.py:412-426 | GPT_SoVITS/module/models_onnx.py:285-299 | GPT_SoVITS/module/models_onnx.py:320-329 | GPT_SoVITS/module/models_onnx.py:354-368 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/module/models.py:343` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12–15 lines × 4) GPT_SoVITS/export_torch_script_v3v4.py:736— GPT_SoVITS/export_torch_script_v3v4.py:736-750 | GPT_SoVITS/export_torch_script_v3v4.py:947-961 | GPT_SoVITS/export_torch_script_v3v4.py:1065-1079 | REDACTED:913-924 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/export_torch_script_v3v4.py:736` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 3) GPT_SoVITS/AR/models/t2s_model.py:867— GPT_SoVITS/AR/models/t2s_model.py:867-881 | GPT_SoVITS/export_torch_script.py:480-494 | GPT_SoVITS/stream_v2pro.py:52-66 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/AR/models/t2s_model.py:867` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (4–15 lines × 3) GPT_SoVITS/AR/models/t2s_model_onnx.py:35— GPT_SoVITS/AR/models/t2s_model_onnx.py:35-49 | GPT_SoVITS/AR/models/utils.py:159-170 | GPT_SoVITS/export_torch_script.py:85-88 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/AR/models/t2s_model_onnx.py:35` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `GPT_SoVITS/AR/models/t2s_model_onnx.py:34` calls `squeeze` and `GPT_SoVITS/AR/models/utils.py:154` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (54 lines × 2) GPT_SoVITS/TTS_infer_pack/TTS.py:61— GPT_SoVITS/TTS_infer_pack/TTS.py:61-114 | REDACTED:548-601 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/TTS_infer_pack/TTS.py:61` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12–13 lines × 2) GPT_SoVITS/export_torch_script.py:740— GPT_SoVITS/export_torch_script.py:740-751 | GPT_SoVITS/stream_v2pro.py:256-268 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/export_torch_script.py:740` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–12 lines × 3) GPT_SoVITS/export_torch_script_v3v4.py:593— GPT_SoVITS/export_torch_script_v3v4.py:593-602 | REDACTED:294-305 | REDACTED:399-408 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:294` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–12 lines × 3) GPT_SoVITS/module/data_utils.py:403— GPT_SoVITS/module/data_utils.py:403-414 | GPT_SoVITS/module/data_utils.py:636-642 | GPT_SoVITS/module/data_utils.py:852-863 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/module/data_utils.py:403` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–11 lines × 2) GPT_SoVITS/Accel/MLX/G2PW/model.py:20— GPT_SoVITS/Accel/MLX/G2PW/model.py:20-30 | GPT_SoVITS/Accel/PyTorch/G2PW/model.py:21-30 — before extracting anything, compare `GPT_SoVITS/Accel/MLX/G2PW/model.py` and `GPT_SoVITS/Accel/PyTorch/G2PW/model.py` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9–10 lines × 4) GPT_SoVITS/module/models.py:918— GPT_SoVITS/module/models.py:918-926 | GPT_SoVITS/module/models.py:1302-1310 | GPT_SoVITS/module/models.py:1460-1468 | GPT_SoVITS/module/models_onnx.py:1042-1051 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12–19 lines × 4) GPT_SoVITS/module/data_utils.py:200— GPT_SoVITS/module/data_utils.py:200-211 | GPT_SoVITS/module/data_utils.py:448-466 | GPT_SoVITS/module/data_utils.py:667-679 | GPT_SoVITS/module/data_utils.py:897-915 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/module/data_utils.py:200` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `GPT_SoVITS/module/data_utils.py:213` calls `max`, `size` and `GPT_SoVITS/module/data_utils.py:683` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 4) GPT_SoVITS/module/models.py:583— GPT_SoVITS/module/models.py:583-591 | GPT_SoVITS/module/models.py:613-621 | GPT_SoVITS/module/models_onnx.py:525-533 | GPT_SoVITS/module/models_onnx.py:555-563 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7–9 lines × 3) GPT_SoVITS/TTS_infer_pack/TTS.py:1842— GPT_SoVITS/TTS_infer_pack/TTS.py:1842-1850 | REDACTED:1127-1133 | REDACTED:1057-1063 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `GPT_SoVITS/TTS_infer_pack/TTS.py:1842` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25 lines × 2) GPT_SoVITS/module/models.py:803— GPT_SoVITS/module/models.py:803-827 | GPT_SoVITS/module/models_onnx.py:739-763 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 4) GPT_SoVITS/module/models.py:937— GPT_SoVITS/module/models.py:937-944 | GPT_SoVITS/module/models.py:1002-1009 | GPT_SoVITS/module/models.py:1050-1057 | GPT_SoVITS/module/models_onnx.py:881-888 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8–9 lines × 3) GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:197— GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:197-204 | REDACTED:183-190 | REDACTED:513-521 — before extracting anything, compare `GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py` and `REDACTED` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7–8 lines × 2) GPT_SoVITS/module/data_utils.py:469— GPT_SoVITS/module/data_utils.py:469-476 | GPT_SoVITS/module/data_utils.py:917-923 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 4) GPT_SoVITS/module/data_utils.py:25— GPT_SoVITS/module/data_utils.py:25-31 | GPT_SoVITS/module/data_utils.py:287-293 | GPT_SoVITS/module/data_utils.py:525-531 | GPT_SoVITS/module/data_utils.py:736-742 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9–13 lines × 4) GPT_SoVITS/module/data_utils.py:110— GPT_SoVITS/module/data_utils.py:110-119 | GPT_SoVITS/module/data_utils.py:376-388 | GPT_SoVITS/module/data_utils.py:614-626 | GPT_SoVITS/module/data_utils.py:829-837 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `GPT_SoVITS/module/data_utils.py:838` calls `zeros` and `GPT_SoVITS/module/data_utils.py:390` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 5) GPT_SoVITS/text/cantonese.py:97— GPT_SoVITS/text/cantonese.py:97-103 | GPT_SoVITS/text/chinese.py:49-55 | GPT_SoVITS/text/chinese.py:60-66 | GPT_SoVITS/text/chinese2.py:64-70 | GPT_SoVITS/text/chinese2.py:307-313 — before extracting anything, compare `GPT_SoVITS/text/chinese.py` and `GPT_SoVITS/text/chinese2.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (3–5 lines × 6) GPT_SoVITS/module/models.py:365— GPT_SoVITS/module/models.py:365-367 | GPT_SoVITS/module/models.py:394-396 | GPT_SoVITS/module/models.py:434-438 | GPT_SoVITS/module/models_onnx.py:307-309 | GPT_SoVITS/module/models_onnx.py:336-338 | GPT_SoVITS/module/models_onnx.py:376-380 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (2–5 lines × 3) GPT_SoVITS/module/models.py:1314— GPT_SoVITS/module/models.py:1314-1315 | GPT_SoVITS/module/models.py:1474-1478 | GPT_SoVITS/module/models_onnx.py:1055-1059 — before extracting anything, compare `GPT_SoVITS/module/models.py` and `GPT_SoVITS/module/models_onnx.py` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 559 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `GPT_SoVITS/module/models.py:1474` calls `Conv1d` and `GPT_SoVITS/module/models.py:1314` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 6) GPT_SoVITS/TTS_infer_pack/TTS.py:197— GPT_SoVITS/TTS_infer_pack/TTS.py:197-202 | GPT_SoVITS/export_torch_script.py:163-168 | GPT_SoVITS/export_torch_script_v3v4.py:554-559 | REDACTED:195-200 | GPT_SoVITS/onnx_export.py:44-49 | REDACTED:616-621 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times.
Duplicated block (6 lines × 3) REDACTED:38— REDACTED:38-43 | REDACTED:46-51 | REDACTED:34-39 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Near-duplicate member pair (110 shared lines) tools/uvr5/vr.py:46— tools/uvr5/vr.py:46-187 | tools/uvr5/vr.py:220-350 — These two members are variants of one another: 110 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (105 shared lines) tools/uvr5/bs_roformer/bs_roformer.py:444— tools/uvr5/bs_roformer/bs_roformer.py:444-626 | tools/uvr5/bs_roformer/mel_band_roformer.py:423-606 — These two members are variants of one another: 105 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Duplicated block (62 lines × 2) tools/uvr5/vr.py:46— tools/uvr5/vr.py:46-107 | tools/uvr5/vr.py:220-281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tools/uvr5/vr.py:46` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (49 lines × 2) tools/uvr5/bs_roformer/bs_roformer.py:494— tools/uvr5/bs_roformer/bs_roformer.py:494-542 | tools/uvr5/bs_roformer/mel_band_roformer.py:472-520 — before extracting anything, compare `tools/uvr5/bs_roformer/bs_roformer.py` and `tools/uvr5/bs_roformer/mel_band_roformer.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 294 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (44 lines × 2) tools/my_utils.py:141— tools/my_utils.py:141-184 | tools/my_utils.py:188-231 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (42 lines × 2) tools/uvr5/bs_roformer/bs_roformer.py:585— tools/uvr5/bs_roformer/bs_roformer.py:585-626 | tools/uvr5/bs_roformer/mel_band_roformer.py:565-606 — before extracting anything, compare `tools/uvr5/bs_roformer/bs_roformer.py` and `tools/uvr5/bs_roformer/mel_band_roformer.py` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 294 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (21–23 lines × 2) tools/uvr5/vr.py:286— tools/uvr5/vr.py:286-308 | tools/uvr5/vr.py:321-341 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 4) tools/uvr5/vr.py:136— tools/uvr5/vr.py:136-150 | tools/uvr5/vr.py:173-187 | tools/uvr5/vr.py:303-317 | tools/uvr5/vr.py:336-350 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
No DR/backup evidence — A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced — a volume that survives a container recreate is not a tested restore from catastrophic loss.
Outbound HTTP without resilience GPT_SoVITS/text/g2pw/onnx_api.py:82— `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Duplicated predicate REDACTED:238— `"!" in sovits_path or "!" in sovits_path` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:870— `cfg.enabled and str(getattr(vq_model, "version", "")) == "v5turbo" and not cfg.force` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate GPT_SoVITS/TTS_infer_pack/TTS.py:1114— `cfm is None or not hasattr(cfm, "set_dbcache")` appears character-identically in 3 files — GPT_SoVITS/TTS_infer_pack/TTS.py, REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py:171— `char == "." and i > 0 and i < len(inp) - 1 and inp[i - 1].isdigit() and inp[i + 1].isdigit()` appears character-identically in 2 files — GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate GPT_SoVITS/AR/models/t2s_model.py:558— `early_stop_num != -1 and (y.shape[1] - prefix_len) > early_stop_num` appears character-identically in 4 files — GPT_SoVITS/AR/models/t2s_model.py, GPT_SoVITS/AR/models/t2s_model_onnx.py, GPT_SoVITS/export_torch_script.py, GPT_SoVITS/onnx_export.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate GPT_SoVITS/s2_train.py:522— `epoch % hps.train.save_every_epoch == 0 and rank == 0` appears character-identically in 3 files — GPT_SoVITS/s2_train.py, GPT_SoVITS/s2_train_v3.py, GPT_SoVITS/s2_train_v3_lora.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:89— `eval(os.environ.get("is_half", "True")) and torch.cuda.is_available()` appears character-identically in 6 files — REDACTED, REDACTED, REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate GPT_SoVITS/s2_train.py:243— `hps.train.pretrained_s2G != "" and hps.train.pretrained_s2G != None and os.path.exists(hps.train.pretrained_s2G)` appears character-identically in 3 files — GPT_SoVITS/s2_train.py, GPT_SoVITS/s2_train_v3.py, GPT_SoVITS/s2_train_v3_lora.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:248— `if_lora_v3 == True and is_exist == False` appears character-identically in 3 files — REDACTED, REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:116— `inp_wav_dir != "" and inp_wav_dir != None` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate GPT_SoVITS/TTS_infer_pack/TTS.py:121— `mono and audio.dim() == 2 and audio.shape[0] > 1` appears character-identically in 2 files — GPT_SoVITS/TTS_infer_pack/TTS.py, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:209— `not self.bound_sessions and not self.waiting_bind` appears character-identically in 2 files — GPT_SoVITS/Accel/MLX/AR/runner_mlx.py, GPT_SoVITS/Accel/PyTorch/AR/runner.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate GPT_SoVITS/AR/models/t2s_model_onnx.py:35— `previous_tokens is not None and repetition_penalty != 1.0` appears character-identically in 3 files — GPT_SoVITS/AR/models/t2s_model_onnx.py, GPT_SoVITS/AR/models/utils.py, GPT_SoVITS/export_torch_script.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:256— `prompt_language is not None and text_language is not None` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate GPT_SoVITS/AR/modules/activation.py:345— `query.is_nested or key.is_nested or value.is_nested` appears character-identically in 2 files — GPT_SoVITS/AR/modules/activation.py, GPT_SoVITS/AR/modules/activation_onnx.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate GPT_SoVITS/s2_train.py:565— `rank == 0 and hps.train.if_save_every_weights == True` appears character-identically in 3 files — GPT_SoVITS/s2_train.py, GPT_SoVITS/s2_train_v3.py, GPT_SoVITS/s2_train_v3_lora.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:145— `response.result or T2SResult( status="Error", exception=response.exception, request_id=request.request_id, )` appears character-identically in 2 files — GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py, GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:125— `self._loop_thread is None or not self._loop_thread.is_alive()` appears character-identically in 2 files — GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py, GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate GPT_SoVITS/AR/modules/activation.py:99— `self.kdim == embed_dim and self.vdim == embed_dim` appears character-identically in 2 files — GPT_SoVITS/AR/modules/activation.py, GPT_SoVITS/AR/modules/activation_onnx.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:237— `self.waiting_bind and self.free_slots() > 0` appears character-identically in 2 files — GPT_SoVITS/Accel/MLX/AR/runner_mlx.py, GPT_SoVITS/Accel/PyTorch/AR/runner.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate GPT_SoVITS/Accel/MLX/AR/runner_mlx.py:134— `self.waiting_bind and self.free_slots() >= self.waiting_bind[0].bsz` appears character-identically in 2 files — GPT_SoVITS/Accel/MLX/AR/runner_mlx.py, GPT_SoVITS/Accel/PyTorch/AR/runner.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:236— `session.progress_task is not None and session.progress is not None` appears character-identically in 2 files — GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py, GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py:187— `session.step_count == 0 or session.step_count - session.last_stream_step < session.stream_interval` appears character-identically in 2 files — GPT_SoVITS/Accel/MLX/AR/t2s_engine_mlx.py, GPT_SoVITS/Accel/PyTorch/AR/t2s_engine.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tools/uvr5/bs_roformer/bs_roformer.py:594— `target.ndim == 4 and target.shape[1] == self.num_stems` appears character-identically in 2 files — tools/uvr5/bs_roformer/bs_roformer.py, tools/uvr5/bs_roformer/mel_band_roformer.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:161— `tmp["lang"] != "en" and langlist[-1] != "en"` appears character-identically in 3 files — GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py, REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Interpolated log message defeats structured logging REDACTED:437— `info` at line 437 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging REDACTED:1139— `info` at line 1139 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging REDACTED:1140— `info` at line 1140 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging REDACTED:1141— `info` at line 1141 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging REDACTED:1142— `info` at line 1142 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging REDACTED:1292— `warning` at line 1292 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging REDACTED:1295— `warning` at line 1295 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging REDACTED:1302— `info` at line 1302 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging REDACTED:1303— `info` at line 1303 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging REDACTED:1304— `info` at line 1304 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging REDACTED:1314— `info` at line 1314 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging REDACTED:1330— `info` at line 1330 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging GPT_SoVITS/export_torch_script_v3v4.py:607— `info` at line 607 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging GPT_SoVITS/export_torch_script_v3v4.py:617— `info` at line 617 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging GPT_SoVITS/export_torch_script_v3v4.py:633— `info` at line 633 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging GPT_SoVITS/utils.py:258— `info` at line 258 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging GPT_SoVITS/AR/modules/optim.py:339— `info` at line 339 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging GPT_SoVITS/AR/modules/optim.py:357— `warning` at line 357 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging GPT_SoVITS/AR/modules/optim.py:417— `info` at line 417 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Orphaned file tools/uvr5/bs_roformer/bs_roformer.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file GPT_SoVITS/onnx_export.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file GPT_SoVITS/module/attentions_onnx.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tools/uvr5/bsroformer.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file GPT_SoVITS/AR/models/t2s_model_onnx.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file GPT_SoVITS/inference_gui.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file GPT_SoVITS/text/en_normalization/expend.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file REDACTED:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file GPT_SoVITS/AR/modules/transformer_onnx.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file GPT_SoVITS/TTS_infer_pack/TextPreprocessor.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file GPT_SoVITS/module/ddp_utils.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file GPT_SoVITS/text/LangSegmenter/langsegmenter.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file GPT_SoVITS/AR/modules/activation_onnx.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tools/i18n/scan_i18n.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file GPT_SoVITS/TTS_infer_pack/text_segmentation_method.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file GPT_SoVITS/AR/models/t2s_lightning_module_onnx.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
README/code drift tools/AP_BWE_main/README.md:20— tools/AP_BWE_main/README.md links to `REDACTED`, but `tools/AP_BWE_main/REDACTED` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift tools/AP_BWE_main/README.md:22— tools/AP_BWE_main/README.md links to `VCTK-Corpus-0.92`, but `tools/AP_BWE_main/VCTK-Corpus-0.92` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift tools/AP_BWE_main/README.md:28— tools/AP_BWE_main/README.md links to `VCTK-Corpus-0.92/training.txt`, but `tools/AP_BWE_main/VCTK-Corpus-0.92/training.txt` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift tools/AP_BWE_main/README.md:28— tools/AP_BWE_main/README.md links to `VCTK-Corpus-0.92/test.txt`, but `tools/AP_BWE_main/VCTK-Corpus-0.92/test.txt` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift tools/AP_BWE_main/README.md:59— tools/AP_BWE_main/README.md links to `Figures/model.png`, but `tools/AP_BWE_main/Figures/model.png` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 3 significant file(s) lose their only recent owner: GPT_SoVITS/module/modules.py, GPT_SoVITS/s2_train_v3.py, GPT_SoVITS/AR/modules/patched_mha_with_cache_onnx.py. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 2 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (6 single-owned of 117 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 117 of the 156 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)), anonymized user #3 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: GPT_SoVITS/text/en_normalization/expend.py, GPT_SoVITS/text/LangSegmenter/langsegmenter.py, GPT_SoVITS/inference_cli.py.
No ADRs found REDACTED:4— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `REDACTED` makes this repository a deployable product (line 4).
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 16 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: tools/uvr5/bs_roformer/bs_roformer.py, GPT_SoVITS/onnx_export.py, GPT_SoVITS/module/attentions_onnx.py, tools/uvr5/bsroformer.py, GPT_SoVITS/AR/models/t2s_model_onnx.py, GPT_SoVITS/inference_gui.py, GPT_SoVITS/text/en_normalization/expend.py, REDACTED (and 8 more) (22 orphaned of 117 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 117 of the 156 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation· No architecture diagram/doc · ×1
No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
No src/ separation — Most of the production code is in directories of its own, but 6 application file(s) sit at the repository root beside the build and tooling files (`REDACTED`, `REDACTED`, `config.py`, `test_api_v2_streaming.py`, `test_official_streaming.py` and 1 more).
No SAST — No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 2 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P4 · Deployment & Rollback· No rollback/health safety · ×1
No rollback/health safety — Deployment is orchestrated by compose, but no service declares a `healthcheck:` and nothing pins a previous image to fall back to — the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse.
Silent fallback default in catch GPT_SoVITS/AR/utils/__init__.py:34— `check_txt_file` swallows every exception into `return False` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Outdated: onnxruntime-gpu — `onnxruntime-gpu` is pinned to 1.18.0, but 1.32.0 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 1.18.0 until the declaration is edited.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1d780-82dd-789d-89d6-b4ba54bc4d03 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 47 · Warnings: 573 · Recommendations: 102 · Info: 1 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 00:41 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.