Repository Analysis

NVlabs/LongLive

Long Video Gen Infrastructure

19.6 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of NVlabs/LongLive, a Python project with 2,457 GitHub stars. SynthScan v2.0 examined 40,029 lines of code across 203 source files, recording 551 pattern matches distributed across 16 syntactic categories. The overall adjusted score of 19.6 places this repository in the Moderate 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).

19.6
Adjusted Score
19.6
Raw Score
100%
Time Factor
2026-07-09
Last Push
2.5K
Stars
Python
Language
40.0K
Lines of Code
203
Files
551
Pattern Hits
2026-07-14
Scan Date
0.21
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 42MEDIUM 23LOW 485

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 551 distinct pattern matches across 16 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.

Cross-File Repetition40 hits · 200 pts
SeverityFileLineSnippetContext
HIGHfouroversix/scripts/ptq/coordinators/local.py0run any tasks that should be used to calibrate models for a given ptq method and set of parameters before running evaluaSTRING
HIGHfouroversix/scripts/ptq/coordinators/modal.py0run any tasks that should be used to calibrate models for a given ptq method and set of parameters before running evaluaSTRING
HIGHfouroversix/scripts/ptq/coordinators/base.py0run any tasks that should be used to calibrate models for a given ptq method and set of parameters before running evaluaSTRING
HIGHfouroversix/src/fouroversix/quantize/backend.py0return true if the cutlass backend is available on the current machine.STRING
HIGHfouroversix/src/fouroversix/matmul/backend.py0return true if the cutlass backend is available on the current machine.STRING
HIGHfouroversix/src/fouroversix/quantize/cuda/backend.py0return true if the cutlass backend is available on the current machine.STRING
HIGHfouroversix/src/fouroversix/quantize/triton/backend.py0return true if the cutlass backend is available on the current machine.STRING
HIGHfouroversix/src/fouroversix/quantize/pytorch/backend.py0return true if the cutlass backend is available on the current machine.STRING
HIGHfouroversix/src/fouroversix/matmul/pytorch.py0return true if the cutlass backend is available on the current machine.STRING
HIGHfouroversix/src/fouroversix/matmul/cutlass/backend.py0return true if the cutlass backend is available on the current machine.STRING
HIGHfouroversix/src/fouroversix/quantize/backend.py0return true if the pytorch backend supports the given input and quantization configuration.STRING
HIGHfouroversix/src/fouroversix/quantize/cuda/backend.py0return true if the pytorch backend supports the given input and quantization configuration.STRING
HIGHfouroversix/src/fouroversix/quantize/triton/backend.py0return true if the pytorch backend supports the given input and quantization configuration.STRING
HIGHfouroversix/src/fouroversix/quantize/pytorch/backend.py0return true if the pytorch backend supports the given input and quantization configuration.STRING
HIGHfouroversix/src/fouroversix/quantize/backend.py0quantize a tensor to fp4 using the pytorch backend. args: x (torch.tensor): the input tensor to quantize. config (quantiSTRING
HIGH…oversix/src/fouroversix/quantize/transformer_engine.py0quantize a tensor to fp4 using the pytorch backend. args: x (torch.tensor): the input tensor to quantize. config (quantiSTRING
HIGHfouroversix/src/fouroversix/quantize/cuda/backend.py0quantize a tensor to fp4 using the pytorch backend. args: x (torch.tensor): the input tensor to quantize. config (quantiSTRING
HIGHfouroversix/src/fouroversix/quantize/triton/backend.py0quantize a tensor to fp4 using the pytorch backend. args: x (torch.tensor): the input tensor to quantize. config (quantiSTRING
HIGHfouroversix/src/fouroversix/quantize/pytorch/backend.py0quantize a tensor to fp4 using the pytorch backend. args: x (torch.tensor): the input tensor to quantize. config (quantiSTRING
HIGHfouroversix/src/fouroversix/model/modules/linear.py0return high precision parameters to be quantized and deleted.STRING
HIGHfouroversix/src/fouroversix/model/modules/qwen.py0return high precision parameters to be quantized and deleted.STRING
HIGHfouroversix/src/fouroversix/model/modules/gpt_oss.py0return high precision parameters to be quantized and deleted.STRING
HIGHfouroversix/src/fouroversix/model/modules/linear_ori.py0return high precision parameters to be quantized and deleted.STRING
HIGHfouroversix/src/fouroversix/model/modules/linear.py0get the size of a single element, in bytes, for a parameter.STRING
HIGHfouroversix/src/fouroversix/model/modules/qwen.py0get the size of a single element, in bytes, for a parameter.STRING
HIGHfouroversix/src/fouroversix/model/modules/gpt_oss.py0get the size of a single element, in bytes, for a parameter.STRING
HIGHfouroversix/src/fouroversix/model/modules/linear_ori.py0get the size of a single element, in bytes, for a parameter.STRING
HIGHfouroversix/src/fouroversix/model/modules/linear.py0prepare this layer for post-training quantization by quantizing the weight, storing the quantized weight, and deleting tSTRING
HIGHfouroversix/src/fouroversix/model/modules/qwen.py0prepare this layer for post-training quantization by quantizing the weight, storing the quantized weight, and deleting tSTRING
HIGHfouroversix/src/fouroversix/model/modules/gpt_oss.py0prepare this layer for post-training quantization by quantizing the weight, storing the quantized weight, and deleting tSTRING
HIGHfouroversix/src/fouroversix/model/modules/linear_ori.py0prepare this layer for post-training quantization by quantizing the weight, storing the quantized weight, and deleting tSTRING
HIGHwan_5b/textimage2video.py0initializes the image-to-video generation model components. args: config (easydict): object containing model parameters STRING
HIGHwan_5b/text2video.py0initializes the image-to-video generation model components. args: config (easydict): object containing model parameters STRING
HIGHwan_5b/image2video.py0initializes the image-to-video generation model components. args: config (easydict): object containing model parameters STRING
HIGHwan_5b/textimage2video.py0configures a model object. this includes setting evaluation modes, applying distributed parallel strategy, and handling STRING
HIGHwan_5b/text2video.py0configures a model object. this includes setting evaluation modes, applying distributed parallel strategy, and handling STRING
HIGHwan_5b/image2video.py0configures a model object. this includes setting evaluation modes, applying distributed parallel strategy, and handling STRING
HIGHwan_5b/distributed/sequence_parallel.py0forward pass through the diffusion model args: x (list[tensor]): list of input video tensors, each with shape [c_in, f, STRING
HIGHwan_5b/modules/causal_model.py0forward pass through the diffusion model args: x (list[tensor]): list of input video tensors, each with shape [c_in, f, STRING
HIGHwan_5b/modules/model.py0forward pass through the diffusion model args: x (list[tensor]): list of input video tensors, each with shape [c_in, f, STRING
Unused Imports105 hits · 103 pts
SeverityFileLineSnippetContext
LOWpipeline/__init__.py1CODE
LOWpipeline/__init__.py2CODE
LOWpipeline/self_forcing_training.py12CODE
LOWfouroversix/scripts/generate_kernels.py1CODE
LOWfouroversix/scripts/resources.py1CODE
LOWfouroversix/scripts/test_on_modal.py1CODE
LOWfouroversix/scripts/speedtest/matmul.py1CODE
LOWfouroversix/scripts/speedtest/quantize.py1CODE
LOWfouroversix/scripts/ptq/utils.py1CODE
LOWfouroversix/scripts/ptq/coordinators/__init__.py1CODE
LOWfouroversix/scripts/ptq/coordinators/__init__.py2CODE
LOWfouroversix/scripts/ptq/evaluators/rtn.py1CODE
LOWfouroversix/scripts/ptq/evaluators/spinquant.py1CODE
LOWfouroversix/scripts/ptq/evaluators/__init__.py1CODE
LOWfouroversix/scripts/ptq/evaluators/awq.py1CODE
LOWfouroversix/scripts/ptq/evaluators/smoothquant.py1CODE
LOWfouroversix/scripts/ptq/evaluators/evaluator.py1CODE
LOWfouroversix/scripts/train/__main__.py1CODE
LOWfouroversix/src/fouroversix/__init__.py3CODE
LOWfouroversix/src/fouroversix/__init__.py4CODE
LOWfouroversix/src/fouroversix/__init__.py4CODE
LOWfouroversix/src/fouroversix/__init__.py4CODE
LOWfouroversix/src/fouroversix/__init__.py4CODE
LOWfouroversix/src/fouroversix/__init__.py4CODE
LOWfouroversix/src/fouroversix/__init__.py11CODE
LOWfouroversix/src/fouroversix/__init__.py11CODE
LOWfouroversix/src/fouroversix/__init__.py11CODE
LOWfouroversix/src/fouroversix/__init__.py12CODE
LOWfouroversix/src/fouroversix/__init__.py12CODE
LOWfouroversix/src/fouroversix/__init__.py12CODE
LOWfouroversix/src/fouroversix/__init__.py12CODE
LOWfouroversix/src/fouroversix/__init__.py12CODE
LOWfouroversix/src/fouroversix/__init__.py13CODE
LOWfouroversix/src/fouroversix/quantize/__init__.py1CODE
LOWfouroversix/src/fouroversix/quantize/__init__.py2CODE
LOWfouroversix/src/fouroversix/quantize/__init__.py3CODE
LOWfouroversix/src/fouroversix/quantize/__init__.py4CODE
LOW…oversix/src/fouroversix/quantize/transformer_engine.py33CODE
LOWfouroversix/src/fouroversix/quantize/cuda/backend.py29CODE
LOWfouroversix/src/fouroversix/quantize/cuda/__init__.py1CODE
LOWfouroversix/src/fouroversix/quantize/triton/kernel.py1CODE
LOWfouroversix/src/fouroversix/quantize/triton/__init__.py1CODE
LOW…uroversix/src/fouroversix/quantize/pytorch/__init__.py1CODE
LOW…roversix/src/fouroversix/quantize/pytorch/reference.py1CODE
LOWfouroversix/src/fouroversix/model/quantize.py1CODE
LOWfouroversix/src/fouroversix/model/__init__.py1CODE
LOWfouroversix/src/fouroversix/model/__init__.py1CODE
LOWfouroversix/src/fouroversix/model/__init__.py2CODE
LOWfouroversix/src/fouroversix/model/__init__.py3CODE
LOWfouroversix/src/fouroversix/model/__init__.py3CODE
LOWfouroversix/src/fouroversix/model/modules/__init__.py1CODE
LOWfouroversix/src/fouroversix/model/modules/__init__.py2CODE
LOWfouroversix/src/fouroversix/matmul/__init__.py1CODE
LOWfouroversix/src/fouroversix/matmul/cutlass/backend.py27CODE
LOWfouroversix/src/fouroversix/matmul/cutlass/__init__.py1CODE
LOWutils/dataset.py9CODE
LOWutils/dataset.py10CODE
LOWutils/dataset.py15CODE
LOWutils/rope_triton.py17CODE
LOWutils/nvfp4_checkpoint.py10CODE
45 more matches not shown…
Hyper-Verbose Identifiers113 hits · 103 pts
SeverityFileLineSnippetContext
LOWinference_sp.py99def _expected_inference_samples(config):CODE
LOWinference_sp.py166def materialize_quantized_generator(model, device, materialize_fn, stage_desc, is_main_process):CODE
LOWinference_sp.py176def configure_generator_torch_compile(pipeline, config, is_main_process):CODE
LOWinference.py145def _expected_inference_samples(config):CODE
LOWinference.py223def materialize_quantized_generator(model, device, materialize_fn, stage_desc):CODE
LOWinference.py237def configure_generator_torch_compile(pipeline, config):CODE
LOWpipeline/causal_diffusion_inference.py954 def _set_all_modules_sink_size(self, sink_size_value: int):CODE
LOWpipeline/causal_diffusion_inference.py968 def _set_all_modules_global_sink_size(self, value: int):CODE
LOWpipeline/causal_diffusion_inference.py861 def _initialize_crossattn_cache(self, batch_size, dtype, device):CODE
LOWpipeline/causal_diffusion_inference.py895 def _initialize_sample_scheduler(self, noise):CODE
LOWpipeline/causal_diffusion_inference.py918 def _set_all_modules_max_attention_size(self, local_attn_size_value: int):CODE
LOWpipeline/causal_diffusion_inference.py1001 def _update_sink_for_scene_cut(self, kv_cache, current_num_frames):CODE
LOWpipeline/self_forcing_training.py372 def _set_all_modules_sink_size(self, sink_size_value: int):CODE
LOWpipeline/self_forcing_training.py384 def _set_all_modules_global_sink_size(self, value: int):CODE
LOWpipeline/self_forcing_training.py82 def _build_default_denoising_step_list(self, sampling_steps):CODE
LOWpipeline/self_forcing_training.py111 def generate_chunk_with_cache(CODE
LOWpipeline/self_forcing_training.py288 def inference_with_trajectory(CODE
LOWpipeline/self_forcing_training.py409 def _inference_with_trajectory_inner(CODE
LOWpipeline/self_forcing_training.py698 def _initialize_crossattn_cache(self, batch_size, dtype, device):CODE
LOWpipeline/self_forcing_training.py744 def _set_all_modules_max_attention_size(self, local_attn_size_value: int):CODE
LOWfouroversix/setup.py32def get_cuda_bare_metal_version() -> Version | None:CODE
LOWfouroversix/tests/test_correctness.py52def test_backend_outputs_are_consistent( # noqa: C901, PLR0915CODE
LOWfouroversix/scripts/resources.py52 def has_untracked_or_unstaged_changes(self) -> bool:CODE
LOWfouroversix/scripts/resources.py150def install_fouroversix_non_editable() -> None:CODE
LOWfouroversix/scripts/ptq/evaluators/smoothquant.py196def get_calibration_experiments(CODE
LOWfouroversix/src/fouroversix/quantize/utils.py14def get_no_random_sign_vector(device: int) -> torch.Tensor:CODE
LOWfouroversix/src/fouroversix/model/quantize.py35 def should_replace_existing_modules_in_model(CODE
LOWfouroversix/src/fouroversix/model/modules/linear.py271 def _serialize_quantized_weight(CODE
LOWfouroversix/src/fouroversix/model/modules/linear.py322 def quantized_weight_transposed(self) -> QuantizedTensor | None:CODE
LOWtests/test_i2v_teacher_forcing_context.py96def _load_causal_diffusion_with_stubs():CODE
LOWtests/test_fp8_inference.py19def test_strict_compile_wrapper_does_not_shadow_torch(monkeypatch):CODE
LOWutils/memory.py61def fake_diffusers_current_device(model: torch.nn.Module, target_device: torch.device):CODE
LOWutils/memory.py96def move_model_to_device_with_memory_preservation(model, target_device, preserved_memory_gb=0):CODE
LOWutils/memory.py112def offload_model_from_device_for_memory_preservation(model, target_device, preserved_memory_gb=0):CODE
LOWutils/torch_compile_utils.py86def configure_module_call_torch_compile(CODE
LOWutils/dataset.py200 def _load_captions_from_folder(self, folder: Path):CODE
LOWutils/dataset.py422 def _get_video_files_in_folder(self, folder_path):CODE
LOWutils/dataset.py451 def _check_folder_has_enough_frames(self, folder_path):CODE
LOWutils/dataset.py533 def _can_sample_from_position(self, total_frames, original_fps, num_frames, start_frame):CODE
LOWutils/dataset.py552 def _can_complete_all_segments_without_wrap(self, video_files, start_video_idx, start_frame):CODE
LOWutils/dataset.py629 def _sample_frames_from_video(self, video_path, num_frames, start_frame=0):CODE
LOWutils/dataset.py696 def _sample_frames_from_video_ffmpeg(self, video_path, num_frames, start_frame=0):CODE
LOWutils/dataset.py750 def _try_get_item_from_folder(self, folder_idx, deterministic: bool = False):CODE
LOWutils/lightvae_5b_wrapper.py18def _extract_checkpoint_state_dict(raw):CODE
LOWutils/lightvae_5b_wrapper.py31def _map_lightvae_key_to_wanvae(key):CODE
LOWutils/lightvae_5b_wrapper.py106def _normalize_vae_state_dict(raw_state):CODE
LOWutils/lightvae_5b_wrapper.py117def infer_lightvae_pruning_rate_from_ckpt(vae_path, full_decoder_conv1_out=1024):CODE
LOWutils/position_embedding_utils.py15def select_temporal_offset_for_sample(CODE
LOWutils/rope_triton.py84def _split_complex_to_cos_sin(freqs_complex: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor]:CODE
LOWutils/nvfp4_checkpoint.py38def unwrap_generator_state_dict(checkpoint: object, use_ema: bool = False) -> object:CODE
LOWutils/nvfp4_checkpoint.py50def clean_fsdp_state_dict_keys(state_dict: Mapping[str, torch.Tensor]) -> dict[str, torch.Tensor]:CODE
LOWutils/nvfp4_checkpoint.py55def build_model_quantization_config(config, keep_master_weights: bool = False):CODE
LOWutils/nvfp4_checkpoint.py134def drop_fouroversix_master_weights(model: nn.Module) -> list[str]:CODE
LOWutils/wan_5b_wrapper.py316 def enable_gradient_checkpointing(self) -> None:CODE
LOWutils/quant.py90def _resolve_modules_to_not_convert(CODE
LOWutils/quant.py119def _get_default_filtered_modules(filter_profile: str | None) -> list[str]:CODE
LOWutils/quant.py137def _warn_for_te_config_mismatch(model_quant_config: ModelQuantizationConfig) -> None:CODE
LOWutils/quant.py273 def _copy_tensor_into_parameter(CODE
LOWutils/quant.py350def quantize_model_with_optional_te(CODE
LOWutils/quant.py425def _materialize_transformer_engine_weights_for_inference(CODE
53 more matches not shown…
Verbosity Indicators43 hits · 64 pts
SeverityFileLineSnippetContext
LOWpipeline/causal_diffusion_inference.py67 # Step 2: Initialize schedulerCOMMENT
LOWpipeline/causal_diffusion_inference.py39 # Step 1: Initialize all modelsCOMMENT
LOWpipeline/causal_diffusion_inference.py232 # Step 1: Initialize KV cache to all zerosCOMMENT
LOWpipeline/causal_diffusion_inference.py266 # Step 2: Cache context featureCOMMENT
LOWpipeline/causal_diffusion_inference.py437 # Step 3: Temporal denoising loopCOMMENT
LOWpipeline/causal_diffusion_inference.py741 # Step 4: Decode the outputCOMMENT
LOWpipeline/self_forcing_training.py446 # Step 1: Initialize KV cache to all zerosCOMMENT
LOWpipeline/self_forcing_training.py468 # Step 2: Cache context featureCOMMENT
LOWpipeline/self_forcing_training.py486 # Step 3: Temporal denoising loopCOMMENT
LOWutils/dataset.py545 # We need to check if we can get num_frames framesCOMMENT
LOWmodel/diffusion.py30 # Step 2: Initialize all hyperparametersCOMMENT
LOWmodel/diffusion.py171 # Step 2: Randomly sample a timestep and add noise to denoiser inputsCOMMENT
LOWmodel/diffusion.py258 # Step 3: Noise augmentation, also add small noise to clean context latentsCOMMENT
LOWmodel/diffusion.py331 # Step 5: Store prediction errors into error buffer.COMMENT
LOWmodel/dmd.py487 # Step 5: Debugging LogCOMMENT
LOWmodel/dmd.py47 # Step 2: Initialize all dmd hyperparametersCOMMENT
LOWmodel/dmd.py98 # Step 1: Compute the fake scoreCOMMENT
LOWmodel/dmd.py119 # Step 2: Compute the real scoreCOMMENT
LOWmodel/dmd.py138 # Step 3: Compute the DMD gradient (DMD paper eq. 7).COMMENT
LOWmodel/dmd.py213 # Step 1: Randomly sample timestep based on the given schedule and corresponding noiseCOMMENT
LOWmodel/dmd.py247 # Step 2: Compute the KL gradCOMMENT
LOWmodel/dmd.py291 # Step 1: Unroll generator to obtain fake videosCOMMENT
LOWmodel/dmd.py307 # Step 2: Compute the DMD lossCOMMENT
LOWmodel/dmd.py368 # Step 1: Run generator on backward simulated noisy inputCOMMENT
LOWmodel/dmd.py410 # Step 2: Compute the fake predictionCOMMENT
LOWmodel/dmd.py450 # Step 3: Compute the denoising loss for the fake criticCOMMENT
LOWtrainer/diffusion.py60 # Step 1: Initialize the distributed training environment (rank, seed, dtype, logging etc.)COMMENT
LOWtrainer/diffusion.py152 # Step 2: Initialize the model and optimizerCOMMENT
LOWtrainer/diffusion.py333 # Step 3: Initialize the dataloaderCOMMENT
LOWtrainer/diffusion.py736 # Step 1: Get the next batch of text promptsCOMMENT
LOWtrainer/diffusion.py759 # Step 2: Extract the conditional infosCOMMENT
LOWtrainer/diffusion.py792 # Step 3: Train the generatorCOMMENT
LOWtrainer/diffusion.py821 # Step 4: Update EMA (if enabled and after start step)COMMENT
LOWtrainer/diffusion.py856 # Step 5: LoggingCOMMENT
LOWtrainer/distillation.py41 # Step 1: Initialize the distributed training environment (rank, seed, dtype, logging etc.)COMMENT
LOWtrainer/distillation.py79 # Step 2: Initialize the modelCOMMENT
LOWtrainer/distillation.py406 # Step 3: Set up EMA parameter containersCOMMENT
LOWtrainer/distillation.py430 # Step 4: Initialize the optimizerCOMMENT
LOWtrainer/distillation.py447 # Step 5: Initialize the dataloaderCOMMENT
LOWtrainer/distillation.py531 # Step 6: Initialize the validation dataloader for visualization (fixed prompts)COMMENT
LOWtrainer/distillation.py1000 # Step 1: Get the next batch of text promptsCOMMENT
LOWtrainer/distillation.py1040 # Step 2: Extract the conditional infosCOMMENT
LOWtrainer/distillation.py1071 # Step 3: Store gradients for the generator (if training the generator)COMMENT
Structural Annotation Overuse42 hits · 62 pts
SeverityFileLineSnippetContext
LOWpipeline/causal_diffusion_inference.py67 # Step 2: Initialize schedulerCOMMENT
LOWpipeline/causal_diffusion_inference.py39 # Step 1: Initialize all modelsCOMMENT
LOWpipeline/causal_diffusion_inference.py232 # Step 1: Initialize KV cache to all zerosCOMMENT
LOWpipeline/causal_diffusion_inference.py266 # Step 2: Cache context featureCOMMENT
LOWpipeline/causal_diffusion_inference.py437 # Step 3: Temporal denoising loopCOMMENT
LOWpipeline/causal_diffusion_inference.py741 # Step 4: Decode the outputCOMMENT
LOWpipeline/self_forcing_training.py446 # Step 1: Initialize KV cache to all zerosCOMMENT
LOWpipeline/self_forcing_training.py468 # Step 2: Cache context featureCOMMENT
LOWpipeline/self_forcing_training.py486 # Step 3: Temporal denoising loopCOMMENT
LOWmodel/diffusion.py30 # Step 2: Initialize all hyperparametersCOMMENT
LOWmodel/diffusion.py171 # Step 2: Randomly sample a timestep and add noise to denoiser inputsCOMMENT
LOWmodel/diffusion.py258 # Step 3: Noise augmentation, also add small noise to clean context latentsCOMMENT
LOWmodel/diffusion.py331 # Step 5: Store prediction errors into error buffer.COMMENT
LOWmodel/dmd.py487 # Step 5: Debugging LogCOMMENT
LOWmodel/dmd.py47 # Step 2: Initialize all dmd hyperparametersCOMMENT
LOWmodel/dmd.py98 # Step 1: Compute the fake scoreCOMMENT
LOWmodel/dmd.py119 # Step 2: Compute the real scoreCOMMENT
LOWmodel/dmd.py138 # Step 3: Compute the DMD gradient (DMD paper eq. 7).COMMENT
LOWmodel/dmd.py213 # Step 1: Randomly sample timestep based on the given schedule and corresponding noiseCOMMENT
LOWmodel/dmd.py247 # Step 2: Compute the KL gradCOMMENT
LOWmodel/dmd.py291 # Step 1: Unroll generator to obtain fake videosCOMMENT
LOWmodel/dmd.py307 # Step 2: Compute the DMD lossCOMMENT
LOWmodel/dmd.py368 # Step 1: Run generator on backward simulated noisy inputCOMMENT
LOWmodel/dmd.py410 # Step 2: Compute the fake predictionCOMMENT
LOWmodel/dmd.py450 # Step 3: Compute the denoising loss for the fake criticCOMMENT
LOWtrainer/diffusion.py60 # Step 1: Initialize the distributed training environment (rank, seed, dtype, logging etc.)COMMENT
LOWtrainer/diffusion.py152 # Step 2: Initialize the model and optimizerCOMMENT
LOWtrainer/diffusion.py333 # Step 3: Initialize the dataloaderCOMMENT
LOWtrainer/diffusion.py736 # Step 1: Get the next batch of text promptsCOMMENT
LOWtrainer/diffusion.py759 # Step 2: Extract the conditional infosCOMMENT
LOWtrainer/diffusion.py792 # Step 3: Train the generatorCOMMENT
LOWtrainer/diffusion.py821 # Step 4: Update EMA (if enabled and after start step)COMMENT
LOWtrainer/diffusion.py856 # Step 5: LoggingCOMMENT
LOWtrainer/distillation.py41 # Step 1: Initialize the distributed training environment (rank, seed, dtype, logging etc.)COMMENT
LOWtrainer/distillation.py79 # Step 2: Initialize the modelCOMMENT
LOWtrainer/distillation.py406 # Step 3: Set up EMA parameter containersCOMMENT
LOWtrainer/distillation.py430 # Step 4: Initialize the optimizerCOMMENT
LOWtrainer/distillation.py447 # Step 5: Initialize the dataloaderCOMMENT
LOWtrainer/distillation.py531 # Step 6: Initialize the validation dataloader for visualization (fixed prompts)COMMENT
LOWtrainer/distillation.py1000 # Step 1: Get the next batch of text promptsCOMMENT
LOWtrainer/distillation.py1040 # Step 2: Extract the conditional infosCOMMENT
LOWtrainer/distillation.py1071 # Step 3: Store gradients for the generator (if training the generator)COMMENT
Excessive Try-Catch Wrapping52 hits · 57 pts
SeverityFileLineSnippetContext
LOWinference_sp.py49 except Exception as exc:CODE
LOWinference.py84 except Exception as e:CODE
MEDIUMpipeline/causal_diffusion_inference.py468def _vae_thread_fn():CODE
LOWpipeline/causal_diffusion_inference.py64 except Exception as exc:CODE
LOWpipeline/causal_diffusion_inference.py356 except Exception:CODE
LOWpipeline/causal_diffusion_inference.py361 except Exception:CODE
LOWpipeline/causal_diffusion_inference.py366 except Exception:CODE
LOWpipeline/causal_diffusion_inference.py936 except Exception:CODE
LOWpipeline/causal_diffusion_inference.py946 except Exception:CODE
LOWpipeline/causal_diffusion_inference.py951 except Exception:CODE
LOWpipeline/causal_diffusion_inference.py965 except Exception:CODE
LOWpipeline/causal_diffusion_inference.py974 except Exception:CODE
LOWpipeline/causal_diffusion_inference.py495 except Exception as exc:CODE
LOWpipeline/self_forcing_training.py348 except Exception:CODE
LOWpipeline/self_forcing_training.py353 except Exception:CODE
LOWpipeline/self_forcing_training.py358 except Exception:CODE
LOWpipeline/self_forcing_training.py381 except Exception:CODE
LOWpipeline/self_forcing_training.py390 except Exception:CODE
LOWpipeline/self_forcing_training.py764 except Exception:CODE
LOWpipeline/self_forcing_training.py773 except Exception:CODE
LOWutils/torch_compile_utils.py49 except Exception as exc:CODE
LOWutils/torch_compile_utils.py75 except Exception as exc:CODE
LOWutils/torch_compile_utils.py112 except Exception as exc:CODE
MEDIUMutils/dataset.py433def get_numeric_key(path):CODE
LOWutils/dataset.py211 except Exception:CODE
LOWutils/dataset.py230 except Exception:CODE
LOWutils/dataset.py418 except Exception:CODE
LOWutils/dataset.py469 except Exception:CODE
LOWutils/dataset.py953 except Exception as exc:CODE
LOWutils/lightvae_5b_wrapper.py123 except Exception as exc:CODE
LOWutils/lightvae_5b_wrapper.py138 except Exception:CODE
LOWutils/quant.py282 except Exception:CODE
LOWutils/quant.py294 except Exception as copy_exc:CODE
LOWutils/quant.py719 except Exception as exc: # pragma: no cover - exercised only when extension is stale/missingCODE
LOWwan_5b/utils/prompt_extend.py185 except Exception as e:CODE
LOWwan_5b/utils/prompt_extend.py248 except Exception as e:CODE
LOWwan_5b/utils/utils.py53 except Exception as e:CODE
LOWwan_5b/utils/utils.py75 except Exception as e:CODE
LOWwan_5b/modules/causal_model_sp_ulysses.py46except Exception:CODE
LOWwan_5b/modules/attention.py11except Exception:CODE
LOWwan_5b/modules/attention.py36except Exception:CODE
LOWscripts/decode_vae_latents.py148 except Exception as e:CODE
LOWscripts/decode_lightvae_latents.py324 except Exception as exc:CODE
LOWscripts/decode_lightvae_latents.py334 except Exception as exc:CODE
LOWmodel/dmd.py484 except Exception:CODE
LOWmodel/dmd.py334 except Exception:CODE
LOWtrainer/diffusion.py50 except Exception as e:CODE
LOWtrainer/diffusion.py629 except Exception as e:CODE
LOWtrainer/diffusion.py646 except Exception as e:CODE
LOWtrainer/diffusion.py885 except Exception:CODE
LOWtrainer/distillation.py1265 except Exception as e:CODE
LOWtrainer/distillation.py908 except Exception as e:CODE
Decorative Section Separators20 hits · 49 pts
SeverityFileLineSnippetContext
MEDIUMutils/dataset.py164 # ------------------------------------------------------------------COMMENT
MEDIUMutils/dataset.py166 # ------------------------------------------------------------------COMMENT
MEDIUMutils/dataset.py175 # ------------------------------------------------------------------COMMENT
MEDIUMutils/dataset.py177 # ------------------------------------------------------------------COMMENT
MEDIUMutils/dataset.py215 # ------------------------------------------------------------------COMMENT
MEDIUMutils/dataset.py217 # ------------------------------------------------------------------COMMENT
MEDIUMwan_5b/modules/causal_model.py246 # -------------------------------STRING
MEDIUMwan_5b/modules/causal_model.py249 # -------------------------------STRING
MEDIUMwan_5b/modules/causal_model.py264 # -------------------------------STRING
MEDIUMwan_5b/modules/causal_model.py269 # -------------------------------STRING
MEDIUMwan_5b/modules/causal_model.py1217 # ==========================================STRING
MEDIUMwan_5b/modules/causal_model.py1219 # ==========================================STRING
MEDIUMwan_5b/modules/causal_model.py1231 # ==========================================STRING
MEDIUMwan_5b/modules/causal_model.py1233 # ==========================================STRING
MEDIUMwan_5b/modules/causal_model.py1250 # ==========================================STRING
MEDIUMwan_5b/modules/causal_model.py1252 # ==========================================STRING
MEDIUMtrainer/distillation.py601 # ----------------------------------------------------------------------------------------------------------COMMENT
MEDIUMtrainer/distillation.py603 # ----------------------------------------------------------------------------------------------------------COMMENT
MEDIUMtrainer/distillation.py1332 # --------------------------------------------------------------------------------------------------------------COMMENT
MEDIUMtrainer/distillation.py1334 # --------------------------------------------------------------------------------------------------------------COMMENT
Deep Nesting47 hits · 36 pts
SeverityFileLineSnippetContext
LOWinference_sp.py33CODE
LOWinference.py61CODE
LOWpipeline/causal_diffusion_inference.py167CODE
LOWpipeline/causal_diffusion_inference.py369CODE
LOWpipeline/causal_diffusion_inference.py468CODE
LOWpipeline/self_forcing_training.py111CODE
LOWpipeline/self_forcing_training.py409CODE
LOWfouroversix/setup.py52CODE
LOWfouroversix/tests/test_correctness.py52CODE
LOWfouroversix/scripts/ptq/evaluators/evaluator.py59CODE
LOWutils/dataset.py750CODE
LOWutils/position_embedding_utils.py56CODE
LOWutils/error_buffer.py239CODE
LOWutils/nvfp4_checkpoint.py134CODE
LOWutils/quant.py477CODE
LOWutils/lora_utils.py19CODE
LOWwan_5b/utils/fm_solvers.py412CODE
LOWwan_5b/utils/fm_solvers.py483CODE
LOWwan_5b/utils/utils.py106CODE
LOWwan_5b/utils/qwen_vl_utils.py85CODE
LOWwan_5b/utils/qwen_vl_utils.py328CODE
LOWwan_5b/modules/attention.py84CODE
LOWwan_5b/modules/vae2_1.py68CODE
LOWwan_5b/modules/vae2_1.py101CODE
LOWwan_5b/modules/t5.py27CODE
LOWwan_5b/modules/causal_model.py90CODE
LOWwan_5b/modules/causal_model.py327CODE
LOWwan_5b/modules/causal_model.py1371CODE
LOWwan_5b/modules/vae2_2.py73CODE
LOWwan_5b/modules/vae2_2.py111CODE
LOWscripts/decode_vae_latents.py72CODE
LOWscripts/decode_lightvae_latents.py104CODE
LOWmodel/diffusion.py15CODE
LOWtrainer/diffusion.py25CODE
LOWtrainer/diffusion.py56CODE
LOWtrainer/diffusion.py552CODE
LOWtrainer/diffusion.py578CODE
LOWtrainer/diffusion.py637CODE
LOWtrainer/diffusion.py911CODE
LOWtrainer/diffusion.py1016CODE
LOWtrainer/diffusion.py1080CODE
LOWtrainer/distillation.py37CODE
LOWtrainer/distillation.py831CODE
LOWtrainer/distillation.py857CODE
LOWtrainer/distillation.py994CODE
LOWtrainer/distillation.py1152CODE
LOWtrainer/distillation.py1271CODE
AI Structural Patterns36 hits · 34 pts
SeverityFileLineSnippetContext
LOWinference.py562CODE
LOWpipeline/self_forcing_training.py17CODE
LOWpipeline/causal_diffusion_inference_sp.py32CODE
LOWfouroversix/scripts/resources.py188CODE
LOWfouroversix/scripts/ptq/evaluators/evaluator.py59CODE
LOWutils/dataset.py280CODE
LOWutils/lightvae_5b_wrapper.py162CODE
LOWutils/error_buffer.py41CODE
LOWutils/wan_5b_wrapper.py184CODE
LOWutils/wan_5b_wrapper.py209CODE
LOWutils/wan_5b_wrapper.py274CODE
LOWutils/wan_5b_wrapper.py278CODE
LOWutils/wan_5b_wrapper.py453CODE
LOWutils/scheduler.py108CODE
LOWutils/quant.py585CODE
LOWwan_5b/textimage2video.py36CODE
LOWwan_5b/textimage2video.py162CODE
LOWwan_5b/textimage2video.py239CODE
LOWwan_5b/textimage2video.py413CODE
LOWwan_5b/text2video.py33CODE
LOWwan_5b/text2video.py203CODE
LOWwan_5b/image2video.py35CODE
LOWwan_5b/image2video.py206CODE
LOWwan_5b/distributed/sequence_parallel.py380CODE
LOWwan_5b/utils/fm_solvers.py131CODE
LOWwan_5b/utils/fm_solvers_unipc.py79CODE
LOWwan_5b/modules/causal_model_sp_ulysses.py113CODE
LOWwan_5b/modules/causal_model_sp_ulysses.py342CODE
LOWwan_5b/modules/causal_model_sp_ulysses.py441CODE
LOWwan_5b/modules/attention.py84CODE
LOWwan_5b/modules/attention.py260CODE
LOWwan_5b/modules/model.py325CODE
LOWwan_5b/modules/causal_model.py327CODE
LOWwan_5b/modules/causal_model.py829CODE
LOWwan_5b/modules/causal_model.py974CODE
LOWwan_5b/modules/vae2_2.py735CODE
Modern Structural Boilerplate30 hits · 30 pts
SeverityFileLineSnippetContext
LOWpipeline/__init__.py4__all__ = [CODE
LOWfouroversix/scripts/ptq/coordinators/__init__.py4__all__ = ["LocalEvaluationCoordinator", "ModalEvaluationCoordinator"]CODE
LOWfouroversix/scripts/ptq/evaluators/utils.py10def set_random_seeds(seed: int | None = None) -> None:CODE
LOWfouroversix/src/fouroversix/__init__.py17__all__ = [CODE
LOWfouroversix/src/fouroversix/quantize/__init__.py6__all__ = ["QuantizationConfig", "QuantizedTensor", "get_rht_matrix", "quantize_to_fp4"]CODE
LOWfouroversix/src/fouroversix/quantize/cuda/__init__.py3__all__ = ["CUDAQuantizeBackend"]CODE
LOWfouroversix/src/fouroversix/quantize/triton/__init__.py3__all__ = ["TritonQuantizeBackend"]CODE
LOW…uroversix/src/fouroversix/quantize/pytorch/__init__.py3__all__ = ["PyTorchQuantizeBackend"]CODE
LOW…oversix/src/fouroversix/weight_conversions/__init__.py13__all__ = ["FourOverSixGptOssDeserialize", "GptOssWeightConverter", "WeightConversions"]CODE
LOWfouroversix/src/fouroversix/model/__init__.py5__all__ = [CODE
LOWfouroversix/src/fouroversix/model/modules/__init__.py6__all__ = ["FourOverSixGptOssMLP", "FourOverSixLinear"]CODE
LOWfouroversix/src/fouroversix/matmul/__init__.py3__all__ = ["fp4_matmul"]CODE
LOWfouroversix/src/fouroversix/matmul/cutlass/__init__.py3__all__ = ["CUTLASSMatmulBackend"]CODE
LOWutils/nvfp4_kernel.py22__all__ = ["fp4_dequantize", "static_blockwise_fp4_fake_quant"]CODE
LOWwan_5b/__init__.py3__all__ = ["WanI2V", "WanT2V", "WanTI2V"]CODE
LOWwan_5b/distributed/util.py40__all__ = [CODE
LOWwan_5b/distributed/ulysses.py47__all__ = ["distributed_attention", "distributed_flex_attention"]CODE
LOWwan_5b/utils/__init__.py9__all__ = [CODE
LOWwan_5b/utils/utils.py12__all__ = ['save_video', 'save_image', 'str2bool']CODE
LOWwan_5b/utils/qwen_vl_utils.py23logger = logging.getLogger(__name__)CODE
LOWwan_5b/modules/attention.py78__all__ = [CODE
LOWwan_5b/modules/vae2_1.py10__all__ = [CODE
LOWwan_5b/modules/t5.py12__all__ = [CODE
LOWwan_5b/modules/__init__.py9__all__ = [CODE
LOWwan_5b/modules/model.py12__all__ = ['WanModel']CODE
LOWwan_5b/modules/vae2_2.py10__all__ = [CODE
LOWwan_5b/modules/tokenizers.py9__all__ = ['HuggingfaceTokenizer']CODE
LOWmodel/__init__.py3__all__ = [CODE
LOWtrainer/__init__.py4__all__ = [CODE
LOWtrainer/sp_helper.py18__all__ = ["DEFAULT_SP_VAE_HALO_LATENTS", "SequenceParallelHelper"]CODE
Over-Commented Block16 hits · 16 pts
SeverityFileLineSnippetContext
LOWfouroversix/scripts/hadamard_code_gen.py1from pathlib import PathCOMMENT
LOW…uroversix/src/fouroversix/quantize/quantized_tensor.py161 f"Expected {expected_scale_factors} scale factors, got "COMMENT
LOW…uroversix/src/fouroversix/csrc/include/kernel_traits.h81 // static constexpr int kSwizzleS = Is_nvfp4 ? 2 : 1; // 4 or 2 elementsCOMMENT
LOW…c/fouroversix/csrc/include/fp4_quant_launch_template.h21#define KERNEL_PARAM_MODIFIER __grid_constant__COMMENT
LOW…uroversix/src/fouroversix/csrc/include/static_switch.h1// Inspired byCOMMENT
LOWutils/fp8.py1# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATESCOMMENT
LOWutils/__init__.py1# Marker file: turn `utils/` from a namespace package into a regular package.COMMENT
LOWutils/rope_triton.py21import triton.language as tlCOMMENT
LOWutils/kernel/__init__.py1# Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATESCOMMENT
LOWwan_5b/modules/attention.py161 # we're trying to replace).COMMENT
LOWwan_5b/modules/causal_model.py41# concatenated freqs tensor each time. LRU keeps memory bounded.COMMENT
LOWwan_5b/modules/causal_model.py61# when disabled, stores (freqs_i_complex, None, None).COMMENT
LOWwan_5b/modules/causal_model.py101 # iter-47 (grad-safety fix): the Triton RoPE kernel (rope_apply_triton) is aCOMMENT
LOWwan_5b/modules/causal_model.py121 # kernel will be used (it consumes bf16 directly).COMMENT
LOWwan_5b/modules/causal_model.py501 # * global_sink_tokens: first N frames are permanently anchoredCOMMENT
LOWmodel/diffusion.py41 self.device = deviceCOMMENT
Hallucination Indicators1 hit · 10 pts
SeverityFileLineSnippetContext
CRITICALfouroversix/scripts/ptq/evaluators/spinquant.py230 model.lm_head.weight.data = model.model.embed_tokens.weight.data.clone()CODE
Docstring Block Structure2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHwan_5b/utils/utils.py80 Convert a string to a boolean. Supported true values: 'yes', 'true', 't', 'y', '1' Supported false values:STRING
HIGHwan_5b/utils/qwen_vl_utils.py138calculate the number of frames for video used for model inputs. Args: ele (dict): a dict contains the confiSTRING
Self-Referential Comments1 hit · 4 pts
SeverityFileLineSnippetContext
MEDIUMtrainer/distillation.py1276 # Define the specific modules we want to apply LoRA toCOMMENT
Redundant / Tautological Comments2 hits · 2 pts
SeverityFileLineSnippetContext
LOWutils/dataset.py473 # Check if we have enough frames for all segmentsCOMMENT
LOWtrainer/distillation.py1156 # Check if we should train generator on this optimization stepCOMMENT
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippetContext
LOWmodel/base.py51 self.fake_model_name = getattr(args, "fake_name", "Wan2.2-TI2V-5B")CODE