Repository Analysis

modelscope/DiffSynth-Studio

Enjoy the magic of Diffusion models!

8.7 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of modelscope/DiffSynth-Studio, a Python project with 12,693 GitHub stars. SynthScan v2.0 examined 125,786 lines of code across 1190 source files, recording 955 pattern matches distributed across 18 syntactic categories. The overall adjusted score of 8.7 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.7
Adjusted Score
8.7
Raw Score
100%
Time Factor
2026-07-14
Last Push
12.7K
Stars
Python
Language
125.8K
Lines of Code
1.2K
Files
955
Pattern Hits
2026-07-14
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 20LOW 912

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 955 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 Imports339 hits · 339 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/gradient/__init__.py1CODE
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
LOWdiffsynth/pipelines/anima_image.py1CODE
LOWdiffsynth/pipelines/anima_image.py5CODE
LOWdiffsynth/pipelines/anima_image.py6CODE
LOWdiffsynth/pipelines/anima_image.py7CODE
LOWdiffsynth/pipelines/anima_image.py12CODE
LOWdiffsynth/pipelines/anima_image.py13CODE
LOWdiffsynth/pipelines/anima_image.py14CODE
LOWdiffsynth/pipelines/stable_diffusion_xl.py2CODE
LOWdiffsynth/pipelines/stable_diffusion_xl.py11CODE
LOWdiffsynth/pipelines/ltx2_audio_video.py1CODE
LOWdiffsynth/pipelines/ltx2_audio_video.py6CODE
LOWdiffsynth/pipelines/flux_image.py1CODE
LOWdiffsynth/pipelines/hidream_o1_image.py3CODE
LOWdiffsynth/pipelines/hidream_o1_image.py4CODE
279 more matches not shown…
AI Structural Patterns214 hits · 214 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.py89CODE
LOWdiffsynth/core/attention/attention.py74CODE
LOWdiffsynth/core/attention/attention.py133CODE
LOWdiffsynth/core/attention/attention.py144CODE
LOWdiffsynth/core/attention/attention.py136CODE
LOWdiffsynth/core/attention/attention.py153CODE
LOWdiffsynth/core/attention/attention.py147CODE
LOWdiffsynth/core/attention/attention.py161CODE
LOWdiffsynth/core/attention/attention.py169CODE
LOWdiffsynth/core/attention/attention.py172CODE
LOWdiffsynth/core/loader/model.py11CODE
LOWdiffsynth/core/vram/layers.py10CODE
LOWdiffsynth/core/vram/layers.py38CODE
LOWdiffsynth/core/vram/layers.py90CODE
LOWdiffsynth/core/vram/layers.py209CODE
LOWdiffsynth/core/vram/layers.py272CODE
LOWdiffsynth/core/vram/layers.py357CODE
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/flux_image.py1000CODE
LOWdiffsynth/pipelines/flux_image.py120CODE
LOWdiffsynth/pipelines/flux_image.py181CODE
LOWdiffsynth/pipelines/hidream_o1_image.py60CODE
LOWdiffsynth/pipelines/krea2.py280CODE
LOWdiffsynth/pipelines/krea2.py248CODE
LOWdiffsynth/pipelines/krea2.py63CODE
LOWdiffsynth/pipelines/wan_video.py1276CODE
LOWdiffsynth/pipelines/wan_video.py1629CODE
LOWdiffsynth/pipelines/wan_video.py112CODE
LOWdiffsynth/pipelines/wan_video.py190CODE
LOWdiffsynth/pipelines/wan_video.py912CODE
LOWdiffsynth/pipelines/ace_step.py572CODE
LOWdiffsynth/pipelines/ace_step.py89CODE
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.py702CODE
LOWdiffsynth/pipelines/qwen_image.py100CODE
LOWdiffsynth/pipelines/z_image.py452CODE
LOWdiffsynth/pipelines/z_image.py572CODE
LOWdiffsynth/pipelines/z_image.py95CODE
LOWdiffsynth/pipelines/joyai_image.py65CODE
LOWdiffsynth/pipelines/flux2_image.py605CODE
LOWdiffsynth/pipelines/flux2_image.py76CODE
LOWdiffsynth/pipelines/boogu_image.py72CODE
LOWdiffsynth/utils/data/__init__.py39CODE
LOWdiffsynth/models/longcat_video_dit.py341CODE
LOWdiffsynth/models/longcat_video_dit.py630CODE
154 more matches not shown…
Hyper-Verbose Identifiers153 hits · 144 pts
SeverityFileLineSnippetContext
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
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
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/attention/attention.py38def initialize_attention_priority():CODE
LOWdiffsynth/core/attention/attention.py92def torch_sdpa_sliding_window(q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, sliding_window: int, q_pattern="b n s dCODE
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.py32 def parse_original_file_pattern(self):CODE
LOWdiffsynth/core/loader/model.py72def 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.py52def convert_state_dict_keys_to_single_str(state_dict, with_shape=True):CODE
LOWdiffsynth/core/loader/file.py86def load_keys_dict_from_safetensors(file_path):CODE
LOWdiffsynth/core/loader/file.py94def convert_state_dict_to_keys_dict(state_dict):CODE
LOWdiffsynth/core/loader/file.py110def 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.py439def enable_vram_management_recursively(model: torch.nn.Module, module_map: dict, vram_config: dict, vram_limit=None, namCODE
LOWdiffsynth/core/device/npu_compatible_device.py106def 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.py30 def process_single_controlnet(self, controlnet_input: ControlNetInput, conditioning: torch.Tensor, **kwargs):CODE
LOWdiffsynth/pipelines/flux_image.py455 def apply_controlnet_mask_on_latents(self, pipe, latents, mask):CODE
LOWdiffsynth/pipelines/flux_image.py462 def apply_controlnet_mask_on_image(self, pipe, image, mask):CODE
LOWdiffsynth/pipelines/flux_image.py818 def extract_arcface_bgr_embedding(self, in_image, landmark, device):CODE
LOWdiffsynth/pipelines/flux_image.py852 def parse_lora_encoder_inputs(self, lora_encoder_inputs):CODE
LOWdiffsynth/pipelines/wan_video.py1259def wantodance_get_single_freqs(freqs, frame_num, fps):CODE
LOWdiffsynth/pipelines/wan_video.py1534 def create_custom_forward_vap(block, vap):CODE
LOWdiffsynth/pipelines/ace_step.py192 def switch_noncover_condition(self, inputs_shared, inputs_posi, inputs_nega, progress_id):CODE
LOWdiffsynth/pipelines/ace_step.py421 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.py495 def apply_controlnet_mask_on_latents(self, pipe, latents, mask):CODE
LOWdiffsynth/pipelines/qwen_image.py502 def apply_controlnet_mask_on_image(self, pipe, image, mask):CODE
LOWdiffsynth/pipelines/qwen_image.py623 def encode_images_using_qwenvl(self, pipe: QwenImagePipeline, images: list[Image.Image], highres=False):CODE
LOWdiffsynth/utils/state_dict_converters/image_metrics.py107def _convert_open_clip_resblock(prefix, suffix, value):CODE
LOWdiffsynth/utils/lora/krea2.py107 def align_to_opensource_format(state_dict, alpha=None):CODE
LOWdiffsynth/utils/lora/krea2.py120 def align_to_diffsynth_format(state_dict):CODE
LOWdiffsynth/utils/lora/sdxl.py753 def align_to_opensource_format(state_dict, alpha=None):CODE
LOWdiffsynth/utils/lora/sdxl.py766 def align_to_diffsynth_format(state_dict):CODE
LOWdiffsynth/utils/lora/flux.py214 def align_to_opensource_format(state_dict, alpha=None):CODE
LOWdiffsynth/utils/lora/flux.py258 def align_to_diffsynth_format(state_dict):CODE
LOWdiffsynth/utils/data/audio.py31def read_audio_with_torchcodec(CODE
LOWdiffsynth/models/longcat_video_dit.py720 def _create_multi_lora_forward(self, module, loras):CODE
LOWdiffsynth/models/ltx2_dit.py234def adaln_embedding_coefficient(cross_attention_adaln: bool) -> int:CODE
LOWdiffsynth/models/ltx2_dit.py287def apply_interleaved_rotary_emb(STRING
LOWdiffsynth/models/ltx2_dit.py349def generate_freq_grid_pytorch(STRING
LOWdiffsynth/models/ltx2_dit.py662 def _prepare_self_attention_mask(CODE
LOWdiffsynth/models/ltx2_dit.py690 def _prepare_positional_embeddings(CODE
LOWdiffsynth/models/ltx2_dit.py839 def _prepare_cross_attention_timestep(CODE
LOWdiffsynth/models/ltx2_dit.py1002 def _apply_text_cross_attention(CODE
LOWdiffsynth/models/ltx2_dit.py1223def apply_cross_attention_adaln(CODE
LOWdiffsynth/models/ltx2_dit.py1368 def _adaln_embedding_coefficient(self) -> int:CODE
LOWdiffsynth/models/ltx2_dit.py1572 def set_gradient_checkpointing(self, enable: bool) -> None:CODE
LOWdiffsynth/models/ltx2_dit.py1582 def _process_transformer_blocks(CODE
LOWdiffsynth/models/ltx2_audio_vae.py111 def _get_audio_latent_time_in_sec(CODE
93 more matches not shown…
Deep Nesting110 hits · 110 pts
SeverityFileLineSnippetContext
LOWdiffsynth/core/attention/attention.py38CODE
LOWdiffsynth/core/attention/attention.py172CODE
LOWdiffsynth/core/loader/config.py49CODE
LOWdiffsynth/core/loader/file.py36CODE
LOWdiffsynth/core/loader/file.py52CODE
LOWdiffsynth/core/loader/file.py110CODE
LOWdiffsynth/core/vram/layers.py439CODE
LOWdiffsynth/core/data/operators.py325CODE
LOWdiffsynth/core/data/unified_dataset.py70CODE
LOWdiffsynth/core/data/unified_dataset.py89CODE
LOWdiffsynth/pipelines/flux_image.py1000CODE
LOWdiffsynth/pipelines/flux_image.py109CODE
LOWdiffsynth/pipelines/hidream_o1_image.py166CODE
LOWdiffsynth/pipelines/wan_video.py1276CODE
LOWdiffsynth/pipelines/ace_step.py485CODE
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
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/sdxl.py766CODE
LOWdiffsynth/utils/lora/flux.py84CODE
LOWdiffsynth/utils/lora/flux.py113CODE
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/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
LOWdiffsynth/models/step1x_connector.py264CODE
LOWdiffsynth/models/hidream_common.py98CODE
LOWdiffsynth/models/qwen_image_bench.py447CODE
LOWdiffsynth/models/ace_step_dit.py369CODE
LOWdiffsynth/models/flux_controlnet.py162CODE
LOWdiffsynth/models/flux_controlnet.py269CODE
LOWdiffsynth/models/flux_controlnet.py228CODE
LOWdiffsynth/models/flux_lora_patcher.py127CODE
LOWdiffsynth/models/flux_lora_patcher.py156CODE
LOWdiffsynth/models/nexus_gen_ar_model.py110CODE
LOWdiffsynth/models/nexus_gen_ar_model.py508CODE
50 more matches not shown…
Cross-File Repetition20 hits · 100 pts
SeverityFileLineSnippetContext
HIGHREADME.md0{ "high_level_description": "a medium-shot photograph of formula 1 driver max verstappen wearing his red bull racing racSTRING
HIGHREADME_zh.md0{ "high_level_description": "a medium-shot photograph of formula 1 driver max verstappen wearing his red bull racing racSTRING
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
HIGHREADME.md0offical model repo: https://www.modelscope.cn/models/lightricks/ltx-2 repackaged model repo: https://www.modelscope.cn/mSTRING
HIGHREADME_zh.md0offical model repo: https://www.modelscope.cn/models/lightricks/ltx-2 repackaged model repo: https://www.modelscope.cn/mSTRING
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
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
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
Over-Commented Block44 hits · 44 pts
SeverityFileLineSnippetContext
LOWREADME.md1221# pipe = LTX2AudioVideoPipeline.from_pretrained(COMMENT
LOWREADME_zh.md1221# pipe = LTX2AudioVideoPipeline.from_pretrained(COMMENT
LOWdocs/zh/conf.py1# Configuration file for the Sphinx documentation builder.COMMENT
LOWdocs/zh/conf.py81source_suffix = ['.rst', '.md']COMMENT
LOWdocs/en/conf.py1# Configuration file for the Sphinx documentation builder.COMMENT
LOWdocs/en/conf.py81source_suffix = ['.rst', '.md']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…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…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
Structural Annotation Overuse21 hits · 35 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/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
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
Excessive Try-Catch Wrapping11 hits · 14 pts
SeverityFileLineSnippetContext
LOWdiffsynth/core/offload_training/memory_buffer.py135 except Exception:CODE
LOWdiffsynth/core/data/operators.py23 except Exception as e:CODE
LOWdiffsynth/core/data/operators.py339 except Exception as e:CODE
LOWdiffsynth/pipelines/ace_step.py448 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
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
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
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
Modern Structural Boilerplate8 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/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
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.py440 # 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