MCPcopy Index your code

hub / github.com/NVlabs/Sana / functions

Functions2,606 in github.com/NVlabs/Sana

↓ 1,041 callersMethodto
(self, device)
diffusion/model/wan/vae.py:636
↓ 486 callersMethodget
(self, attribute_name, default=None)
diffusion/utils/config.py:24
↓ 183 callersMethodpop
(self, attribute_name, default=None)
diffusion/utils/config.py:27
↓ 140 callersMethoditems
Return an iterator over the keys of the cache.
diffusion/data/wids/wids_lru.py:61
↓ 104 callersMethodexists
(val)
diffusion/utils/optimizer.py:220
↓ 93 callersMethodlog
(self, n=1)
diffusion/utils/misc.py:150
↓ 92 callersMethodempty_cache
(self)
train_scripts/sol_rl/train_utils.py:123
↓ 68 callersMethodkeys
Return an iterator over the keys of the cache.
diffusion/data/wids/wids_lru.py:65
↓ 58 callersMethodupdate
(self, vars: dict, count: int = 1)
diffusion/utils/logger.py:177
↓ 54 callersMethodfrom_pretrained
(self, model_path)
app/sana_pipeline.py:151
↓ 52 callersFunctiontqdm
(x)
tools/metrics/clip-score/clip_score.py:19
↓ 48 callersMethodencode
videos: A list of videos each with shape [C, T, H, W].
diffusion/model/wan/vae.py:643
↓ 48 callersMethodto
(self, device: torch.device = None, dtype: torch.dtype = None)
diffusion/post_training/ema.py:45
↓ 47 callersMethodsave
(self)
diffusion/longsana/trainer/ode.py:312
↓ 46 callersFunctionget_root_logger
Get root logger. Args: log_file (str, optional): File path of log. Defaults to None. log_level (int, optional): The level of logg
diffusion/utils/logger.py:32
↓ 41 callersMethodload_state_dict
Load model with optimizations
diffusion/model/wan/model.py:1068
↓ 35 callersFunctionis_main_process
(rank)
train_scripts/sol_rl/train_utils.py:66
↓ 32 callersFunctionget_weight_dtype
(mixed_precision)
diffusion/model/utils.py:182
↓ 31 callersMethoddecode
(self, zs)
diffusion/model/wan/vae.py:650
↓ 26 callersFunction_extract_into_tensor
Extract values from a 1-D numpy array for a batch of indices. :param arr: the 1-D numpy array. :param timesteps: a tensor of indices into
diffusion/model/gaussian_diffusion.py:1052
↓ 24 callersMethod__init__
( self, in_dim: int, out_dim: int, heads: Optional[int] = None, heads_
diffusion/model/nets/sana_blocks.py:216
↓ 24 callersFunctionbuild_model
(cfg, use_grad_checkpoint=False, use_fp32_attention=False, gc_step=1, **kwargs)
diffusion/model/builder.py:53
↓ 24 callersMethodrun
(self, *args, **kwargs)
diffusion/model/nets/fastlinear/modules/utils/custom_autotune.py:49
↓ 24 callersMethodsample
(self, imgs, deterministic=False)
diffusion/model/wan/vae.py:528
↓ 23 callersFunctionget_tokenizer_and_text_encoder
(name="T5", device="cuda")
diffusion/model/builder.py:65
↓ 23 callersFunctionget_vae
(name, model_path, device="cuda", dtype=None, config=None)
diffusion/model/builder.py:138
↓ 23 callersFunctionval2tuple
(x: Union[list, tuple, Any], min_len: int = 1, idx_repeat: int = -1)
diffusion/model/dc_ae/efficientvit/models/utils/list.py:53
↓ 22 callersFunctionapply_rotary_emb
Apply rotary embeddings to input tensors using the given frequency tensor. This function applies rotary embeddings to the given query or key
diffusion/model/nets/sana_blocks.py:1549
↓ 22 callersMethodmarginal_lambda
Compute lambda_t = log(alpha_t) - log(sigma_t) of a given continuous-time label t in [0, T].
diffusion/model/sa_solver.py:164
↓ 22 callersFunctionvae_decode
(name, vae, latent)
diffusion/model/builder.py:335
↓ 21 callersFunctionfind_model
Finds a pre-trained G.pt model, downloading it if necessary. Alternatively, loads a model from a local path.
tools/download.py:31
↓ 21 callersMethodmarginal_std
Compute sigma_t of a given continuous-time label t in [0, T].
diffusion/model/dpm_solver.py:179
↓ 20 callersFunctionDPMS
( model, condition, uncondition, cfg_scale, pag_scale=1.0, pag_applied_layers=None,
diffusion/scheduler/dpm_solver.py:23
↓ 20 callersFunction_build_reward
(reward_name, best_of_n, num_image_per_prompt)
configs/sol_rl/sana.py:119
↓ 20 callersFunction_build_reward
(reward_name, best_of_n, num_image_per_prompt)
configs/sol_rl/flux1.py:104
↓ 20 callersFunction_build_reward
(reward_name, best_of_n, num_image_per_prompt)
configs/sol_rl/sd3.py:115
↓ 20 callersFunction_set_run
(cfg, name)
configs/sol_rl/sana.py:141
↓ 20 callersFunction_set_run
(cfg, name)
configs/sol_rl/flux1.py:126
↓ 20 callersFunction_set_run
(cfg, name)
configs/sol_rl/sd3.py:137
↓ 20 callersFunctionexpand_dims
Expand the tensor `v` to the dim `dims`. Args: `v`: a PyTorch tensor with shape [N]. `dim`: a `int`. Returns: a
diffusion/model/dpm_solver.py:2065
↓ 19 callersMethodfrom_pretrained
(cls, pretrained_model_name_or_path: str, **kwargs)
diffusion/model/dc_ae/efficientvit/ae_model_zoo.py:83
↓ 19 callersMethodload_state_dict
(self, sd)
diffusion/longsana/utils/distributed.py:127
↓ 19 callersMethodmarginal_lambda
Compute lambda_t = log(alpha_t) - log(sigma_t) of a given continuous-time label t in [0, T].
diffusion/model/dpm_solver.py:185
↓ 19 callersMethodscaled_dot_product_attention
( query, key, value, attn_mask=None, dropout_p=0.0, is_causal=False, scale=None )
diffusion/model/nets/sana_blocks.py:161
↓ 19 callersMethodtrain
(self)
diffusion/longsana/trainer/ode.py:579
↓ 19 callersFunctionvae_encode
(name, vae, images, sample_posterior=True, device="cuda", cache_key=None, if_cache=False, data_info=None)
diffusion/model/builder.py:208
↓ 18 callersMethodadd_noise
Diffusion forward corruption process. Input: - clean_latent: the clean latent with shape [B, C, H, W] - noise
diffusion/longsana/utils/scheduler.py:14
↓ 18 callersMethodmodel_fn
Convert the model to the noise prediction model or the data prediction model.
diffusion/model/dpm_solver.py:815
↓ 18 callersFunctiont2i_modulate
(x, shift, scale)
diffusion/model/nets/sana_blocks.py:44
↓ 18 callersMethodupdate
(self, val: Union[torch.Tensor, int, float], delta_n=1)
diffusion/model/dc_ae/efficientvit/apps/utils/metric.py:37
↓ 17 callersMethod__init__
( self, in_channels: int, out_channels: int, kernel_size=3, stride=1,
diffusion/model/dc_ae/efficientvit/models/nn/ops.py:376
↓ 17 callersMethodbackward
(ctx, *grads)
diffusion/utils/dist_utils.py:255
↓ 17 callersFunctionnoise_pred_fn
(x, t_continuous, cond=None)
diffusion/model/dpm_solver.py:389
↓ 17 callersFunctionphase_b_triton
Phase B serial-F scan over (B*H,). Forward scan can be seeded with `init_state_kv`/`init_state_z` (autoregressive sampling chunk > 0) and can
diffusion/model/ops/fused_gdn_chunkwise.py:777
↓ 17 callersFunctionprepare_prompt_ar
(prompt, ratios, device="cpu", show=True)
diffusion/model/utils.py:99
↓ 17 callersMethodstep
(self, closure: Optional[Callable] = None)
diffusion/utils/optimizer.py:224
↓ 16 callersFunctionget_world_size
()
diffusion/utils/dist_utils.py:36
↓ 16 callersMethodmarginal_log_mean_coeff
Compute log(alpha_t) of a given continuous-time label t in [0, T].
diffusion/model/dpm_solver.py:162
↓ 16 callersMethodmarginal_std
Compute sigma_t of a given continuous-time label t in [0, T].
diffusion/model/sa_solver.py:158
↓ 16 callersFunctionmodel_init_config
(config: SanaConfig, latent_size: int = 32)
diffusion/utils/config.py:438
↓ 16 callersFunctionsave_checkpoint
( work_dir, epoch, model, accelerator=None, model_ema=None, optimizer=None, lr_sch
diffusion/utils/checkpoint.py:30
↓ 16 callersMethodstate_dict
(self)
diffusion/model/nets/sana_ladd.py:87
↓ 15 callersFunction_profile_section
(profiler: _RefinerLayerCudaProfiler | None, name: str)
diffusion/refiner/diffusers_ltx2_refiner.py:2181
↓ 15 callersFunctionval2tuple
Return tuple with min_len by repeating element at idx_repeat.
diffusion/model/nets/fastlinear/modules/utils/model.py:25
↓ 15 callersMethodvalues
Return an iterator over the values of the cache.
diffusion/data/wids/wids_lru.py:69
↓ 14 callersFunction_env_flag
(name: str)
diffusion/refiner/diffusers_ltx2_refiner.py:2279
↓ 14 callersMethodmarginal_alpha
Compute alpha_t of a given continuous-time label t in [0, T].
diffusion/model/sa_solver.py:152
↓ 13 callersFunctionauto_grad_checkpoint
(module, *args, **kwargs)
diffusion/model/utils.py:62
↓ 13 callersMethodend
(self, name)
train_scripts/sol_rl/train_utils.py:104
↓ 13 callersMethodstart
(self, name)
train_scripts/sol_rl/train_utils.py:98
↓ 13 callersMethodupdate
(self, fsdp_module)
diffusion/longsana/utils/distributed.py:115
↓ 12 callersMethod__init__
(self, dim, out_dim, patch_size, eps=1e-6)
diffusion/model/wan/model.py:700
↓ 12 callersMethodbackward
(ctx, grad_y: torch.Tensor)
diffusion/model/nets/fastlinear/modules/triton_lite_mla.py:71
↓ 12 callersFunctionbuild_dataloader
(dataset, batch_size=256, num_workers=4, shuffle=True, dataloader_type="video", **kwargs)
diffusion/data/builder.py:85
↓ 12 callersMethodfrom_pretrained
load pretrained SANA weights: - always load model_path to generator - when fake_sana=True and fake is SANA, load fake_ckpt ex
diffusion/longsana/model/dmd_sana.py:94
↓ 12 callersFunctionget_act_name
(act: nn.Module or None)
diffusion/model/nets/fastlinear/modules/nn/act.py:53
↓ 12 callersMethodget_mean_of_top_rewards
(self, top_percentage)
diffusion/post_training/stat_tracking.py:42
↓ 12 callersFunctionhalf
(x)
diffusion/model/wan/attention.py:66
↓ 12 callersMethodmodel
(self)
diffusion/model/nets/sana_ladd.py:76
↓ 11 callersMethod__init__
( self, in_channels: int, out_channels: int, factor_t, factor_s=1,
diffusion/model/wan2_2/vae.py:346
↓ 11 callersFunction_record
(event, stream)
inference_video_scripts/wm/streaming_pipeline.py:271
↓ 11 callersMethodclear
(self)
diffusion/utils/logger.py:168
↓ 11 callersMethoddecode_to_pixel
(self, latent: torch.Tensor, use_cache: bool = False)
diffusion/longsana/utils/model_wrapper.py:243
↓ 11 callersMethodstate_dict
(self)
diffusion/post_training/ema.py:84
↓ 10 callersMethod__init__
(self, channel_dim: int = 1, eps: float = 1e-8)
diffusion/model/ltx2/causal_vae.py:232
↓ 10 callersMethodclear_cache
(self)
diffusion/model/wan/vae.py:535
↓ 10 callersFunctionget_rank
()
diffusion/utils/dist_utils.py:44
↓ 10 callersFunctionget_submodule_weights
(weights: collections.OrderedDict, prefix: str)
diffusion/model/dc_ae/efficientvit/models/utils/network.py:95
↓ 10 callersMethodload_state_dict
when the channel in FFN is not the same as the checkpoint, load the checkpoint
diffusion/model/nets/sana_multi_scale_video.py:844
↓ 10 callersMethodmodel_fn
Convert the model to the noise prediction model or the data prediction model.
diffusion/model/sa_solver.py:426
↓ 10 callersFunctionphase_a
Compute (I-P_kv), A, (I-P_z), B for all (B, H, F) via 2 kernels (KV + Z). `skip_relu=True` makes the K-stream prep a pure linear chain (no ReLU o
diffusion/model/ops/fused_gdn_chunkwise.py:512
↓ 10 callersFunctionphase_c
Phase C Pass-2 output. Optionally accumulates into caller-provided ``num_out``/``den_out`` buffers (used to fuse reverse-direction output into
diffusion/model/ops/fused_gdn_chunkwise.py:1290
↓ 10 callersFunctionrope_apply
(x, grid_sizes, freqs)
diffusion/model/wan/model.py:135
↓ 10 callersFunctionset_random_seed
Set random seed. Args: seed (int): Seed to be used. deterministic (bool): Whether to set the deterministic option for
diffusion/utils/misc.py:121
↓ 10 callersMethodset_start
(self, start)
diffusion/data/wids/wids.py:1009
↓ 10 callersFunctionunwrap_compiled
(model)
train_scripts/sol_rl/train_utils.py:346
↓ 9 callersFunction_empty_cuda_cache
()
diffusion/refiner/diffusers_ltx2_refiner.py:2620
↓ 9 callersFunction_move_to_device
(value, device)
diffusion/post_training/diffusers_patch/text_encode.py:22
↓ 9 callersFunctionbuild_act
(name: str or None, **kwargs)
diffusion/model/nets/fastlinear/modules/nn/act.py:40
↓ 9 callersFunctionbuild_act
(name: str, **kwargs)
diffusion/model/dc_ae/efficientvit/models/nn/act.py:37
next →1–100 of 2,606, ranked by callers