Repository Analysis

modelscope/DiffSynth-Studio

Enjoy the magic of Diffusion models!

8.5 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of modelscope/DiffSynth-Studio, a Python project with 13,016 GitHub stars. SynthScan v2.0 examined 144,880 lines of code across 1394 source files, recording 1082 pattern matches distributed across 18 syntactic categories. The overall adjusted score of 8.5 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

8.5
Adjusted Score
8.5
Raw Score
100%
Time Factor
2026-08-28
Last Push
13.0K
Stars
Python
Language
144.9K
Lines of Code
1.4K
Files
1.1K
Pattern Hits
2026-08-29
Scan Date
0.02
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 1HIGH 22MEDIUM 21LOW 1038

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 1082 distinct pattern matches across 18 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Unused Imports363 hits · 363 pts
SeverityFileLineSnippetContext
LOWdocs/zh/Research_Tutorial/train_from_scratch.py8CODE
LOWdocs/en/Research_Tutorial/train_from_scratch.py8CODE
LOWdiffsynth/__init__.py1CODE
LOWdiffsynth/metrics/__init__.py1CODE
LOWdiffsynth/metrics/__init__.py2CODE
LOWdiffsynth/metrics/__init__.py3CODE
LOWdiffsynth/metrics/__init__.py4CODE
LOWdiffsynth/metrics/__init__.py5CODE
LOWdiffsynth/metrics/__init__.py6CODE
LOWdiffsynth/metrics/__init__.py7CODE
LOWdiffsynth/metrics/__init__.py8CODE
LOWdiffsynth/metrics/__init__.py9CODE
LOWdiffsynth/metrics/__init__.py10CODE
LOWdiffsynth/metrics/__init__.py11CODE
LOWdiffsynth/metrics/__init__.py12CODE
LOWdiffsynth/metrics/__init__.py13CODE
LOWdiffsynth/metrics/__init__.py14CODE
LOWdiffsynth/metrics/lpips.py5CODE
LOWdiffsynth/core/__init__.py1CODE
LOWdiffsynth/core/__init__.py2CODE
LOWdiffsynth/core/__init__.py3CODE
LOWdiffsynth/core/__init__.py4CODE
LOWdiffsynth/core/__init__.py5CODE
LOWdiffsynth/core/__init__.py6CODE
LOWdiffsynth/core/__init__.py7CODE
LOWdiffsynth/core/__init__.py8CODE
LOWdiffsynth/core/gradient/__init__.py1CODE
LOWdiffsynth/core/quant/__init__.py1CODE
LOWdiffsynth/core/quant/__init__.py1CODE
LOWdiffsynth/core/quant/__init__.py1CODE
LOWdiffsynth/core/quant/__init__.py1CODE
LOWdiffsynth/core/quant/__init__.py1CODE
LOWdiffsynth/core/quant/__init__.py1CODE
LOWdiffsynth/core/quant/__init__.py2CODE
LOWdiffsynth/core/quant/__init__.py2CODE
LOWdiffsynth/core/quant/__init__.py2CODE
LOWdiffsynth/core/quant/__init__.py2CODE
LOWdiffsynth/core/quant/__init__.py2CODE
LOWdiffsynth/core/quant/__init__.py2CODE
LOWdiffsynth/core/quant/__init__.py3CODE
LOWdiffsynth/core/attention/__init__.py1CODE
LOWdiffsynth/core/offload_training/__init__.py1CODE
LOWdiffsynth/core/loader/__init__.py1CODE
LOWdiffsynth/core/loader/__init__.py1CODE
LOWdiffsynth/core/loader/__init__.py1CODE
LOWdiffsynth/core/loader/__init__.py2CODE
LOWdiffsynth/core/loader/__init__.py2CODE
LOWdiffsynth/core/loader/__init__.py3CODE
LOWdiffsynth/core/loader/model.py6CODE
LOWdiffsynth/core/vram/__init__.py1CODE
LOWdiffsynth/core/vram/__init__.py2CODE
LOWdiffsynth/core/device/__init__.py1CODE
LOWdiffsynth/core/device/__init__.py1CODE
LOWdiffsynth/core/device/__init__.py1CODE
LOWdiffsynth/core/device/__init__.py1CODE
LOWdiffsynth/core/device/__init__.py2CODE
LOWdiffsynth/core/device/__init__.py2CODE
LOWdiffsynth/core/device/npu_compatible_device.py14CODE
LOWdiffsynth/core/data/__init__.py1CODE
LOWdiffsynth/core/data/unified_dataset.py1CODE
303 more matches not shown…
AI Structural Patterns241 hits · 237 pts
SeverityFileLineSnippetContext
LOWdocs/zh/Research_Tutorial/train_from_scratch.py155CODE
LOWdocs/en/Research_Tutorial/train_from_scratch.py155CODE
LOWdiffsynth/metrics/hpsv3.py15CODE
LOWdiffsynth/metrics/unified_reward_edit.py20CODE
LOWdiffsynth/metrics/qwen_image_bench.py17CODE
LOWdiffsynth/core/attention/attention.py116CODE
LOWdiffsynth/core/attention/attention.py101CODE
LOWdiffsynth/core/attention/attention.py160CODE
LOWdiffsynth/core/attention/attention.py171CODE
LOWdiffsynth/core/attention/attention.py163CODE
LOWdiffsynth/core/attention/attention.py182CODE
LOWdiffsynth/core/attention/attention.py174CODE
LOWdiffsynth/core/attention/attention.py191CODE
LOWdiffsynth/core/attention/attention.py185CODE
LOWdiffsynth/core/attention/attention.py202CODE
LOWdiffsynth/core/attention/attention.py194CODE
LOWdiffsynth/core/attention/attention.py210CODE
LOWdiffsynth/core/attention/attention.py218CODE
LOWdiffsynth/core/attention/attention.py227CODE
LOWdiffsynth/core/attention/attention.py221CODE
LOWdiffsynth/core/attention/attention.py230CODE
LOWdiffsynth/core/loader/model.py11CODE
LOWdiffsynth/core/vram/layers.py10CODE
LOWdiffsynth/core/vram/layers.py38CODE
LOWdiffsynth/core/vram/layers.py95CODE
LOWdiffsynth/core/vram/layers.py214CODE
LOWdiffsynth/core/vram/layers.py296CODE
LOWdiffsynth/core/vram/layers.py375CODE
LOWdiffsynth/core/vram/layers.py446CODE
LOWdiffsynth/core/data/unified_dataset.py40CODE
LOWdiffsynth/pipelines/anima_image.py74CODE
LOWdiffsynth/pipelines/stable_diffusion_xl.py90CODE
LOWdiffsynth/pipelines/ltx2_audio_video.py647CODE
LOWdiffsynth/pipelines/ltx2_audio_video.py169CODE
LOWdiffsynth/pipelines/lingbot_video.py83CODE
LOWdiffsynth/pipelines/flux_image.py1298CODE
LOWdiffsynth/pipelines/flux_image.py131CODE
LOWdiffsynth/pipelines/flux_image.py194CODE
LOWdiffsynth/pipelines/hidream_o1_image.py60CODE
LOWdiffsynth/pipelines/krea2.py280CODE
LOWdiffsynth/pipelines/krea2.py248CODE
LOWdiffsynth/pipelines/krea2.py63CODE
LOWdiffsynth/pipelines/minimax_h3_audio_video.py834CODE
LOWdiffsynth/pipelines/minimax_h3_audio_video.py90CODE
LOWdiffsynth/pipelines/wan_video.py1455CODE
LOWdiffsynth/pipelines/wan_video.py1817CODE
LOWdiffsynth/pipelines/wan_video.py1908CODE
LOWdiffsynth/pipelines/wan_video.py120CODE
LOWdiffsynth/pipelines/wan_video.py198CODE
LOWdiffsynth/pipelines/wan_video.py937CODE
LOWdiffsynth/pipelines/ace_step.py573CODE
LOWdiffsynth/pipelines/ace_step.py90CODE
LOWdiffsynth/pipelines/mova_audio_video.py348CODE
LOWdiffsynth/pipelines/mova_audio_video.py115CODE
LOWdiffsynth/pipelines/stable_diffusion.py66CODE
LOWdiffsynth/pipelines/ideogram4.py270CODE
LOWdiffsynth/pipelines/ideogram4.py68CODE
LOWdiffsynth/pipelines/ernie_image.py266CODE
LOWdiffsynth/pipelines/ernie_image.py67CODE
LOWdiffsynth/pipelines/qwen_image.py707CODE
181 more matches not shown…
Hyper-Verbose Identifiers185 hits · 176 pts
SeverityFileLineSnippetContext
LOWdocs/zh/API_Reference/core/quant.md249 def create_quantized_linear_shell(self, linear, compute_dtype):CODE
LOWdocs/zh/Diffusion_Templates/Template_Model_Training.md31class DataProcessor:CODE
LOWdocs/zh/Diffusion_Templates/Template_Model_Training.md122class DataProcessor:CODE
LOWdocs/zh/Diffusion_Templates/Template_Model_Training.md147class DataProcessor:CODE
LOW…zh/Developer_Guide/Integrating_Quantization_Backend.md140 def create_quantized_linear_shell(self, linear, compute_dtype):CODE
LOWdocs/en/API_Reference/core/quant.md249 def create_quantized_linear_shell(self, linear, compute_dtype):CODE
LOWdocs/en/Diffusion_Templates/Template_Model_Training.md31class DataProcessor:CODE
LOWdocs/en/Diffusion_Templates/Template_Model_Training.md122class DataProcessor:CODE
LOWdocs/en/Diffusion_Templates/Template_Model_Training.md142class DataProcessor:CODE
LOW…en/Developer_Guide/Integrating_Quantization_Backend.md140 def create_quantized_linear_shell(self, linear, compute_dtype):CODE
LOWdiffsynth/core/gradient/gradient_checkpoint.py17def create_custom_forward_use_reentrant(module):CODE
LOWdiffsynth/core/gradient/gradient_checkpoint.py30def gradient_checkpoint_forward(CODE
LOWdiffsynth/core/quant/config.py213 def prepare_for_prequantized_load(self, model: torch.nn.Module, compute_dtype: torch.dtype = torch.bfloat16):CODE
LOWdiffsynth/core/quant/config.py260 def measure_quantization_error(self, model: torch.nn.Module, compute_device="cuda", verbose=True) -> list:CODE
LOWdiffsynth/core/quant/config.py469 def prepare_for_prequantized_load(self, model: torch.nn.Module, compute_dtype: torch.dtype = torch.bfloat16):CODE
LOWdiffsynth/core/quant/config.py528 def measure_quantization_error(self, model: torch.nn.Module, compute_device="cuda", verbose=True) -> list:CODE
LOWdiffsynth/core/quant/config.py540 def _distinct_backend_configs(self):CODE
LOWdiffsynth/core/quant/base.py74 def create_quantized_linear_shell(self, linear: torch.nn.Linear, compute_dtype: torch.dtype) -> torch.nn.Module:CODE
LOWdiffsynth/core/quant/backends/torchao.py70 def create_quantized_linear_shell(self, linear, compute_dtype):CODE
LOWdiffsynth/core/quant/backends/torchao.py134def _mx_dynamic_activation_mx_weight(elem_dtype):CODE
LOWdiffsynth/core/quant/backends/bitsandbytes.py91 def create_quantized_linear_shell(self, linear, compute_dtype):CODE
LOWdiffsynth/core/quant/backends/comfy_kitchen.py233 def create_quantized_linear_shell(self, linear, compute_dtype):CODE
LOWdiffsynth/core/attention/attention.py61def initialize_attention_priority():CODE
LOWdiffsynth/core/attention/attention.py119def torch_sdpa_sliding_window(q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, sliding_window: int, q_pattern="b n s dCODE
LOWdiffsynth/core/attention/attention.py194def flash_attention_customized_kernel(q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, q_pattern="b n s d", k_pattern=CODE
LOWdiffsynth/core/offload_training/manager.py138 def _find_orphan_params_and_buffers(self, model: nn.Module, managed_param_ids: set):CODE
LOWdiffsynth/core/npu_patch/npu_fused_operator.py16def rms_norm_forward_transformers_npu(self, hidden_states):CODE
LOWdiffsynth/core/loader/config.py67 def parse_original_file_pattern(self):CODE
LOWdiffsynth/core/loader/model.py130def load_model_with_disk_offload(model_class, path, config=None, torch_dtype=torch.bfloat16, device="cpu", state_dict_coCODE
LOWdiffsynth/core/loader/file.py26def load_state_dict_from_safetensors(file_path, torch_dtype=None, device="cpu"):CODE
LOWdiffsynth/core/loader/file.py36def load_metadata_from_safetensors(file_path):CODE
LOWdiffsynth/core/loader/file.py73def convert_state_dict_keys_to_single_str(state_dict, with_shape=True):CODE
LOWdiffsynth/core/loader/file.py107def load_keys_dict_from_safetensors(file_path):CODE
LOWdiffsynth/core/loader/file.py115def convert_state_dict_to_keys_dict(state_dict):CODE
LOWdiffsynth/core/loader/file.py131def convert_keys_dict_to_single_str(state_dict, with_shape=True):CODE
LOWdiffsynth/core/vram/initialization.py6def skip_model_initialization(device=torch.device("meta")):CODE
LOWdiffsynth/core/vram/layers.py563def _materialize_root_params_from_disk(model: torch.nn.Module, disk_map: DiskMap):CODE
LOWdiffsynth/core/vram/layers.py574def enable_vram_management_recursively(model: torch.nn.Module, module_map: dict, vram_config: dict, vram_limit=None, namCODE
LOWdiffsynth/core/device/npu_compatible_device.py108def get_available_device_type():CODE
LOWdiffsynth/core/data/unified_dataset.py62 def search_for_cached_data_files(self, path):CODE
LOWdiffsynth/pipelines/stable_diffusion_xl.py311def model_fn_stable_diffusion_xl(CODE
LOWdiffsynth/pipelines/ltx2_audio_video.py488 def apply_input_images_to_latents(self, latents, input_latents, input_indexes, input_strength=1.0, input_latents_vidCODE
LOWdiffsynth/pipelines/flux_image.py31 def process_single_controlnet(self, controlnet_input: ControlNetInput, conditioning: torch.Tensor, **kwargs):CODE
LOWdiffsynth/pipelines/flux_image.py481 def apply_controlnet_mask_on_latents(self, pipe, latents, mask):CODE
LOWdiffsynth/pipelines/flux_image.py488 def apply_controlnet_mask_on_image(self, pipe, image, mask):CODE
LOWdiffsynth/pipelines/flux_image.py1117 def extract_arcface_bgr_embedding(self, in_image, landmark, device):CODE
LOWdiffsynth/pipelines/flux_image.py1151 def parse_lora_encoder_inputs(self, lora_encoder_inputs):CODE
LOWdiffsynth/pipelines/minimax_h3_audio_video.py470 def _resolve_reference_image_shape(self, pipe: MiniMaxH3Pipeline, width: int, height: int, short_edge: int):CODE
LOWdiffsynth/pipelines/minimax_h3_audio_video.py474 def _resolve_reference_video_shape(self, pipe: MiniMaxH3Pipeline, width: int, height: int, short_edge: int, max_pixeCODE
LOWdiffsynth/pipelines/minimax_h3_audio_video.py478 def _trim_reference_video_length(self, pipe: MiniMaxH3Pipeline, frame_count: int) -> int:CODE
LOWdiffsynth/pipelines/wan_video.py1438def wantodance_get_single_freqs(freqs, frame_num, fps):CODE
LOWdiffsynth/pipelines/wan_video.py1722 def create_custom_forward_vap(block, vap):CODE
LOWdiffsynth/pipelines/ace_step.py193 def switch_noncover_condition(self, inputs_shared, inputs_posi, inputs_nega, progress_id):CODE
LOWdiffsynth/pipelines/ace_step.py422 def _get_silence_latent_slice(self, pipe, length: int) -> torch.Tensor:CODE
LOWdiffsynth/pipelines/mova_audio_video.py348def model_fn_mova_audio_video(CODE
LOWdiffsynth/pipelines/stable_diffusion.py210def model_fn_stable_diffusion(CODE
LOWdiffsynth/pipelines/qwen_image.py500 def apply_controlnet_mask_on_latents(self, pipe, latents, mask):CODE
LOWdiffsynth/pipelines/qwen_image.py507 def apply_controlnet_mask_on_image(self, pipe, image, mask):CODE
LOWdiffsynth/pipelines/qwen_image.py628 def encode_images_using_qwenvl(self, pipe: QwenImagePipeline, images: list[Image.Image], highres=False):CODE
LOWdiffsynth/utils/quant/serialization.py33def test_save_quantized_model():CODE
125 more matches not shown…
Deep Nesting123 hits · 122 pts
SeverityFileLineSnippetContext
LOWdiffsynth/core/quant/base.py163CODE
LOWdiffsynth/core/attention/attention.py61CODE
LOWdiffsynth/core/attention/attention.py230CODE
LOWdiffsynth/core/loader/config.py84CODE
LOWdiffsynth/core/loader/model.py11CODE
LOWdiffsynth/core/loader/file.py57CODE
LOWdiffsynth/core/loader/file.py73CODE
LOWdiffsynth/core/loader/file.py131CODE
LOWdiffsynth/core/vram/layers.py574CODE
LOWdiffsynth/core/data/operators.py325CODE
LOWdiffsynth/core/data/unified_dataset.py70CODE
LOWdiffsynth/core/data/unified_dataset.py89CODE
LOWdiffsynth/pipelines/flux_image.py1298CODE
LOWdiffsynth/pipelines/flux_image.py115CODE
LOWdiffsynth/pipelines/hidream_o1_image.py166CODE
LOWdiffsynth/pipelines/minimax_music3.py42CODE
LOWdiffsynth/pipelines/minimax_h3_audio_video.py55CODE
LOWdiffsynth/pipelines/minimax_h3_audio_video.py252CODE
LOWdiffsynth/pipelines/minimax_h3_audio_video.py692CODE
LOWdiffsynth/pipelines/wan_video.py1455CODE
LOWdiffsynth/pipelines/ace_step.py486CODE
LOWdiffsynth/utils/controlnet/annotator.py10CODE
LOW…synth/utils/state_dict_converters/ltx2_text_encoder.py1CODE
LOW…synth/utils/state_dict_converters/ltx2_text_encoder.py24CODE
LOW…ffsynth/utils/state_dict_converters/flux_controlnet.py4CODE
LOWdiffsynth/utils/state_dict_converters/image_metrics.py12CODE
LOWdiffsynth/utils/state_dict_converters/image_metrics.py79CODE
LOWdiffsynth/utils/state_dict_converters/image_metrics.py93CODE
LOWdiffsynth/utils/state_dict_converters/image_metrics.py107CODE
LOW…utils/state_dict_converters/minimax_h3_text_encoder.py30CODE
LOWdiffsynth/utils/state_dict_converters/flux_vae.py267CODE
LOWdiffsynth/utils/state_dict_converters/flux_vae.py326CODE
LOWdiffsynth/utils/state_dict_converters/flux_dit.py4CODE
LOWdiffsynth/utils/state_dict_converters/flux_dit.py95CODE
LOWdiffsynth/utils/state_dict_converters/ltx2_video_vae.py1CODE
LOWdiffsynth/utils/state_dict_converters/ltx2_video_vae.py14CODE
LOW…th/utils/state_dict_converters/stable_diffusion_vae.py1CODE
LOW…tils/state_dict_converters/joyai_image_text_encoder.py1CODE
LOWdiffsynth/utils/lora/minimax_h3.py40CODE
LOWdiffsynth/utils/lora/sdxl.py766CODE
LOWdiffsynth/utils/lora/flux.py84CODE
LOWdiffsynth/utils/lora/flux.py113CODE
LOWdiffsynth/utils/data/minimax_h3.py79CODE
LOWdiffsynth/models/longcat_video_dit.py697CODE
LOWdiffsynth/models/stable_diffusion_unet.py63CODE
LOWdiffsynth/models/hpsv3.py109CODE
LOWdiffsynth/models/mova_dual_tower_bridge.py136CODE
LOWdiffsynth/models/flux2_vae.py78CODE
LOWdiffsynth/models/flux2_vae.py489CODE
LOWdiffsynth/models/flux2_vae.py693CODE
LOWdiffsynth/models/flux2_vae.py743CODE
LOWdiffsynth/models/qwen_image_image2lora.py119CODE
LOWdiffsynth/models/minimax_h3_video_vae.py469CODE
LOWdiffsynth/models/minimax_h3_video_vae.py584CODE
LOWdiffsynth/models/z_image_image2lora.py103CODE
LOWdiffsynth/models/z_image_image2lora.py179CODE
LOWdiffsynth/models/mova_audio_vae.py590CODE
LOWdiffsynth/models/mova_audio_vae.py771CODE
LOWdiffsynth/models/wan_video_dit_s2v.py27CODE
LOWdiffsynth/models/wan_video_dit_s2v.py284CODE
63 more matches not shown…
Cross-File Repetition20 hits · 100 pts
SeverityFileLineSnippetContext
HIGHdocs/zh/Model_Details/Ideogram-4.md0{ "high_level_description": "a medium-shot photograph of formula 1 driver max verstappen wearing his red bull racing racSTRING
HIGHdocs/en/Model_Details/Ideogram-4.md0{ "high_level_description": "a medium-shot photograph of formula 1 driver max verstappen wearing his red bull racing racSTRING
HIGH…/model_inference_low_vram/ideogram-4-bf16-repackage.py0{ "high_level_description": "a medium-shot photograph of formula 1 driver max verstappen wearing his red bull racing racSTRING
HIGH…ideogram4/model_inference/ideogram-4-bf16-repackage.py0{ "high_level_description": "a medium-shot photograph of formula 1 driver max verstappen wearing his red bull racing racSTRING
HIGHexamples/ideogram4/model_inference/ideogram-4-fp8.py0{ "high_level_description": "a medium-shot photograph of formula 1 driver max verstappen wearing his red bull racing racSTRING
HIGHexamples/ideogram4/model_inference/ideogram-4-nf4.py0{ "high_level_description": "a medium-shot photograph of formula 1 driver max verstappen wearing his red bull racing racSTRING
HIGHdocs/en/Model_Details/MiniMax-H3.md0widen the half-open frame range [start, end) to whole clips. frames count from 0.STRING
HIGH…nimax_h3/model_inference_low_vram/MiniMax-H3-Retake.py0widen the half-open frame range [start, end) to whole clips. frames count from 0.STRING
HIGH…amples/minimax_h3/model_inference/MiniMax-H3-Retake.py0widen the half-open frame range [start, end) to whole clips. frames count from 0.STRING
HIGHdiffsynth/models/ltx2_dit.py0this matches the implementation in denoising diffusion probabilistic models: create sinusoidal timestep embeddings. argsSTRING
HIGHdiffsynth/models/flux2_dit.py0this matches the implementation in denoising diffusion probabilistic models: create sinusoidal timestep embeddings. argsSTRING
HIGHdiffsynth/models/boogu_image_dit.py0this matches the implementation in denoising diffusion probabilistic models: create sinusoidal timestep embeddings. argsSTRING
HIGHdiffsynth/configs/model_configs.py0offical model repo: https://www.modelscope.cn/models/lightricks/ltx-2 repackaged model repo: https://www.modelscope.cn/mSTRING
HIGH…s/ltx2/model_inference_low_vram/LTX-2-T2AV-OneStage.py0offical model repo: https://www.modelscope.cn/models/lightricks/ltx-2 repackaged model repo: https://www.modelscope.cn/mSTRING
HIGH…s/ltx2/model_inference_low_vram/LTX-2-T2AV-TwoStage.py0offical model repo: https://www.modelscope.cn/models/lightricks/ltx-2 repackaged model repo: https://www.modelscope.cn/mSTRING
HIGHexamples/ltx2/model_inference/LTX-2-T2AV-OneStage.py0offical model repo: https://www.modelscope.cn/models/lightricks/ltx-2 repackaged model repo: https://www.modelscope.cn/mSTRING
HIGHexamples/ltx2/model_inference/LTX-2-T2AV-TwoStage.py0offical model repo: https://www.modelscope.cn/models/lightricks/ltx-2 repackaged model repo: https://www.modelscope.cn/mSTRING
HIGH…odel_inference_low_vram/acestep15xlsft-vocals2music.py0[verse 1] 深夜的屏幕,微光在闪烁 指尖敲击着,未知的脉络 不再是孤岛,独自去摸索 这里有一片海,等待你停泊 从零到一的距离,不再遥远 丰富的模型,静候被点燃 打破围墙的界限,推倒高墙 让智慧的火花,自由地碰撞 [pre-choruSTRING
HIGH…ce_step/model_inference/acestep15xlsft-vocals2music.py0[verse 1] 深夜的屏幕,微光在闪烁 指尖敲击着,未知的脉络 不再是孤岛,独自去摸索 这里有一片海,等待你停泊 从零到一的距离,不再遥远 丰富的模型,静候被点燃 打破围墙的界限,推倒高墙 让智慧的火花,自由地碰撞 [pre-choruSTRING
HIGH…_training/validate_full/acestep15xlsft-vocals2music.py0[verse 1] 深夜的屏幕,微光在闪烁 指尖敲击着,未知的脉络 不再是孤岛,独自去摸索 这里有一片海,等待你停泊 从零到一的距离,不再遥远 丰富的模型,静候被点燃 打破围墙的界限,推倒高墙 让智慧的火花,自由地碰撞 [pre-choruSTRING
Structural Annotation Overuse33 hits · 56 pts
SeverityFileLineSnippetContext
LOWdocs/zh/Developer_Guide/Integrating_Your_Model.md5## Step 1: 集成模型结构代码COMMENT
LOWdocs/zh/Developer_Guide/Integrating_Your_Model.md80## Step 2: 模型文件格式转换COMMENT
LOWdocs/zh/Developer_Guide/Integrating_Your_Model.md105## Step 3: 编写模型 ConfigCOMMENT
LOWdocs/zh/Developer_Guide/Integrating_Your_Model.md150## Step 4: 检验模型是否能被识别和加载COMMENT
LOWdocs/zh/Developer_Guide/Integrating_Your_Model.md184## Step 5: 编写模型显存管理方案COMMENT
LOWdocs/en/Pipeline_Usage/Quantization.md322### Step 1: Save the Quantized WeightsCOMMENT
LOWdocs/en/Pipeline_Usage/Quantization.md351### Step 2: Register the Hash in the Model ConfigCOMMENT
LOWdocs/en/Pipeline_Usage/Quantization.md377### Step 3: Load for InferenceCOMMENT
LOWdocs/en/Training/Split_Training.md145 # Step 1: initialize X_0, the set of directly related unitsCOMMENT
LOWdocs/en/Training/Split_Training.md150 # Step 2: build the data dependency edges E and the updating chain c(p) of each parameterCOMMENT
LOWdocs/en/Training/Split_Training.md154 # Step 3: fixed-point iteration X_{k+1} = X_k ∪ F(X_k) ∪ U(X_k)COMMENT
LOWdocs/en/Training/Split_Training.md162 # Step 4: output the bipartition (V1, V2)COMMENT
LOW…en/Developer_Guide/Integrating_Quantization_Backend.md22## Step 1: Write the Quantized LinearCOMMENT
LOW…en/Developer_Guide/Integrating_Quantization_Backend.md100## Step 2: Write the BackendCOMMENT
LOW…en/Developer_Guide/Integrating_Quantization_Backend.md154## Step 3: Write the Backend ConfigCOMMENT
LOW…en/Developer_Guide/Integrating_Quantization_Backend.md165## Step 4: Register the Quantization MethodCOMMENT
LOW…en/Developer_Guide/Integrating_Quantization_Backend.md198## Step 5: Self-CheckCOMMENT
LOWdocs/en/Developer_Guide/Integrating_Your_Model.md5## Step 1: Integrate Model Architecture CodeCOMMENT
LOWdocs/en/Developer_Guide/Integrating_Your_Model.md80## Step 2: Model File Format ConversionCOMMENT
LOWdocs/en/Developer_Guide/Integrating_Your_Model.md105## Step 3: Writing Model ConfigCOMMENT
LOWdocs/en/Developer_Guide/Integrating_Your_Model.md150## Step 4: Verifying Whether the Model Can Be Recognized and LoadedCOMMENT
LOWdocs/en/Developer_Guide/Integrating_Your_Model.md184## Step 5: Writing Model VRAM Management SchemeCOMMENT
LOWdiffsynth/models/ltx2_audio_vae.py1235 # Step 1: Crop first to avoid exceeding target dimensionsCOMMENT
LOWdiffsynth/models/ltx2_audio_vae.py1240 # Step 2: Calculate padding needed for time and frequency dimensionsCOMMENT
LOWdiffsynth/models/ltx2_audio_vae.py1244 # Step 3: Apply padding if neededCOMMENT
LOWdiffsynth/models/ltx2_audio_vae.py1256 # Step 4: Final safety crop to ensure exact target shapeCOMMENT
LOWdiffsynth/models/ace_step_dit.py219 # Step 1: Self-attention with adaptive layer norm (AdaLN)COMMENT
LOWdiffsynth/models/ace_step_dit.py230 # Step 2: Cross-attention (if enabled) for conditioning on encoder outputsCOMMENT
LOWdiffsynth/models/ace_step_dit.py241 # Step 3: Feed-forward (MLP) with adaptive layer normCOMMENT
LOWdiffsynth/models/boogu_image_dit.py2296 # Step 3: image self-attention.COMMENT
LOWdiffsynth/models/boogu_image_dit.py2304 # Step 4: residual updates.COMMENT
LOWdiffsynth/models/boogu_image_dit.py2250 # Step 1: modulation for both streams.COMMENT
LOWdiffsynth/models/boogu_image_dit.py2267 # Step 2: joint attention on [instruct + img].COMMENT
Over-Commented Block46 hits · 46 pts
SeverityFileLineSnippetContext
LOWdocs/zh/conf.py1# Configuration file for the Sphinx documentation builder.COMMENT
LOWdocs/zh/conf.py81#COMMENT
LOWdocs/zh/conf.py101# html_theme_path = [sphinx_book_theme.get_html_theme_path()]COMMENT
LOWdocs/en/conf.py1# Configuration file for the Sphinx documentation builder.COMMENT
LOWdocs/en/conf.py81#COMMENT
LOWdocs/en/conf.py101# html_theme_path = [sphinx_book_theme.get_html_theme_path()]COMMENT
LOWdiffsynth/version.py1# Make sure to modify __release_datetime__ to release time when making official release.COMMENT
LOWdiffsynth/models/stable_diffusion_unet.py1# Copyright 2025 The HuggingFace Team. All rights reserved.COMMENT
LOWdiffsynth/models/flux2_vae.py1# Copyright 2025 The HuggingFace Team. All rights reserved.COMMENT
LOWdiffsynth/models/ace_step_conditioner.py1# Copyright 2025 The ACESTEO Team. All rights reserved.COMMENT
LOWdiffsynth/models/ace_step_vae.py1# Copyright 2025 The ACESTEO Team. All rights reserved.COMMENT
LOWdiffsynth/models/ace_step_dit.py1# Copyright 2025 The ACESTEO Team. All rights reserved.COMMENT
LOWdiffsynth/models/hidream_o1_image_dit.py1# Copyright 2025 The Qwen Team and The HuggingFace Inc. team. All rights reserved.COMMENT
LOWdiffsynth/models/ace_step_tokenizer.py1# Copyright 2025 The ACESTEO Team. All rights reserved.COMMENT
LOWdiffsynth/models/stable_diffusion_vae.py1# Copyright 2025 The HuggingFace Team. All rights reserved.COMMENT
LOW…s/ltx2/model_inference_low_vram/LTX-2-T2AV-TwoStage.py41# use the following modelconfig if you want to initialize model from offical checkpoints from "Lightricks/LTX-2"COMMENT
LOWexamples/ltx2/model_inference/LTX-2-T2AV-TwoStage.py41# pipe = LTX2AudioVideoPipeline.from_pretrained(COMMENT
LOWexamples/ltx2/model_training/lora/LTX-2-T2AV-noaudio.sh1modelscope download --dataset DiffSynth-Studio/diffsynth_example_dataset --include "ltx2/LTX-2-T2AV-noaudio/*" --local_dCOMMENT
LOWexamples/ltx2/model_training/lora/LTX-2-T2AV-splited.sh1modelscope download --dataset DiffSynth-Studio/diffsynth_example_dataset --include "ltx2/LTX-2-T2AV-splited/*" --local_dCOMMENT
LOW…ples/flux2/model_training/full/FLUX.2-klein-base-9B.sh21COMMENT
LOWexamples/flux2/model_training/full/FLUX.2-klein-4B.sh21# accelerate launch examples/flux2/model_training/train.py \COMMENT
LOWexamples/flux2/model_training/full/FLUX.2-klein-9B.sh21COMMENT
LOW…s/flux2/model_training/full/TreeAdapter-KleinBase4B.sh1# TreeAdapter-KleinBase4B is a multi-LoRA system that supports inference only.COMMENT
LOW…ples/flux2/model_training/full/FLUX.2-klein-base-4B.sh21# accelerate launch examples/flux2/model_training/train.py \COMMENT
LOW…l_training/special/npu_training/FLUX.2-klein-9B-NPU.sh21# EditCOMMENT
LOW…ples/flux2/model_training/lora/FLUX.2-klein-base-9B.sh21# modelscope download --dataset DiffSynth-Studio/diffsynth_example_dataset --include "qwen_image/Qwen-Image-Edit-2511/*"COMMENT
LOWexamples/flux2/model_training/lora/FLUX.2-klein-4B.sh21# modelscope download --dataset DiffSynth-Studio/diffsynth_example_dataset --include "qwen_image/Qwen-Image-Edit-2511/*"COMMENT
LOWexamples/flux2/model_training/lora/FLUX.2-klein-9B.sh21# modelscope download --dataset DiffSynth-Studio/diffsynth_example_dataset --include "qwen_image/Qwen-Image-Edit-2511/*"COMMENT
LOW…ples/flux2/model_training/lora/FLUX.2-klein-base-4B.sh21# modelscope download --dataset DiffSynth-Studio/diffsynth_example_dataset --include "qwen_image/Qwen-Image-Edit-2511/*"COMMENT
LOW…image/model_inference_low_vram/Qwen-Image-Edit-2509.py41# edit_image = [Image.open("image.jpg")]COMMENT
LOW…l_inference_low_vram/Qwen-Image-Edit-2511-Lightning.py61# edit_image = [Image.open("image.jpg")]COMMENT
LOW…s/qwen_image/model_inference/FireRed-Image-Edit-1.1.py41# edit_image = [Image.open("image.jpg")]COMMENT
LOW…s/qwen_image/model_inference/FireRed-Image-Edit-1.0.py41# edit_image = [Image.open("image.jpg")]COMMENT
LOW…les/qwen_image/model_inference/Qwen-Image-Edit-2511.py41# Please use a list to input `edit_image`, even if the input contains only one image.COMMENT
LOW…training/full/Qwen-Image-Blockwise-ControlNet-Canny.sh21# and then start training with a high learning rate (1e-3).COMMENT
LOW…aining/full/Qwen-Image-Blockwise-ControlNet-Inpaint.sh21# and then start training with a high learning rate (1e-3).COMMENT
LOW…training/full/Qwen-Image-Blockwise-ControlNet-Depth.sh21# and then start training with a high learning rate (1e-3).COMMENT
LOW…_video/model_inference/lingbot-video-dense-1.3b_t2v.py61# from examples.lingbot_video.model_training.scripts.prompt_rewriter import rewrite_promptCOMMENT
LOW…m_o1_image/model_training/full/HiDream-O1-Image-Dev.sh21# --dataset_base_path data/diffsynth_example_dataset/qwen_image/Qwen-Image-Edit-2511 \COMMENT
LOW…dream_o1_image/model_training/full/HiDream-O1-Image.sh21# --dataset_base_path data/diffsynth_example_dataset/qwen_image/Qwen-Image-Edit-2511 \COMMENT
LOW…m_o1_image/model_training/lora/HiDream-O1-Image-Dev.sh21COMMENT
LOW…dream_o1_image/model_training/lora/HiDream-O1-Image.sh21COMMENT
LOW…mples/z_image/model_training/full/Z-Image-Omni-Base.sh21# accelerate launch --config_file examples/z_image/model_training/full/accelerate_config.yaml examples/z_image/model_traCOMMENT
LOW…mage/model_training/validate_lora/Z-Image-Omni-Base.py21image.save("image.jpg")COMMENT
LOW…mage/model_training/validate_full/Z-Image-Omni-Base.py21image = pipe(prompt=prompt, seed=42, rand_device="cuda", num_inference_steps=40, cfg_scale=4)COMMENT
LOW…mples/z_image/model_training/lora/Z-Image-Omni-Base.sh21# Image(s) to image trainingCOMMENT
Excessive Try-Catch Wrapping27 hits · 35 pts
SeverityFileLineSnippetContext
LOWdiffsynth/core/quant/config.py31 except Exception as error:CODE
LOWdiffsynth/core/quant/base.py154 except Exception as error:CODE
LOWdiffsynth/core/quant/base.py235 except Exception as error:CODE
LOWdiffsynth/core/quant/backends/comfy_kitchen.py183 except Exception as error:CODE
MEDIUMdiffsynth/core/quant/backends/comfy_kitchen.py180def _parse_marker(marker_tensor, layer_name):CODE
LOWdiffsynth/core/attention/attention.py10 except Exception:CODE
LOWdiffsynth/core/attention/attention.py18except Exception:CODE
LOWdiffsynth/core/attention/attention.py24except Exception:CODE
LOWdiffsynth/core/attention/attention.py30except Exception:CODE
LOWdiffsynth/core/attention/attention.py36except Exception:CODE
LOWdiffsynth/core/attention/attention.py42except Exception:CODE
LOWdiffsynth/core/attention/attention.py49except Exception:CODE
LOWdiffsynth/core/attention/attention.py57except Exception:CODE
LOWdiffsynth/core/offload_training/memory_buffer.py135 except Exception:CODE
LOWdiffsynth/core/data/operators.py23 except Exception as e:CODE
LOWdiffsynth/core/data/operators.py310 except Exception as e:CODE
LOWdiffsynth/core/data/operators.py339 except Exception as e:CODE
LOWdiffsynth/pipelines/ace_step.py449 except Exception as e:CODE
LOWdiffsynth/utils/data/__init__.py209 except Exception as e:CODE
LOWdiffsynth/models/flux2_vae.py808 except Exception as e:STRING
LOWdiffsynth/models/unified_reward_edit.py269 except Exception:CODE
LOWdiffsynth/diffusion/runner.py29 except Exception as e:CODE
LOW…ingbot_video/model_training/scripts/prompt_rewriter.py98 except Exception:CODE
LOW…ingbot_video/model_training/scripts/prompt_rewriter.py104 except Exception:CODE
LOWexamples/dev_tools/webui.py39 except Exception as e:CODE
MEDIUMexamples/dev_tools/webui.py41 print(f"Error {error_value}:\n{error_message}")CODE
MEDIUMexamples/dev_tools/webui.py36def catch_error(error_value):CODE
Self-Referential Comments12 hits · 34 pts
SeverityFileLineSnippetContext
MEDIUMdiffsynth/models/flux_vae.py11 # Create a mask with shape (height, width).COMMENT
MEDIUMdiffsynth/models/qwen_image_vae.py318 # Create the componentsSTRING
MEDIUMdiffsynth/models/ltx2_video_vae.py133 # Create a tensor containing the size of a single patch:COMMENT
MEDIUMdiffsynth/models/ltx2_video_vae.py216 # Define the size of the channels after the first convolutionCOMMENT
MEDIUM…les/flux/model_inference_low_vram/FLUX.1-dev-EliGen.py19 # Create a blank image for overlaysCOMMENT
MEDIUMexamples/flux/model_inference/FLUX.1-dev-EliGen.py9 # Create a blank image for overlaysCOMMENT
MEDIUM…en_image/model_inference_low_vram/Qwen-Image-EliGen.py9 # Create a blank image for overlaysCOMMENT
MEDIUM…image/model_inference_low_vram/Qwen-Image-EliGen-V2.py8 # Create a blank image for overlaysCOMMENT
MEDIUM…e/model_inference_low_vram/Qwen-Image-EliGen-Poster.py9 # Create a blank image for overlaysCOMMENT
MEDIUM…amples/qwen_image/model_inference/Qwen-Image-EliGen.py9 # Create a blank image for overlaysCOMMENT
MEDIUM…les/qwen_image/model_inference/Qwen-Image-EliGen-V2.py8 # Create a blank image for overlaysCOMMENT
MEDIUM…qwen_image/model_inference/Qwen-Image-EliGen-Poster.py9 # Create a blank image for overlaysCOMMENT
Verbosity Indicators11 hits · 20 pts
SeverityFileLineSnippetContext
LOWdiffsynth/models/ltx2_audio_vae.py1235 # Step 1: Crop first to avoid exceeding target dimensionsCOMMENT
LOWdiffsynth/models/ltx2_audio_vae.py1240 # Step 2: Calculate padding needed for time and frequency dimensionsCOMMENT
LOWdiffsynth/models/ltx2_audio_vae.py1244 # Step 3: Apply padding if neededCOMMENT
LOWdiffsynth/models/ltx2_audio_vae.py1256 # Step 4: Final safety crop to ensure exact target shapeCOMMENT
LOWdiffsynth/models/ace_step_dit.py219 # Step 1: Self-attention with adaptive layer norm (AdaLN)COMMENT
LOWdiffsynth/models/ace_step_dit.py230 # Step 2: Cross-attention (if enabled) for conditioning on encoder outputsCOMMENT
LOWdiffsynth/models/ace_step_dit.py241 # Step 3: Feed-forward (MLP) with adaptive layer normCOMMENT
LOWdiffsynth/models/boogu_image_dit.py2296 # Step 3: image self-attention.COMMENT
LOWdiffsynth/models/boogu_image_dit.py2304 # Step 4: residual updates.COMMENT
LOWdiffsynth/models/boogu_image_dit.py2250 # Step 1: modulation for both streams.COMMENT
LOWdiffsynth/models/boogu_image_dit.py2267 # Step 2: joint attention on [instruct + img].COMMENT
Docstring Block Structure2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHdiffsynth/models/nexus_gen_ar_model.py118 Calculate the 3D rope index based on image and video's temporal, height and width in LLM. Explanation:STRING
HIGHdiffsynth/models/anima_dit.py944 Prepares an embedded sequence tensor by applying positional embeddings and handling padding masks. ArgSTRING
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALdiffsynth/models/joyai_image_text_encoder.py73 self.model.model.language_model.norm.register_forward_hook(hook_fn)CODE
Modern Structural Boilerplate9 hits · 6 pts
SeverityFileLineSnippetContext
LOWdiffsynth/metrics/__init__.py17__all__ = [CODE
LOWdiffsynth/models/ltx2_dit.py1572 def set_gradient_checkpointing(self, enable: bool) -> None:CODE
LOWdiffsynth/models/flux2_vae.py726 def set_use_npu_flash_attention(self, use_npu_flash_attention: bool) -> None:STRING
LOWdiffsynth/models/flux2_vae.py889 def set_attention_slice(self, slice_size: int) -> None:STRING
LOWdiffsynth/models/flux2_vae.py917 def set_processor(self, processor: "AttnProcessor") -> None:STRING
LOWdiffsynth/models/minimax_h3_video_vae.py621__all__ = ["MiniMaxH3VideoVAE"]CODE
LOWdiffsynth/models/nexus_gen_ar_model.py932__all__ = ["Qwen2_5_VLForConditionalGeneration", "Qwen2_5_VLModel", "Qwen2_5_VLPreTrainedModel"]STRING
LOWdiffsynth/models/nexus_gen_ar_model.py1143__all__ = ["Qwen2_5_VLProcessor"]STRING
LOWdiffsynth/models/boogu_image_dit.py180 def set_processor(self, processor) -> None:CODE
Dead Code3 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMdiffsynth/pipelines/joyai_image.py200CODE
MEDIUMdiffsynth/models/z_image_dit.py991CODE
MEDIUMdiffsynth/models/clip.py58CODE
Decorative Section Separators2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMdiffsynth/models/ltx2_audio_vae.py1288# ---------------------------------------------------------------------------COMMENT
MEDIUMdiffsynth/models/ltx2_audio_vae.py1291# ---------------------------------------------------------------------------COMMENT
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMexamples/ltx2/model_inference/LTX-2.3-I2AV-TwoStage.py69# This example uses the first and last frames for demonstration. However, you can use any frames by setting input_imagesCOMMENT
Redundant / Tautological Comments2 hits · 2 pts
SeverityFileLineSnippetContext
LOWdiffsynth/pipelines/flux2_image.py442 # Check if Qwen3 text encoder is availableCOMMENT
LOWdiffsynth/models/ltx2_video_vae.py2080 # Check if current temporal slice overlaps with previous temporal sliceSTRING
AI Slop Vocabulary1 hit · 0 pts
SeverityFileLineSnippetContext
LOWdiffsynth/models/flux2_vae.py975 # here we simply pass along all tensors to the selected processor classSTRING