Repository Analysis

NVlabs/Sana

SANA: Efficient High-Resolution Image Synthesis with Linear Diffusion Transformer

17.0 Moderate AI signal View on GitHub
17.0
Adjusted Score
17.0
Raw Score
100%
Time Factor
2026-05-28
Last Push
7,978
Stars
Python
Language
116,874
Lines of Code
429
Files
1225
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 59MEDIUM 240LOW 926

Pattern Findings

1225 matches across 16 categories. Click a row to expand file-level details.

Decorative Section Separators200 hits · 660 pts
SeverityFileLineSnippet
MEDIUMenvironment_setup.sh2# -----------------------------------------------------------------------------
MEDIUMenvironment_setup.sh13# -----------------------------------------------------------------------------
MEDIUMdiffusion/post_training/rewards.py15# ---------------------------------------------------------------------------
MEDIUMdiffusion/post_training/rewards.py17# ---------------------------------------------------------------------------
MEDIUMdiffusion/post_training/rewards.py81# ---------------------------------------------------------------------------
MEDIUMdiffusion/post_training/rewards.py83# ---------------------------------------------------------------------------
MEDIUMdiffusion/post_training/rewards.py107# ---------------------------------------------------------------------------
MEDIUMdiffusion/post_training/rewards.py109# ---------------------------------------------------------------------------
MEDIUMdiffusion/post_training/rewards.py185# =========================================================================
MEDIUMdiffusion/post_training/rewards.py187# =========================================================================
MEDIUMdiffusion/post_training/rewards.py319# =========================================================================
MEDIUMdiffusion/post_training/rewards.py321# =========================================================================
MEDIUM…post_training/diffusers_patch/pipeline_with_logprob.py32# ---------------------------------------------------------------------------
MEDIUM…post_training/diffusers_patch/pipeline_with_logprob.py34# ---------------------------------------------------------------------------
MEDIUM…post_training/diffusers_patch/pipeline_with_logprob.py197# ---------------------------------------------------------------------------
MEDIUM…post_training/diffusers_patch/pipeline_with_logprob.py199# ---------------------------------------------------------------------------
MEDIUM…post_training/diffusers_patch/pipeline_with_logprob.py346# ---------------------------------------------------------------------------
MEDIUM…post_training/diffusers_patch/pipeline_with_logprob.py348# ---------------------------------------------------------------------------
MEDIUMdiffusion/utils/action_overlay.py43# ---------------------------------------------------------------------------
MEDIUMdiffusion/utils/action_overlay.py45# ---------------------------------------------------------------------------
MEDIUMdiffusion/utils/action_overlay.py121# ---------------------------------------------------------------------------
MEDIUMdiffusion/utils/action_overlay.py123# ---------------------------------------------------------------------------
MEDIUMdiffusion/model/edm_sample.py28# ----------------------------------------------------------------------------
MEDIUMdiffusion/model/edm_sample.py83# ----------------------------------------------------------------------------
MEDIUMdiffusion/model/qwen/qwen_vl.py77 # ===================================================================
MEDIUMdiffusion/model/qwen/qwen_vl.py79 # ===================================================================
MEDIUMdiffusion/model/qwen/qwen_vl.py144 # ===================================================================
MEDIUMdiffusion/model/qwen/qwen_vl.py146 # ===================================================================
MEDIUMdiffusion/model/qwen/qwen_vl.py208 # ===================================================================
MEDIUMdiffusion/model/qwen/qwen_vl.py210 # ===================================================================
MEDIUMdiffusion/model/nets/sana_gdn_blocks.py256 # =========================================================================
MEDIUMdiffusion/model/nets/sana_gdn_blocks.py258 # =========================================================================
MEDIUMdiffusion/model/nets/sana_gdn_blocks.py268 # =========================================================================
MEDIUMdiffusion/model/nets/sana_gdn_blocks.py270 # =========================================================================
MEDIUMdiffusion/model/nets/sana_gdn_blocks.py240 # =========================================================================
MEDIUMdiffusion/model/nets/sana_gdn_blocks.py242 # =========================================================================
MEDIUMdiffusion/model/nets/sana_gdn_blocks.py296 # =========================================================================
MEDIUMdiffusion/model/nets/sana_gdn_blocks.py298 # =========================================================================
MEDIUMdiffusion/model/nets/sana_gdn_blocks.py315# ---------------------------------------------------------------------------
MEDIUMdiffusion/model/nets/sana_gdn_blocks.py317# ---------------------------------------------------------------------------
MEDIUMdiffusion/model/nets/sana_camctrl_blocks.py48# ---------------------------------------------------------------------------
MEDIUMdiffusion/model/nets/sana_camctrl_blocks.py50# ---------------------------------------------------------------------------
MEDIUMdiffusion/model/nets/sana_camctrl_blocks.py68# ---------------------------------------------------------------------------
MEDIUMdiffusion/model/nets/sana_camctrl_blocks.py70# ---------------------------------------------------------------------------
MEDIUMdiffusion/model/nets/sana_camctrl_blocks.py268# ---------------------------------------------------------------------------
MEDIUMdiffusion/model/nets/sana_camctrl_blocks.py270# ---------------------------------------------------------------------------
MEDIUMdiffusion/model/nets/sana_camctrl_blocks.py464# ---------------------------------------------------------------------------
MEDIUMdiffusion/model/nets/sana_camctrl_blocks.py466# ---------------------------------------------------------------------------
MEDIUMdiffusion/model/nets/sana_camctrl_blocks.py551# ---------------------------------------------------------------------------
MEDIUMdiffusion/model/nets/sana_camctrl_blocks.py553# ---------------------------------------------------------------------------
MEDIUMdiffusion/model/nets/sana_gdn_camctrl_blocks.py57# ---------------------------------------------------------------------------
MEDIUMdiffusion/model/nets/sana_gdn_camctrl_blocks.py64# ---------------------------------------------------------------------------
MEDIUMdiffusion/model/nets/sana_gdn_camctrl_blocks.py171# ---------------------------------------------------------------------------
MEDIUMdiffusion/model/nets/sana_gdn_camctrl_blocks.py173# ---------------------------------------------------------------------------
MEDIUMdiffusion/model/nets/sana_gdn_camctrl_blocks.py270 # =========================================================================
MEDIUMdiffusion/model/nets/sana_gdn_camctrl_blocks.py272 # =========================================================================
MEDIUMdiffusion/model/nets/sana_gdn_camctrl_blocks.py279 # =========================================================================
MEDIUMdiffusion/model/nets/sana_gdn_camctrl_blocks.py281 # =========================================================================
MEDIUMdiffusion/model/nets/sana_gdn_camctrl_blocks.py428 # ------------------------------------------------------------------
MEDIUMdiffusion/model/nets/sana_gdn_camctrl_blocks.py430 # ------------------------------------------------------------------
140 more matches not shown…
Unused Imports293 hits · 278 pts
SeverityFileLineSnippet
LOWtools/convert_sana_wm_refiner_to_diffusers.py35
LOWtools/metrics/geneval/generation/diffusers_generate.py15
LOWtools/metrics/pytorch-fid/src/pytorch_fid/inception.py7
LOWtools/metrics/pytorch-fid/src/pytorch_fid/inception.py9
LOWtools/controlnet/inference_controlnet.py37
LOWtools/controlnet/inference_controlnet.py37
LOWtools/convert_scripts/convert_sana_to_svdquant.py2
LOWtools/convert_scripts/convert_sana_to_diffusers.py2
LOW…ols/convert_scripts/convert_sana_video_to_diffusers.py2
LOWtrain_video_scripts/train_video_ivjoint_chunk.py36
LOWtrain_video_scripts/train_video_ivjoint.py31
LOWtrain_video_scripts/train_video_ivjoint.py35
LOWtrain_video_scripts/train_video_ivjoint.py38
LOWtrain_video_scripts/train_video_ivjoint.py47
LOWapp/app_sana_multithread.py17
LOWapp/sana_pipeline.py28
LOWapp/sana_pipeline.py28
LOWapp/sana_pipeline.py28
LOWapp/sana_pipeline.py28
LOWapp/sana_controlnet_pipeline.py31
LOWapp/sana_controlnet_pipeline.py31
LOWapp/sana_controlnet_pipeline.py31
LOWapp/sana_controlnet_pipeline.py31
LOWapp/sana_pipeline_inpaint.py20
LOWapp/sana_pipeline_inpaint.py31
LOWapp/sana_pipeline_inpaint.py31
LOWapp/sana_pipeline_inpaint.py31
LOWapp/sana_pipeline_inpaint.py31
LOWapp/sana_pipeline_inpaint.py41
LOWapp/safety_check.py19
LOWapp/safety_check.py21
LOWapp/safety_check.py21
LOWapp/app_sana_4bit.py21
LOWapp/app_sana.py17
LOWapp/app_sana.py32
LOWapp/sana_sprint_pipeline.py32
LOWapp/sana_sprint_pipeline.py32
LOWapp/app_sana_inpaint.py8
LOWapp/app_sana_sprint.py17
LOWsana/tools/__init__.py1
LOWsana/tools/__init__.py2
LOWsana/tools/__init__.py2
LOWdiffusion/__init__.py3
LOWdiffusion/__init__.py4
LOWdiffusion/__init__.py4
LOWdiffusion/__init__.py5
LOWdiffusion/__init__.py6
LOWdiffusion/__init__.py7
LOWdiffusion/__init__.py8
LOWdiffusion/__init__.py9
LOWdiffusion/post_training/rewards.py5
LOWdiffusion/post_training/dataset/pickscore/prpocess.py3
LOWdiffusion/refiner/diffusers_ltx2_refiner.py31
LOWdiffusion/guiders/__init__.py1
LOWdiffusion/scheduler/flow_euler_sampler.py26
LOWdiffusion/utils/misc.py30
LOWdiffusion/utils/action_overlay.py33
LOWdiffusion/utils/config_wan.py4
LOWdiffusion/utils/optimizer.py25
LOWdiffusion/model/edm_sample.py26
233 more matches not shown…
Cross-File Repetition52 hits · 260 pts
SeverityFileLineSnippet
HIGHapp/app_sana_multithread.py0<div style='display: flex; align-items: center; justify-content: center; text-align: center;'> <img src="https://raw.git
HIGHapp/app_sana.py0<div style='display: flex; align-items: center; justify-content: center; text-align: center;'> <img src="https://raw.git
HIGHapp/app_sana_inpaint.py0<div style='display: flex; align-items: center; justify-content: center; text-align: center;'> <img src="https://raw.git
HIGHscripts/interface.py0<div style='display: flex; align-items: center; justify-content: center; text-align: center;'> <img src="https://raw.git
HIGHdiffusion/scheduler/scm_scheduler.py0output class for the scheduler's `step` function output. args: prev_sample (`torch.floattensor` of shape `(batch_size, n
HIGHdiffusion/scheduler/lcm_scheduler.py0output class for the scheduler's `step` function output. args: prev_sample (`torch.floattensor` of shape `(batch_size, n
HIGHdiffusion/scheduler/trigflow_scheduler.py0output class for the scheduler's `step` function output. args: prev_sample (`torch.floattensor` of shape `(batch_size, n
HIGHdiffusion/scheduler/scm_scheduler.py0sets the discrete timesteps used for the diffusion chain (to be run before inference). args: num_inference_steps (`int`)
HIGHdiffusion/scheduler/lcm_scheduler.py0sets the discrete timesteps used for the diffusion chain (to be run before inference). args: num_inference_steps (`int`)
HIGHdiffusion/scheduler/trigflow_scheduler.py0sets the discrete timesteps used for the diffusion chain (to be run before inference). args: num_inference_steps (`int`)
HIGHdiffusion/model/dpm_solver.py0compute log(alpha_t) of a given continuous-time label t in [0, t].
HIGHdiffusion/model/dpm_solver.py0compute log(alpha_t) of a given continuous-time label t in [0, t].
HIGHdiffusion/model/sa_solver.py0compute log(alpha_t) of a given continuous-time label t in [0, t].
HIGHdiffusion/model/dpm_solver.py0compute alpha_t of a given continuous-time label t in [0, t].
HIGHdiffusion/model/dpm_solver.py0compute alpha_t of a given continuous-time label t in [0, t].
HIGHdiffusion/model/sa_solver.py0compute alpha_t of a given continuous-time label t in [0, t].
HIGHdiffusion/model/dpm_solver.py0compute sigma_t of a given continuous-time label t in [0, t].
HIGHdiffusion/model/dpm_solver.py0compute sigma_t of a given continuous-time label t in [0, t].
HIGHdiffusion/model/sa_solver.py0compute sigma_t of a given continuous-time label t in [0, t].
HIGHdiffusion/model/dpm_solver.py0compute lambda_t = log(alpha_t) - log(sigma_t) of a given continuous-time label t in [0, t].
HIGHdiffusion/model/dpm_solver.py0compute lambda_t = log(alpha_t) - log(sigma_t) of a given continuous-time label t in [0, t].
HIGHdiffusion/model/sa_solver.py0compute lambda_t = log(alpha_t) - log(sigma_t) of a given continuous-time label t in [0, t].
HIGHdiffusion/model/dpm_solver.py0compute the continuous-time label t in [0, t] of a given half-logsnr lambda_t.
HIGHdiffusion/model/dpm_solver.py0compute the continuous-time label t in [0, t] of a given half-logsnr lambda_t.
HIGHdiffusion/model/sa_solver.py0compute the continuous-time label t in [0, t] of a given half-logsnr lambda_t.
HIGHdiffusion/model/nets/sana_multi_scale_controlnet.py0forward pass of sana. x: (n, c, h, w) tensor of spatial inputs (images or latent representations of images) t: (n,) tens
HIGHdiffusion/model/nets/sana_multi_scale_adaln.py0forward pass of sana. x: (n, c, h, w) tensor of spatial inputs (images or latent representations of images) t: (n,) tens
HIGHdiffusion/model/nets/sana_multi_scale.py0forward pass of sana. x: (n, c, h, w) tensor of spatial inputs (images or latent representations of images) t: (n,) tens
HIGHdiffusion/model/nets/sana.py0forward pass of sana. x: (n, c, h, w) tensor of spatial inputs (images or latent representations of images) t: (n,) tens
HIGHdiffusion/model/nets/sana_multi_scale_controlnet.py0this method allows the object to be called like a function. it simply calls the forward method.
HIGHdiffusion/model/nets/sana_multi_scale_video.py0this method allows the object to be called like a function. it simply calls the forward method.
HIGHdiffusion/model/nets/sana_multi_scale.py0this method allows the object to be called like a function. it simply calls the forward method.
HIGHdiffusion/model/nets/sana.py0this method allows the object to be called like a function. it simply calls the forward method.
HIGHdiffusion/model/nets/sana_multi_scale_video.py0a sana block with global shared adaptive layer norm zero (adaln-zero) conditioning.
HIGHdiffusion/model/nets/sana_multi_scale_video_camctrl.py0a sana block with global shared adaptive layer norm zero (adaln-zero) conditioning.
HIGHdiffusion/model/nets/sana_multi_scale.py0a sana block with global shared adaptive layer norm zero (adaln-zero) conditioning.
HIGHdiffusion/model/nets/sana_multi_scale_video.py0forward pass of sana. x: (n, c, t, h, w) tensor of spatial inputs (images or latent representations of images) t: (n,) t
HIGHdiffusion/model/nets/sana_multi_scale_video.py0forward pass of sana. x: (n, c, t, h, w) tensor of spatial inputs (images or latent representations of images) t: (n,) t
HIGHdiffusion/model/nets/sana_multi_scale_video_camctrl.py0forward pass of sana. x: (n, c, t, h, w) tensor of spatial inputs (images or latent representations of images) t: (n,) t
HIGHdiffusion/model/nets/sana_blocks.py0embeds class labels into vector representations. also handles label dropout for classifier-free guidance.
HIGHdiffusion/model/nets/sana_blocks.py0embeds class labels into vector representations. also handles label dropout for classifier-free guidance.
HIGHdiffusion/model/nets/sana_blocks.py0embeds class labels into vector representations. also handles label dropout for classifier-free guidance.
HIGH…inear/modules/triton_lite_mla_kernels/pad_vk_mm_fwd.py0kernel for computing the matmul c = a x b. a has shape (m, k), b has shape (k, n) and c has shape (m, n)
HIGH…ear/modules/triton_lite_mla_kernels/linear_relu_fwd.py0kernel for computing the matmul c = a x b. a has shape (m, k), b has shape (k, n) and c has shape (m, n)
HIGH…ear/modules/triton_lite_mla_kernels/proj_divide_bwd.py0kernel for computing the matmul c = a x b. a has shape (m, k), b has shape (k, n) and c has shape (m, n)
HIGH…/nets/fastlinear/modules/triton_lite_mla_kernels/mm.py0kernel for computing the matmul c = a x b. a has shape (m, k), b has shape (k, n) and c has shape (m, n)
HIGHdiffusion/model/wan/model.py0args: x(tensor): shape [b, l, c] seq_lens(tensor): shape [b] grid_sizes(tensor): shape [b, 3], the second dimension cont
HIGHdiffusion/model/wan/model.py0args: x(tensor): shape [b, l, c] seq_lens(tensor): shape [b] grid_sizes(tensor): shape [b, 3], the second dimension cont
HIGHdiffusion/model/wan/model.py0args: x(tensor): shape [b, l, c] seq_lens(tensor): shape [b] grid_sizes(tensor): shape [b, 3], the second dimension cont
HIGHscripts/inference_geneval.py0\ @article{ghosh2024geneval, title={geneval: an object-focused framework for evaluating text-to-image alignment}, author
HIGHscripts/inference_geneval_diffusers.py0\ @article{ghosh2024geneval, title={geneval: an object-focused framework for evaluating text-to-image alignment}, author
HIGHscripts/inference_sana_sprint_geneval.py0\ @article{ghosh2024geneval, title={geneval: an object-focused framework for evaluating text-to-image alignment}, author
Hyper-Verbose Identifiers178 hits · 177 pts
SeverityFileLineSnippet
LOWtools/convert_sana_wm_refiner_to_diffusers.py123def convert_connectors_to_diffusers(checkpoint: dict[str, object]) -> dict[str, object]:
LOWtools/metrics/geneval/prompts/create_prompts.py38def generate_single_object_sample(rng: np.random.Generator, size: int = None):
LOWtools/metrics/geneval/prompts/create_prompts.py62def generate_two_object_sample(rng: np.random.Generator):
LOWtools/metrics/geneval/prompts/create_prompts.py128def generate_color_attribution_sample(rng: np.random.Generator):
LOWtools/metrics/clip-score/clip_score.py231def calculate_clip_score_official(dataloader):
LOWtools/metrics/pytorch-fid/compute_fid.py90def calculate_frechet_distance(mu1, sigma1, mu2, sigma2, eps=1e-6):
LOWtools/metrics/pytorch-fid/compute_fid.py123def calculate_activation_statistics(files, model, batch_size=50, dims=2048, device="cpu", num_workers=1):
LOWtools/metrics/pytorch-fid/compute_fid.py130def compute_statistics_of_path(path, model, batch_size, dims, device, num_workers=1, flag="ref"):
LOWtools/metrics/pytorch-fid/compute_fid.py168def calculate_fid_given_paths(paths, batch_size, device, dims, num_workers=1):
LOWtools/metrics/pytorch-fid/tests/test_fid_score.py13def test_calculate_fid_given_statistics(mocker, tmp_path, device):
LOWtools/metrics/pytorch-fid/tests/test_fid_score.py41def test_compute_statistics_of_path(mocker, tmp_path, device):
LOWtools/metrics/pytorch-fid/tests/test_fid_score.py62def test_compute_statistics_of_path_from_file(mocker, tmp_path, device):
LOWtools/metrics/pytorch-fid/src/pytorch_fid/fid_score.py153def calculate_frechet_distance(mu1, sigma1, mu2, sigma2, eps=1e-6):
LOWtools/metrics/pytorch-fid/src/pytorch_fid/fid_score.py206def calculate_activation_statistics(files, model, batch_size=50, dims=2048, device="cpu", num_workers=1):
LOWtools/metrics/pytorch-fid/src/pytorch_fid/fid_score.py230def compute_statistics_of_path(path, model, batch_size, dims, device, num_workers=1):
LOWtools/metrics/pytorch-fid/src/pytorch_fid/fid_score.py242def calculate_fid_given_paths(paths, batch_size, device, dims, num_workers=1):
LOWapp/sana_pipeline.py52def classify_height_width_bin(height: int, width: int, ratios: dict) -> Tuple[int, int]:
LOWapp/sana_controlnet_pipeline.py54def classify_height_width_bin(height: int, width: int, ratios: dict) -> Tuple[int, int]:
LOWapp/sana_pipeline_inpaint.py56def classify_height_width_bin(height: int, width: int, ratios: dict) -> Tuple[int, int]:
LOWapp/sana_sprint_pipeline.py40def classify_height_width_bin(height: int, width: int, ratios: dict) -> Tuple[int, int]:
LOWdiffusion/post_training/rewards.py97def _get_clip_image_transform(processor):
LOWdiffusion/post_training/rewards.py114def _patch_imagereward_compat():
LOWdiffusion/post_training/rewards.py124 def _apply_chunking_to_forward(forward_fn, chunk_size, chunk_dim, *input_tensors):
LOWdiffusion/post_training/rewards.py136 def _find_pruneable_heads_and_indices(heads, n_heads, head_size, already_pruned_heads):
LOW…post_training/diffusers_patch/pipeline_with_logprob.py203def pipeline_with_logprob_flux(
LOW…post_training/diffusers_patch/pipeline_with_logprob.py352def pipeline_with_logprob_sana(
LOWdiffusion/post_training/diffusers_patch/solver.py299def dpm_solver_first_order_update(
LOWdiffusion/post_training/diffusers_patch/solver.py318def multistep_dpm_solver_second_order_update(
LOWdiffusion/refiner/diffusers_ltx2_refiner.py63 def _load_diffusers_components(self) -> tuple[nn.Module, nn.Module]:
LOWdiffusion/refiner/diffusers_ltx2_refiner.py331def _streaming_self_attention(
LOWdiffusion/scheduler/flow_euler_sampler.py91 def add_noise_to_image_conditioning_latents(
LOWdiffusion/scheduler/lcm_scheduler.py88def rescale_zero_terminal_snr(betas):
LOWdiffusion/scheduler/lcm_scheduler.py310 def get_scalings_for_boundary_condition_discrete(self, t):
LOWdiffusion/scheduler/longlive_flow_euler_sampler.py214 def enable_gradient_checkpointing(self):
LOWdiffusion/scheduler/longlive_flow_euler_sampler.py361 def _initialize_cached_modules(self):
LOWdiffusion/scheduler/longlive_flow_euler_sampler.py401 def _create_autoregressive_segments(self, total_frames: int, base_chunk_frames: int) -> List[int]:
LOWdiffusion/scheduler/sa_solver_diffusers.py414 def get_coefficients_exponential_negative(self, order, interval_start, interval_end):
LOWdiffusion/scheduler/sa_solver_diffusers.py438 def get_coefficients_exponential_positive(self, order, interval_start, interval_end, tau):
LOWdiffusion/scheduler/sa_solver_diffusers.py482 def lagrange_polynomial_coefficient(self, order, lambda_list):
LOWdiffusion/scheduler/sa_solver_diffusers.py606 def stochastic_adams_bashforth_update(
LOWdiffusion/scheduler/sa_solver_diffusers.py698 def stochastic_adams_moulton_update(
LOWdiffusion/utils/lr_scheduler.py62def get_cosine_decay_to_constant_with_warmup(
LOWdiffusion/utils/camctrl_config.py145def model_video_camctrl_init_config(config: SanaVideoCamCtrlConfig, latent_size: int = 32):
LOWdiffusion/utils/checkpoint.py286 def load_ckpt_with_auto_reshape(model, state_dict, strict=False):
LOWdiffusion/utils/checkpoint.py367 def load_ckpt_with_auto_reshape(model, state_dict, strict=False):
LOWdiffusion/utils/chunk_utils.py71def chunk_index_from_chunk_size(
LOWdiffusion/utils/chunk_utils.py134def get_chunk_index_from_config(config: Any, num_frames: Optional[int] = None) -> Optional[List[int]]:
LOWdiffusion/utils/logger.py130def rename_file_with_creation_time(file_path):
LOWdiffusion/utils/optimizer.py584 def _dequantize_state_first_step(self, quantized_chunks):
LOWdiffusion/utils/cam_utils.py89def random_rotation_matrix_quaternion(dtype=torch.float32, device="cpu"):
LOWdiffusion/utils/cam_utils.py214def _normalize_poses_identity_unit_distance(
LOWdiffusion/utils/import_utils.py37def is_triton_module_available():
LOWdiffusion/model/model_growth_utils.py109 def _get_num_layers_from_state_dict(self, state_dict):
LOWdiffusion/model/model_growth_utils.py122 def _copy_non_transformer_params(self):
LOWdiffusion/model/respace.py82def truncated_normal_icdf_sample(n, mu, sigma, a, b, device, dtype):
LOWdiffusion/model/respace.py113def compute_density_for_timestep_sampling(
LOWdiffusion/model/respace.py200 def _masked_multinomial_from_logweights(self, logw_col: th.Tensor, starts: th.Tensor, ends: th.Tensor) -> th.Tensor:
LOWdiffusion/model/respace.py226 def sample_step_sequence_batch(
LOWdiffusion/model/respace.py465 def training_losses_diffusers(self, model, *args, **kwargs): # pylint: disable=signature-differs
LOWdiffusion/model/dpm_solver.py891 def get_orders_and_timesteps_for_singlestep_solver(self, steps, order, skip_type, t_T, t_0, device):
118 more matches not shown…
Over-Commented Block171 hits · 168 pts
SeverityFileLineSnippet
LOWenvironment_setup.sh1#!/usr/bin/env bash
LOWtools/create_wids_metadata.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWtools/download.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWtools/convert_sana_wm_refiner_to_diffusers.py1#!/usr/bin/env python3
LOWtools/controlnet/inference_controlnet.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWtrain_video_scripts/train_video_ivjoint_chunk.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWtrain_video_scripts/train_video_ivjoint.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWapp/app_sana_multithread.py1#!/usr/bin/env python
LOWapp/sana_pipeline.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWapp/sana_controlnet_pipeline.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWapp/sana_pipeline_inpaint.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWapp/safety_check.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWapp/app_sana_4bit.py1#!/usr/bin/env python
LOWapp/app_sana.py1#!/usr/bin/env python
LOWapp/sana_sprint_pipeline.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWapp/app_sana_sprint.py1#!/usr/bin/env python
LOWasset/examples.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWasset/docs/quantize/8bit_sana.md1<!-- Copyright 2024 The HuggingFace Team. All rights reserved.
LOWasset/docs/quantize/4bit_sana.md1<!--Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWsana/tools/hf_utils.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWsana/cli/run.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWsana/cli/upload2hf.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES (authored by @Lyken17)
LOWdiffusion/post_training/diffusers_patch/text_encode.py1#!/usr/bin/env python
LOWdiffusion/refiner/diffusers_ltx2_refiner.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/guiders/adaptive_projected_guidance.py1# Copyright 2025 The HuggingFace Team. All rights reserved.
LOWdiffusion/scheduler/dpm_solver.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/scheduler/scm_scheduler.py1# Copyright 2023 Stanford University Team and The HuggingFace Team. All rights reserved.
LOWdiffusion/scheduler/flow_euler_sampler.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/scheduler/iddpm.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/scheduler/sa_sampler.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/scheduler/lcm_scheduler.py1# Copyright 2023 Stanford University Team and The HuggingFace Team. All rights reserved.
LOWdiffusion/scheduler/trigflow_scheduler.py1# Copyright 2023 Stanford University Team and The HuggingFace Team. All rights reserved.
LOWdiffusion/scheduler/sa_solver_diffusers.py1# Licensed under the Apache License, Version 2.0 (the "License");
LOWdiffusion/utils/lr_scheduler.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/utils/camctrl_config.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/utils/misc.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/utils/config.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/utils/checkpoint.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/utils/chunk_utils.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/utils/logger.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/utils/action_overlay.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/utils/optimizer.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/utils/cam_utils.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/utils/dist_utils.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/model/model_growth_utils.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/model/respace.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/model/dpm_solver.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/model/registry.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/model/timestep_sampler.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/model/diffusion_utils.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/model/edm_sample.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/model/builder.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/model/act.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/model/utils.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/model/liger_norms.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/model/gaussian_diffusion.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/model/norms.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/model/sa_solver.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/model/nets/sana_multi_scale_controlnet.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
LOWdiffusion/model/nets/sana_multi_scale_video.py1# Copyright 2024 NVIDIA CORPORATION & AFFILIATES
111 more matches not shown…
Deep Nesting166 hits · 158 pts
SeverityFileLineSnippet
LOWtools/create_wids_metadata.py32
LOWtools/metrics/utils.py4
LOWtools/metrics/geneval/evaluation/evaluate_images.py151
LOWtools/metrics/geneval/generation/diffusers_generate.py84
LOWtools/metrics/clip-score/clip_score.py85
LOWtools/metrics/clip-score/clip_score.py106
LOWtools/metrics/dpg_bench/compute_dpg_bench.py132
LOWtools/metrics/pytorch-fid/compute_fid.py130
LOWtools/convert_scripts/convert_sana_to_svdquant.py47
LOWtools/convert_scripts/convert_sana_to_diffusers.py47
LOW…ols/convert_scripts/convert_sana_video_to_diffusers.py33
LOW…t_scripts/convert_ImgDataset_to_WebDatasetMS_format.py13
LOWtrain_video_scripts/train_video_ivjoint_chunk.py105
LOWtrain_video_scripts/train_video_ivjoint_chunk.py278
LOWtrain_video_scripts/train_video_ivjoint_chunk.py854
LOWtrain_video_scripts/train_video_ivjoint_chunk.py119
LOWtrain_video_scripts/train_video_ivjoint.py240
LOWtrain_video_scripts/train_video_ivjoint.py739
LOWapp/sana_pipeline.py167
LOWapp/sana_controlnet_pipeline.py190
LOWapp/sana_pipeline_inpaint.py324
LOWapp/app_sana_inpaint.py44
LOWapp/app_sana_inpaint.py278
LOWsana/cli/upload2hf.py50
LOWdiffusion/post_training/ema.py27
LOWdiffusion/post_training/diffusers_patch/solver.py15
LOWdiffusion/guiders/adaptive_projected_guidance.py106
LOWdiffusion/scheduler/lcm_scheduler.py175
LOWdiffusion/scheduler/longlive_flow_euler_sampler.py420
LOWdiffusion/scheduler/sa_solver_diffusers.py138
LOWdiffusion/scheduler/sa_solver_diffusers.py334
LOWdiffusion/scheduler/sa_solver_diffusers.py414
LOWdiffusion/scheduler/sa_solver_diffusers.py438
LOWdiffusion/scheduler/sa_solver_diffusers.py482
LOWdiffusion/utils/misc.py317
LOWdiffusion/utils/checkpoint.py137
LOWdiffusion/utils/logger.py197
LOWdiffusion/utils/optimizer.py52
LOWdiffusion/utils/optimizer.py325
LOWdiffusion/utils/optimizer.py501
LOWdiffusion/utils/optimizer.py623
LOWdiffusion/utils/optimizer.py771
LOWdiffusion/utils/import_utils.py48
LOWdiffusion/utils/data_sampler.py105
LOWdiffusion/model/model_growth_utils.py134
LOWdiffusion/model/model_growth_utils.py240
LOWdiffusion/model/model_growth_utils.py297
LOWdiffusion/model/respace.py33
LOWdiffusion/model/respace.py113
LOWdiffusion/model/respace.py320
LOWdiffusion/model/dpm_solver.py266
LOWdiffusion/model/dpm_solver.py389
LOWdiffusion/model/dpm_solver.py439
LOWdiffusion/model/dpm_solver.py824
LOWdiffusion/model/dpm_solver.py1545
LOWdiffusion/model/dpm_solver.py1789
LOWdiffusion/model/edm_sample.py88
LOWdiffusion/model/builder.py138
LOWdiffusion/model/builder.py195
LOWdiffusion/model/builder.py320
106 more matches not shown…
Excessive Try-Catch Wrapping82 hits · 95 pts
SeverityFileLineSnippet
LOWtools/metrics/clip-score/clip_score.py199 except Exception as e:
MEDIUMtools/metrics/clip-score/clip_score.py179def process_sample(sample):
LOWtools/metrics/dpg_bench/compute_dpg_bench.py246 except Exception as e:
LOWtools/metrics/pytorch-fid/compute_fid.py42 except Exception as e:
LOW…t_scripts/convert_ImgDataset_to_WebDatasetMS_format.py52 except Exception as e:
MEDIUM…t_scripts/convert_ImgDataset_to_WebDatasetMS_format.py53 print(f"Error processing file {filename}: {e}")
LOWtrain_video_scripts/train_video_ivjoint.py370 except Exception as e:
MEDIUMtrain_video_scripts/train_video_ivjoint.py371 print(f"Error in vae_encode: {e}")
LOWtrain_video_scripts/train_video_ivjoint.py483 except Exception:
LOWapp/app_sana_inpaint.py253 except Exception as e:
LOWapp/app_sana_inpaint.py264 except Exception as e:
LOWapp/app_sana_inpaint.py469 except Exception as e:
LOWsana/tools/hf_utils.py97 except Exception as e:
MEDIUMsana/tools/hf_utils.py98 print(f"Error downloading file: {e}")
LOWdiffusion/scheduler/longlive_flow_euler_sampler.py307 except Exception:
LOWdiffusion/scheduler/longlive_flow_euler_sampler.py351 except Exception:
LOWdiffusion/utils/git.py167 except Exception as e:
LOWdiffusion/utils/action_overlay.py138 except Exception:
LOWdiffusion/model/nets/sana_multi_scale_video.py1010 except Exception as e:
MEDIUMdiffusion/model/nets/sana_multi_scale_video.py1011 print(f"Error loading {key}: {e}")
LOWdiffusion/model/nets/sana_multi_scale_video_camctrl.py1526 except Exception as e:
MEDIUMdiffusion/model/nets/sana_multi_scale_video_camctrl.py1527 print(f"Error loading {key}: {e}")
LOWdiffusion/model/nets/sana.py402 except Exception as e:
LOWdiffusion/model/dc_ae/efficientvit/apps/utils/image.py69 except Exception:
LOWdiffusion/model/dc_ae/efficientvit/apps/utils/image.py177 except Exception:
LOWdiffusion/model/dc_ae/efficientvit/apps/utils/dist.py43 except Exception:
LOWdiffusion/model/ops/fused_gdn_chunkwise.py1156 except Exception:
LOW…line/sana_inference_interactive_pipeline_long_chunk.py29 except Exception:
LOW…line/sana_inference_interactive_pipeline_long_chunk.py176 except Exception:
LOW…line/sana_inference_interactive_pipeline_long_chunk.py198 except Exception:
LOW…line/sana_inference_interactive_pipeline_long_chunk.py211 except Exception:
LOW…line/sana_inference_interactive_pipeline_long_chunk.py247 except Exception as e:
LOW…line/sana_inference_interactive_pipeline_long_chunk.py250 except Exception:
LOW…ngsana/pipeline/sana_inference_interactive_pipeline.py32 except Exception:
LOW…ngsana/pipeline/sana_inference_interactive_pipeline.py192 except Exception:
LOW…ngsana/pipeline/sana_inference_interactive_pipeline.py249 except Exception:
LOW…ngsana/pipeline/sana_inference_interactive_pipeline.py263 except Exception:
LOW…ngsana/pipeline/sana_inference_interactive_pipeline.py301 except Exception as e:
LOW…ngsana/pipeline/sana_inference_interactive_pipeline.py306 except Exception:
LOWdiffusion/longsana/pipeline/sana_inference_pipeline.py43 except Exception:
LOWdiffusion/longsana/pipeline/sana_training_pipeline.py67 except Exception:
LOWdiffusion/longsana/pipeline/sana_training_pipeline.py619 except Exception:
LOWdiffusion/longsana/pipeline/sana_training_pipeline.py638 except Exception:
LOW…ion/longsana/pipeline/sana_switch_training_pipeline.py111 except Exception as e:
LOW…ion/longsana/pipeline/sana_switch_training_pipeline.py114 except Exception:
LOWdiffusion/longsana/utils/model_wrapper.py147 except Exception:
LOWdiffusion/longsana/utils/model_wrapper.py232 except Exception:
LOWdiffusion/longsana/model/ode_regression_sana.py60 except Exception:
LOWdiffusion/longsana/model/ode_regression_sana.py112 except Exception:
LOWdiffusion/longsana/model/ode_regression_sana.py144 except Exception:
LOWdiffusion/longsana/model/ode_regression_sana.py190 except Exception:
LOWdiffusion/longsana/model/dmd_sana.py109 except Exception:
LOWdiffusion/longsana/model/dmd_sana.py129 except Exception:
LOWdiffusion/longsana/model/dmd_sana.py143 except Exception:
LOWdiffusion/longsana/model/dmd_sana.py224 except Exception:
LOWdiffusion/longsana/trainer/self_forcing_trainer.py400 except Exception as e:
LOWdiffusion/longsana/trainer/self_forcing_trainer.py661 except Exception as _e:
LOWdiffusion/longsana/trainer/longsana_trainer.py470 except Exception as e:
LOWdiffusion/longsana/trainer/longsana_trainer.py476 except Exception as e:
LOWdiffusion/longsana/trainer/ode.py302 except Exception as e:
22 more matches not shown…
Self-Referential Comments27 hits · 80 pts
SeverityFileLineSnippet
MEDIUM…t_scripts/convert_ImgDataset_to_WebDatasetMS_format.py57 # Create a TAR file and include all files
MEDIUMapp/safety_check.py16# This file is copy from https://github.com/mit-han-lab/hart/blob/main/hart/utils/safety_check.py
MEDIUMdiffusion/utils/cam_utils.py77 # Create the base (N, 4, 4) tensor (identity matrix padded)
MEDIUMdiffusion/model/dpm_solver.py17# This file is modified from https://github.com/PixArt-alpha/PixArt-sigma
MEDIUMdiffusion/model/nets/sana_multi_scale_controlnet.py19# This file is modified from https://github.com/PixArt-alpha/PixArt-sigma
MEDIUMdiffusion/model/nets/sana_multi_scale_video.py18# This file is modified from https://github.com/PixArt-alpha/PixArt-sigma
MEDIUMdiffusion/model/nets/sana_blocks.py17# This file is modified from https://github.com/PixArt-alpha/PixArt-sigma
MEDIUMdiffusion/model/nets/sana_multi_scale_adaln.py17# This file is modified from https://github.com/PixArt-alpha/PixArt-sigma
MEDIUMdiffusion/model/nets/sana_gdn_blocks.py49 """This function is intended to align with the l2norm implementation in the FLA library."""
MEDIUMdiffusion/model/nets/sana_U_shape.py17# This file is modified from https://github.com/PixArt-alpha/PixArt-sigma
MEDIUMdiffusion/model/nets/sana_multi_scale_video_camctrl.py18# This file is modified from https://github.com/PixArt-alpha/PixArt-sigma
MEDIUMdiffusion/model/nets/basic_modules.py19# This file is modified from https://github.com/PixArt-alpha/PixArt-sigma
MEDIUMdiffusion/model/nets/sana_U_shape_multi_scale.py17# This file is modified from https://github.com/PixArt-alpha/PixArt-sigma
MEDIUMdiffusion/model/nets/sana_multi_scale.py17# This file is modified from https://github.com/PixArt-alpha/PixArt-sigma
MEDIUMdiffusion/model/nets/sana.py17# This file is modified from https://github.com/PixArt-alpha/PixArt-sigma
MEDIUMdiffusion/data/datasets/sana_data_multi_scale.py18# This file is modified from https://github.com/PixArt-alpha/PixArt-sigma
MEDIUMdiffusion/data/datasets/sana_data.py17# This file is modified from https://github.com/PixArt-alpha/PixArt-sigma
MEDIUMdiffusion/data/datasets/utils.py17# This file is modified from https://github.com/PixArt-alpha/PixArt-sigma
MEDIUMdiffusion/data/wids/wids_tar.py17# This file is copied from https://github.com/NVlabs/VILA/tree/main/llava/wids
MEDIUMdiffusion/data/wids/wids_tar.py49 # Create the index
MEDIUMdiffusion/data/wids/wids_tar.py59 # Create an empty list for the index
MEDIUMdiffusion/data/wids/wids_mmtar.py17# This file is copied from https://github.com/NVlabs/VILA/tree/main/llava/wids
MEDIUMdiffusion/data/wids/__init__.py2# This file is part of the WebDataset library.
MEDIUMdiffusion/data/wids/wids_specs.py17# This file is copied from https://github.com/NVlabs/VILA/tree/main/llava/wids
MEDIUMdiffusion/data/wids/wids.py17# This file is modified from https://github.com/NVlabs/VILA/tree/main/llava/wids
MEDIUMdiffusion/data/wids/wids_dl.py17# This file is copied from https://github.com/NVlabs/VILA/tree/main/llava/wids
MEDIUMdiffusion/data/wids/wids_lru.py17# This file is copied from https://github.com/NVlabs/VILA/tree/main/llava/wids
Verbosity Indicators31 hits · 49 pts
SeverityFileLineSnippet
LOWapp/sana_video_refiner_pipeline_diffusers.py53 # Step 1: Generate latent using Sana Video Pipeline
LOWapp/sana_video_refiner_pipeline_diffusers.py93 # Step 2: Load LTX2 Pipeline
LOWapp/sana_video_refiner_pipeline_diffusers.py168 # Step 3: Manually pack video latent (skip diffusers' normalize, consistent with original code)
LOWapp/sana_video_refiner_pipeline_diffusers.py180 # Step 4: Create audio latent (becomes zero after normalize, consistent with original code)
LOWapp/sana_video_refiner_pipeline_diffusers.py202 # Step 5: LTX2 Stage-2 Refinement
LOWapp/sana_video_refiner_pipeline_diffusers.py233 # Step 6: Save output
LOWdiffusion/longsana/model/ode_regression_sana.py105 # Step 1: Initialize all models
LOWdiffusion/longsana/model/ode_regression_sana.py126 # Step 2: Initialize all hyperparameters
LOWdiffusion/longsana/model/ode_regression_sana.py327 # Step 1: Run generator on noisy latents
LOWdiffusion/longsana/model/ode_regression_sana.py342 # Step 2: Compute the regression loss
LOWdiffusion/longsana/model/dmd_sana.py575 # Step 1: Sample noise and backward simulate the generator's input
LOWdiffusion/longsana/trainer/self_forcing_trainer.py30 # Step 1: Initialize the distributed training environment (rank, seed, dtype, logging etc.)
LOWdiffusion/longsana/trainer/self_forcing_trainer.py68 # Step 2: Initialize the model
LOWdiffusion/longsana/trainer/self_forcing_trainer.py71 # Step 2: Initialize the model and optimizer
LOWdiffusion/longsana/trainer/self_forcing_trainer.py143 # Step 4: Initialize the optimizer
LOWdiffusion/longsana/trainer/self_forcing_trainer.py157 # Step 5: Initialize the dataloader
LOWdiffusion/longsana/trainer/self_forcing_trainer.py172 # Step 6: Initialize the validation dataloader for visualization (fixed prompts)
LOWdiffusion/longsana/trainer/self_forcing_trainer.py446 # Step 1: Get the next batch of text prompts
LOWdiffusion/longsana/trainer/self_forcing_trainer.py462 # Step 2: Extract the conditional infos for sana
LOWdiffusion/longsana/trainer/self_forcing_trainer.py489 # Step 3: Store gradients for the generator (if training the generator)
LOWdiffusion/longsana/trainer/self_forcing_trainer.py510 # Step 4: Store gradients for the critic (if training the critic)
LOWdiffusion/longsana/trainer/ode.py32 # Step 1: Initialize the distributed training environment (rank, seed, dtype, logging etc.)
LOWdiffusion/longsana/trainer/ode.py69 # Step 2: Initialize the model and optimizer
LOWdiffusion/longsana/trainer/ode.py92 # Step 4: Initialize the optimizer
LOWdiffusion/longsana/trainer/ode.py100 # Step 5: Initialize the dataloader
LOWdiffusion/longsana/trainer/ode.py111 # Step 6: Initialize the validation dataloader for visualization (fixed prompts)
LOWdiffusion/longsana/trainer/ode.py466 # Step 1: Get the next batch of text prompts
LOWdiffusion/longsana/trainer/ode.py471 # Step 2: Extract the conditional infos
LOWdiffusion/longsana/trainer/ode.py475 # Step 3: Train the generator
LOWdiffusion/longsana/trainer/ode.py512 # Step 4: Visualization
LOWdiffusion/longsana/trainer/ode.py565 # Step 5: Logging
Docstring Block Structure5 hits · 25 pts
SeverityFileLineSnippet
HIGHdiffusion/utils/chunk_utils.py76Convert chunk_size to chunk_index list with a split strategy. Args: T: Number of latent frames. chu
HIGHdiffusion/utils/chunk_utils.py135Resolve chunk_index from a config, supporting chunk_size and strategy. Priority: 1) config.model.chunk_index
HIGHdiffusion/utils/chunk_utils.py214Return frame-time positions belonging to size-1 (singleton) chunks. A size-1 chunk has no intra-chunk lookahead, so
HIGHdiffusion/utils/chunk_utils.py384Normalize chunk_index and detect if uniform. This function handles all the complex logic for: 1. Converting chu
HIGHdiffusion/model/model_growth_utils.py70 Args: strategy: init strategy name **kwargs: strategy specific parameters Ret
Redundant / Tautological Comments13 hits · 20 pts
SeverityFileLineSnippet
LOWenvironment_setup.sh16# Check if we should skip environment setup entirely (used by CI).
LOWapp/app_sana_inpaint.py449 # Check if this is a new image by comparing with stored original
LOWdiffusion/utils/chunk_utils.py342 # Check if tail (sizes[1:]) is uniform
LOWdiffusion/utils/chunk_utils.py359 # Check if tail (sizes[1:]) is uniform
LOWdiffusion/utils/chunk_utils.py418 # Check if uniform (requires chunk_size for comparison)
LOWdiffusion/utils/chunk_utils.py446 # Check if uniform
LOWdiffusion/utils/data_sampler.py262 # Assign samples to each bucket
LOWdiffusion/model/utils.py136 # Check if resizing is needed
LOWdiffusion/longsana/utils/dataset.py294 # Check if all samples list length is consistent
LOWdiffusion/longsana/model/streaming_sana_long.py376 # Check if previous_frames can be used for overlap and auto-compute overlap frame count
LOWdiffusion/longsana/trainer/self_forcing_trainer.py613 # Check if we've reached max iterations
LOWdiffusion/longsana/trainer/longsana_trainer.py282 # Check if we should train generator on this optimization step
LOWdiffusion/data/wids/wids.py644 # Check if we're missing the cache too often.
Magic Placeholder Names2 hits · 10 pts
SeverityFileLineSnippet
HIGHasset/docs/sana_lora_dreambooth.md111- `report_to="wandb` will ensure the training runs are tracked on [Weights and Biases](https://wandb.ai/site). To use it
HIGHdocs/sana_lora_dreambooth.md111- `report_to="wandb` will ensure the training runs are tracked on [Weights and Biases](https://wandb.ai/site). To use it
Example Usage Blocks2 hits · 4 pts
SeverityFileLineSnippet
LOWenvironment_setup.sh8# Usage:
LOWapp/app_sana_inpaint.py315 ### How to use:
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMdiffusion/longsana/model/dmd_sana.py217 # TODO: Need to make the path more robust.
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippet
LOW…t_scripts/convert_ImgDataset_to_WebDatasetMS_format.py13def process_data(input_dir, output_tar_name="output.tar"):
Slop Phrases1 hit · 0 pts
SeverityFileLineSnippet
LOWtrain_scripts/train_dreambooth_lora_sana.py1016 # make sure to pop weight so that corresponding model is not saved again