MCPcopy Create free account

hub / github.com/NVlabs/Sana / functions

Functions2,606 in github.com/NVlabs/Sana

↓ 3 callersFunctioncompute_statistics_of_path
(path, model, batch_size, dims, device, num_workers=1)
tools/metrics/pytorch-fid/src/pytorch_fid/fid_score.py:230
↓ 3 callersFunctioncompute_text_embeddings
(prompt, text_encoding_pipeline)
train_scripts/train_dreambooth_lora_sana.py:1162
↓ 3 callersMethodcopy_ema_to
(self, parameters: Iterable[torch.nn.Parameter], store_temp: bool = True, grad=False)
diffusion/post_training/ema.py:62
↓ 3 callersMethodcopy_temp_to
(self, parameters: Iterable[torch.nn.Parameter])
diffusion/post_training/ema.py:73
↓ 3 callersFunctioncosine_similarity
(x, y, dim=1)
diffusion/model/wan/model.py:34
↓ 3 callersFunctioncreate_block_mask_cached
(score_mod, B, H, M, N, device="cuda", _compile=False)
diffusion/model/utils.py:194
↓ 3 callersMethoddecode_chunk
Decode one latent block, mutating the VAE's persistent feature cache. Args: z_chunk: Normalized latent block ``(B, C, T_lat_block
diffusion/model/ltx2/streaming_decoder.py:67
↓ 3 callersFunctiondefault_localname
(dldir="/tmp/_wids_cache")
diffusion/data/wids/wids.py:378
↓ 3 callersMethoddilate
Dilate mask to expand mask regions Args: mask: PIL Image mask kernel_size: int, dilation kernel size
app/app_sana_inpaint.py:125
↓ 3 callersMethoddpm_solver_first_update
DPM-Solver-1 (equivalent to DDIM) from time `s` to time `t`. Args: x: A pytorch tensor. The initial value at time `s`.
diffusion/model/dpm_solver.py:986
↓ 3 callersMethodencode
(self, x, scale)
diffusion/model/wan2_2/vae.py:735
↓ 3 callersFunctionencode_image
(name, image_encoder, images, device="cuda", image_processor=None, dtype=None)
diffusion/model/builder.py:120
↓ 3 callersFunctionextract_prompt_reward_group
(prompt_idx, prompt_text, prompt_meta, intra_prompt_data_list)
train_scripts/sol_rl/train_utils.py:172
↓ 3 callersFunctionextract_value
(regex, exp_name)
tools/metrics/utils.py:23
↓ 3 callersFunctionextract_value
(regex, exp_name)
diffusion/utils/logger.py:216
↓ 3 callersFunctionfilter_by_indices
(collated_samples, keep_indices)
train_scripts/sol_rl/train_utils.py:273
↓ 3 callersFunctionfind_resume_candidates
Return a list of ``(step, path)`` checkpoint candidates sorted by step descending.
train_scripts/sol_rl/train_utils.py:477
↓ 3 callersMethodforward
( self, x: torch.Tensor, mask: torch.Tensor | None = None, HW: tuple[int, int,
diffusion/model/nets/sana_gdn_camctrl_blocks.py:546
↓ 3 callersMethodforward_main
(self, x: torch.Tensor)
diffusion/model/dc_ae/efficientvit/models/nn/ops.py:937
↓ 3 callersFunctionfused_bigdn_bidi_chunkwise
Bidi chunkwise GDN forward, optionally with state-cache for autoregressive sampling (chunk 0 = full bidi with state save; chunks > 0 seed forward
diffusion/model/ops/fused_gdn_chunkwise.py:1383
↓ 3 callersFunctionget_1d_rotary_pos_embed
Precompute the frequency tensor for complex exponentials (cis) with given dimensions. This function calculates a frequency tensor with compl
diffusion/model/nets/sana_blocks.py:1483
↓ 3 callersFunctionget_args
()
app/app_sana_inpaint.py:17
↓ 3 callersFunctionget_closest_ratio
(height: float, width: float, ratios: dict)
diffusion/data/transforms.py:173
↓ 3 callersFunctionget_device
(model: nn.Module)
diffusion/model/dc_ae/efficientvit/models/utils/network.py:41
↓ 3 callersFunctionget_model_input_time
Convert the continuous-time `t_continuous` (in [epsilon, T]) to the model input time. For discrete-time DPMs, we convert `t_continuou
diffusion/model/dpm_solver.py:376
↓ 3 callersFunctionget_norm_name
(norm: nn.Module or None)
diffusion/model/norms.py:69
↓ 3 callersMethodget_output
(self)
diffusion/model/wan/model.py:103
↓ 3 callersMethodget_results
(self, aggregate=True)
train_scripts/sol_rl/train_utils.py:113
↓ 3 callersFunctionget_same_padding
(kernel_size: Union[int, tuple[int, ...]])
diffusion/model/dc_ae/efficientvit/models/utils/network.py:49
↓ 3 callersMethodget_stats
(self)
diffusion/post_training/stat_tracking.py:34
↓ 3 callersFunctionis_dist_initialized
()
diffusion/model/dc_ae/efficientvit/apps/utils/dist.py:50
↓ 3 callersFunctionis_uniform_chunking
Check if chunk_index represents uniform chunking. Returns True if all chunks are equal to chunk_size except possibly the last chunk which may
diffusion/utils/chunk_utils.py:241
↓ 3 callersFunctionlist_join
(x: list, sep="\t", format_str="%s")
diffusion/model/dc_ae/efficientvit/models/utils/list.py:43
↓ 3 callersFunctionlist_sum
(x: list)
diffusion/model/dc_ae/efficientvit/models/utils/list.py:30
↓ 3 callersFunctionload_config
Load a yaml file.
diffusion/model/dc_ae/efficientvit/apps/utils/misc.py:105
↓ 3 callersFunctionload_image
(data_path: str, mode="rgb")
diffusion/model/dc_ae/efficientvit/apps/utils/image.py:29
↓ 3 callersFunctionlog_rollout_images
Save debug images to disk and log to wandb during rollout.
train_scripts/sol_rl/train_utils.py:546
↓ 3 callersMethodmarginal_log_mean_coeff
Compute log(alpha_t) of a given continuous-time label t in [0, T].
diffusion/model/sa_solver.py:137
↓ 3 callersFunctionnormalize_chunk_index
Normalize chunk_index and detect if uniform. This function handles all the complex logic for: 1. Converting chunk_size + strategy → chunk_ind
diffusion/utils/chunk_utils.py:378
↓ 3 callersFunctionpixel_shuffle_3d
(x: torch.Tensor, spatial_factor: int, temporal_factor: int)
diffusion/model/dc_ae/efficientvit/models/nn/ops_3d.py:359
↓ 3 callersFunctionpixel_unshuffle_3d
(x: torch.Tensor, spatial_factor: int, temporal_factor: int)
diffusion/model/dc_ae/efficientvit/models/nn/ops_3d.py:332
↓ 3 callersFunctionprepare_prope_fns
Precompute UCPE apply functions once for a batch (shared across all blocks). Only ``camctrl_type == "UCPE"`` is supported. Accepts either precom
diffusion/model/nets/sana_camctrl_blocks.py:591
↓ 3 callersMethodprepare_transformer_nvfp4
Lazily replace eligible refiner Linear layers with TE NVFP4 Linear modules.
diffusion/refiner/diffusers_ltx2_refiner.py:192
↓ 3 callersMethodq_sample
Diffuse the data for a given number of diffusion steps. In other words, sample from q(x_t | x_0). :param x_start: the initial
diffusion/model/gaussian_diffusion.py:255
↓ 3 callersFunctionread_inference_count
()
app/app_sana_sprint.py:120
↓ 3 callersMethodrefine_block
Refine one AR block; advance internal KV state. Args: block_idx: 0-based block index in the AR schedule. Used only for
diffusion/refiner/diffusers_ltx2_refiner.py:1037
↓ 3 callersMethodregister_forward_hook
(self)
diffusion/utils/misc.py:345
↓ 3 callersMethodrelease_handler
(self, key, value)
diffusion/data/wids/wids.py:412
↓ 3 callersFunctionreplace_linear_with_te
(model, skip_modules=None, min_dim=0, _prefix="")
train_scripts/sol_rl/train_utils.py:410
↓ 3 callersFunctionresize
(clip, target_size, interpolation_mode)
diffusion/data/transforms.py:48
↓ 3 callersFunctionresume_from_checkpoint
Try to load training state from *candidates* (output of :func:`find_resume_candidates`). *peft_model* should be the unwrapped PeftModel (use
train_scripts/sol_rl/train_utils.py:507
↓ 3 callersFunctionreturn_decay
(step, decay_type, custom_decay_step=0, custom_decay_value=0.0)
train_scripts/sol_rl/train_utils.py:222
↓ 3 callersFunctionrope_params
(max_seq_len, dim, theta=10000)
diffusion/model/wan/model.py:125
↓ 3 callersFunctionrun_sampling
( v_pred_fn, z, sigma_schedule, solver="flow", determistic=False, eta=0.7, )
diffusion/post_training/diffusers_patch/solver.py:15
↓ 3 callersMethodsample
(self, latents: torch.Tensor, **kwargs)
diffusion/scheduler/longlive_flow_euler_sampler.py:444
↓ 3 callersFunctionsave_ckpt
Save LoRA adapters, EMA, optimizer and scaler to a checkpoint directory.
train_scripts/sol_rl/train_utils.py:460
↓ 3 callersFunctionsave_debug_image_subset
(images, prompts, save_root, prefix, resolution, rewards=None, max_images=6)
train_scripts/sol_rl/train_utils.py:328
↓ 3 callersFunctionsave_step_reward_groups
(config, global_step, epoch, rank, world_size, prompt_reward_groups)
train_scripts/sol_rl/train_utils.py:198
↓ 3 callersFunctionscrub_value
(value: object)
diffusion/refiner/diffusers_ltx2_refiner.py:2347
↓ 3 callersFunctionscrub_value
(value: object)
inference_video_scripts/wm/inference_sana_wm.py:211
↓ 3 callersMethodset_timesteps
Sets the discrete timesteps used for the diffusion chain (to be run before inference). Args: num_inference_steps (`int`):
diffusion/scheduler/scm_scheduler.py:78
↓ 3 callersFunctionset_value
(owner: object, key: object, old_value: object, new_value: object, kind: str)
diffusion/refiner/diffusers_ltx2_refiner.py:2338
↓ 3 callersFunctionset_value
(owner: object, key: object, old_value: object, new_value: object, kind: str)
inference_video_scripts/wm/inference_sana_wm.py:202
↓ 3 callersFunctionsetup_distributed
(rank, local_rank, world_size)
train_scripts/sol_rl/train_utils.py:54
↓ 3 callersMethodsinglestep_dpm_solver_second_update
Singlestep solver DPM-Solver-2 from time `s` to time `t`. Args: x: A pytorch tensor. The initial value at time `s`.
diffusion/model/dpm_solver.py:1029
↓ 3 callersFunctionslice_prompt_metadata
(prompt_metadata, prompt_idx)
train_scripts/sol_rl/train_utils.py:152
↓ 3 callersMethodstep
Predict the sample from the previous timestep by reversing the SDE. This function propagates the diffusion process from the learned m
diffusion/scheduler/lcm_scheduler.py:318
↓ 3 callersMethodstep
Predict the sample from the previous timestep by reversing the SDE. This function propagates the diffusion process from the learned m
diffusion/scheduler/scm_scheduler.py:122
↓ 3 callersMethodstep
(self, parameters: Iterable[torch.nn.Parameter], optimization_step)
diffusion/post_training/ema.py:27
↓ 3 callersFunctionsynchronize
Helper function to synchronize (barrier) among all processes when using distributed training
diffusion/utils/dist_utils.py:88
↓ 3 callersMethodtraining_losses
(self, model, *args, **kwargs)
diffusion/model/respace.py:462
↓ 3 callersFunctionucm_unproject_grid_fov
Unproject grid with intrinsics expressed as FoV (degrees) + xi.
diffusion/model/nets/sana_camctrl_blocks.py:203
↓ 3 callersMethodunpatchify
x: (N, T, patch_size**2 * C) imgs: (N, H, W, C)
diffusion/model/nets/sana.py:358
↓ 3 callersFunctionunwrap_model
(model)
train_scripts/train_dreambooth_lora_sana.py:1000
↓ 3 callersMethodupdate
(self, prompts, rewards, exp=False)
diffusion/post_training/stat_tracking.py:11
↓ 3 callersFunctionval2list
(x: Union[list, tuple, Any], repeat_time=1)
diffusion/model/dc_ae/efficientvit/models/utils/list.py:47
↓ 3 callersMethodvideo_decode
(self, z: torch.Tensor)
diffusion/model/dc_ae/efficientvit/models/efficientvit/dc_ae.py:654
↓ 3 callersMethodvideo_encode
(self, x: torch.Tensor)
diffusion/model/dc_ae/efficientvit/models/efficientvit/dc_ae.py:634
↓ 3 callersFunctionwrap_forward_with_fp8
(module)
train_scripts/sol_rl/train_utils.py:370
↓ 2 callersFunctionHWC3
(x)
tools/controlnet/annotator/util.py:10
↓ 2 callersMethod__init__
(self)
tools/controlnet/annotator/hed/__init__.py:72
↓ 2 callersMethod__init__
(self)
diffusion/utils/logger.py:162
↓ 2 callersMethod__init__
(self, model, timestep_map, original_num_steps)
diffusion/model/respace.py:485
↓ 2 callersMethod__init__
( self, vocab_size=250002, max_seq_len=514, type_size=1, pad_id=1,
diffusion/model/wan/xlm_roberta.py:77
↓ 2 callersMethod__init__
( self, input_size=32, patch_size=2, in_channels=4, hidden_size=1152,
diffusion/model/nets/sana_multi_scale.py:169
↓ 2 callersMethod__init__
( self, in_dim: int, out_dim: int, *, cam_dim: int, cam_heads:
diffusion/model/nets/sana_gdn_camctrl_blocks.py:200
↓ 2 callersMethod__init__
(self, model_name: str)
diffusion/model/dc_ae/efficientvit/ae_model_zoo.py:72
↓ 2 callersMethod__init__
(self, size: int)
diffusion/model/dc_ae/efficientvit/apps/utils/image.py:80
↓ 2 callersMethod__init__
(self, cfg: DCAEConfig)
diffusion/model/dc_ae/efficientvit/models/efficientvit/dc_ae.py:515
↓ 2 callersMethod__init__
(self, cfg: DCAEWithTemporalConfig)
diffusion/model/dc_ae/efficientvit/models/efficientvit/dc_ae_with_temporal.py:525
↓ 2 callersMethod__init__
(self, sana_cfg, device: torch.device, dtype: torch.dtype)
diffusion/longsana/utils/model_wrapper.py:224
↓ 2 callersMethod__init__
( self, config: InferenceConfig, model_path: str | Path, *, device: to
inference_video_scripts/wm/inference_sana_wm.py:891
↓ 2 callersMethod_accumulate_kv_cache
(self, kv_cache, chunk_idx)
diffusion/longsana/pipeline/sana_inference_interactive_pipeline_long_chunk.py:119
↓ 2 callersMethod_accumulate_kv_cache
(self, kv_cache, chunk_idx)
diffusion/longsana/pipeline/sana_inference_interactive_pipeline.py:135
↓ 2 callersMethod_apply_positional_embedding
Apply positional embedding to input tensor. Args: x: Input tensor (N, T, D) bs: Batch size start_f: Start
diffusion/model/nets/sana_multi_scale_video.py:536
↓ 2 callersMethod_apply_spatial
Fused spatial pipeline: inverted_conv -> depth_conv -> GLU -> point_conv.
diffusion/model/nets/basic_modules.py:159
↓ 2 callersMethod_approx_sq_grad
(self, exp_avg_sq_row, exp_avg_sq_col)
diffusion/utils/optimizer.py:320
↓ 2 callersMethod_approx_sq_grad
(self, exp_avg_sq_row, exp_avg_sq_col)
diffusion/utils/optimizer.py:618
↓ 2 callersMethod_as_embedding
(features)
diffusion/post_training/rewards.py:266
↓ 2 callersMethod_attention_backend_context
(self)
diffusion/refiner/diffusers_ltx2_refiner.py:252
← previousnext →301–400 of 2,606, ranked by callers