MCPcopy Create free account

hub / github.com/NVlabs/Sana / functions

Functions2,606 in github.com/NVlabs/Sana

↓ 4 callersMethod_draw_arrow
(d: ImageDraw.ImageDraw, cx: int, cy: int, direction: str, active: bool, size: int)
diffusion/utils/action_overlay.py:253
↓ 4 callersMethod_initialize_kv_cache
Initialize per-chunk KV cache containers for SANA cached modules.
diffusion/longsana/pipeline/sana_training_pipeline.py:578
↓ 4 callersFunction_is_tensor_video_clip
(clip)
diffusion/data/transforms.py:28
↓ 4 callersFunction_mark_step_begin
()
inference_video_scripts/wm/streaming_pipeline.py:281
↓ 4 callersFunction_maybe_drop_cam_branch
Optionally zero-out the camera branch during training (drop-path style).
diffusion/model/nets/sana_camctrl_blocks.py:53
↓ 4 callersMethod_move_vae_decoder_for_streaming
(self, device: torch.device | str)
inference_video_scripts/wm/inference_sana_wm.py:1186
↓ 4 callersMethod_prepare_frame_valid_masks
Convert frame-valid mask to token/beta/decay masks used by GDN blocks.
diffusion/model/nets/sana_gdn_blocks.py:478
↓ 4 callersFunction_prepare_ray_apply_fns
Build ``(apply_q, apply_kv, apply_o)`` block-diagonal callables for UCPE.
diffusion/model/nets/sana_camctrl_blocks.py:533
↓ 4 callersFunction_set_capture_flag_on_blocks
Toggle ``_kv_cache_capture`` (pre-RoPE) or ``_tf_capture_kv`` (post-RoPE) per block.
diffusion/refiner/diffusers_ltx2_refiner.py:1826
↓ 4 callersFunction_shape_of
Get shape of tensor if it is a torch.Tensor.
diffusion/model/ltx2/causal_vae.py:49
↓ 4 callersFunction_stage1_nvfp4_mode
()
inference_video_scripts/wm/inference_sana_wm.py:278
↓ 4 callersFunction_store_kv_tensor
(tensor: torch.Tensor, dtype: torch.dtype | None)
diffusion/refiner/diffusers_ltx2_refiner.py:2254
↓ 4 callersMethod_streaming_prompt_cache_enabled
(self)
inference_video_scripts/wm/inference_sana_wm.py:1329
↓ 4 callersMethodattn_matmul
(self, q, k, v: torch.Tensor)
diffusion/model/nets/sana_blocks.py:246
↓ 4 callersFunctionauto_scale_lr
(effective_bs, optimizer_cfg, rule="linear", base_batch_size=256)
diffusion/utils/optimizer.py:37
↓ 4 callersMethodaverage
Average latest n values or all values.
diffusion/utils/logger.py:186
↓ 4 callersFunctionbuild
(name="cw_cuda_ext_v1", extra_cuda=None)
diffusion/model/ops/fused_gdn_chunkwise_cuda.py:729
↓ 4 callersFunctionbuild_lr_scheduler
(config, optimizer, train_dataloader, lr_scale_ratio)
diffusion/utils/lr_scheduler.py:26
↓ 4 callersFunctioncam_scan_chunkwise
Drop-in chunkwise replacement for `cam_scan_func`. Args mirror `cam_scan_func` exactly: q, k, v: ``(B, H, D, N)`` fp32 contiguous (cam-prep
diffusion/model/ops/fused_gdn_chunkwise.py:1892
↓ 4 callersMethodclear
(self)
diffusion/model/wan/model.py:97
↓ 4 callersMethodclear
Clear all cache state.
diffusion/model/ltx2/causal_vae.py:122
↓ 4 callersMethodclear_cache
(self)
diffusion/model/wan2_2/vae.py:803
↓ 4 callersFunctioncompute_fov_from_fx_xi
Inverse of :func:`compute_fx_from_fov_xi`.
diffusion/model/nets/sana_camctrl_blocks.py:175
↓ 4 callersFunctioncompute_fx_from_fov_xi
Recover focal length ``fx`` from horizontal FoV (degrees) + UCM xi.
diffusion/model/nets/sana_camctrl_blocks.py:149
↓ 4 callersFunctioncompute_text_embeddings
(prompts, text_encoders, tokenizers, max_sequence_length, device)
train_scripts/sol_rl/train_sd3.py:86
↓ 4 callersFunctioncrop
Args: clip (torch.tensor): Video clip to be cropped. Size is (T, C, H, W)
diffusion/data/transforms.py:38
↓ 4 callersMethodenable_tiling
Enable tiled VAE decoding for memory-efficient processing of large videos.
diffusion/model/ltx2/causal_vae.py:1580
↓ 4 callersMethodencode
(text: str, length: int)
inference_video_scripts/wm/inference_sana_wm.py:1282
↓ 4 callersMethodencode_to_latent
(self, pixel: torch.Tensor)
diffusion/longsana/utils/model_wrapper.py:238
↓ 4 callersMethodforward
Forward pass of Sana. x: (N, C, H, W) tensor of spatial inputs (images or latent representations of images) t: (N,) tensor of
diffusion/model/nets/sana_multi_scale.py:323
↓ 4 callersMethodfwdbwd_one_step
(self, batch, train_generator)
diffusion/longsana/trainer/self_forcing_trainer.py:440
↓ 4 callersMethodgenerate_and_sync_list
(self, num_blocks, num_denoising_steps, device)
diffusion/longsana/pipeline/sana_training_pipeline.py:128
↓ 4 callersMethodget_coefficients_fn
Calculate the coefficient of gradients.
diffusion/model/sa_solver.py:640
↓ 4 callersFunctionget_logger
Initialize and get a logger by name. If the logger has not been initialized, this method will initialize the logger by adding one or two hand
diffusion/utils/logger.py:65
↓ 4 callersMethodget_text_embeddings
(self, text_prompts, use_chi_prompt=True)
diffusion/longsana/trainer/ode.py:355
↓ 4 callersFunctionget_transform
(type, resolution)
diffusion/data/transforms.py:237
↓ 4 callersFunctionhash_dataset_name
Compute a hash of the input string and return the first 16 characters of the hash.
diffusion/data/wids/wids.py:456
↓ 4 callersFunctioninit_random_seed
Initialize random seed. If the seed is not set, the seed will be automatically randomized, and then broadcast to all processes to prevent som
diffusion/utils/misc.py:88
↓ 4 callersMethodinitialize
Args: strategy: init strategy name **kwargs: strategy specific parameters Returns: initialized
diffusion/model/model_growth_utils.py:69
↓ 4 callersMethodinitialize_weights
(self)
diffusion/model/nets/sana.py:373
↓ 4 callersFunctionis_master
()
diffusion/model/dc_ae/efficientvit/apps/utils/dist.py:62
↓ 4 callersMethodmultistep_dpm_solver_update
Multistep DPM-Solver with the order `order` from time `t_prev_list[-1]` to time `t`. Args: x: A pytorch tensor. The init
diffusion/model/dpm_solver.py:1396
↓ 4 callersFunctionnoise_pred_fn
(x, t_continuous, cond=None)
diffusion/model/sa_solver.py:308
↓ 4 callersMethodoffload_video_unused_audio_modules
Keep LTX-2 audio-only branches off GPU for this wrapper's video-only forward.
diffusion/refiner/diffusers_ltx2_refiner.py:235
↓ 4 callersMethodopen_zip_file
(path: str)
diffusion/data/datasets/video/sana_video_data.py:234
↓ 4 callersMethodp_mean_variance
Apply the model to get p(x_{t-1} | x_t), as well as a prediction of the initial x, x_0. :param model: the model, which takes
diffusion/model/gaussian_diffusion.py:298
↓ 4 callersFunctionpipeline_with_logprob_flux
( pipeline, prompt=None, prompt_2=None, height=None, width=None, num_inference_steps=2
diffusion/post_training/diffusers_patch/pipeline_with_logprob.py:203
↓ 4 callersFunctionpipeline_with_logprob_sana
( transformer, vae, *, latents=None, num_channels=None, latent_size=None, prompt_e
diffusion/post_training/diffusers_patch/pipeline_with_logprob.py:352
↓ 4 callersFunctionpipeline_with_logprob_sd3
( self, prompt: Union[str, List[str]] = None, prompt_2: Optional[Union[str, List[str]]] = None,
diffusion/post_training/diffusers_patch/pipeline_with_logprob.py:38
↓ 4 callersFunctionread_inference_count
()
app/app_sana_multithread.py:121
↓ 4 callersFunctionretrieve_row_from_lmdb
Retrieve a specific row from a specific array in the LMDB.
diffusion/longsana/utils/lmdb.py:56
↓ 4 callersFunctiontransform_control_signal
(control_signal, hw)
tools/controlnet/utils.py:15
↓ 4 callersFunctionurldir
Return the directory part of a url.
diffusion/data/wids/wids_specs.py:27
↓ 4 callersFunctionwrite_video
(output_dir: Path, name: str, video_hwc: np.ndarray, fps: int, logger: logging.Logger)
inference_video_scripts/wm/inference_sana_wm.py:867
↓ 3 callersFunctionScheduler
( timestep_respacing, noise_schedule="linear", use_kl=False, sigma_small=False, predict_xs
diffusion/scheduler/iddpm.py:26
↓ 3 callersMethod__init__
( self, params, lr: float = 1e-4, betas: Tuple[float, float] = (0.9, 0.99),
diffusion/utils/optimizer.py:193
↓ 3 callersMethod__init__
( self, in_dim: int, out_dim: int, kernel_size=3, stride=1, di
diffusion/model/nets/basic_modules_linear.py:64
↓ 3 callersMethod__init__
(self, norm_module)
diffusion/model/nets/sana_multi_scale_video_camctrl.py:95
↓ 3 callersMethod__init__
(self, channels: int, c_dim: int, cmap_dim: int = 64)
diffusion/model/nets/ladd_blocks.py:85
↓ 3 callersMethod_apply_temporal_short_conv
Apply causal ShortConvolution along T, with S merged into batch. Under CP, a causal conv of kernel size K needs K-1 left-context fram
diffusion/model/nets/sana_gdn_blocks.py:416
↓ 3 callersMethod_apply_temporal_short_conv
Route short conv: chunk-causal when chunk boundaries exist, else bidirectional. For single-chunk (``chunk_size >= T``) or no chunk_size, use
diffusion/model/nets/sana_gdn_camctrl_blocks.py:358
↓ 3 callersFunction_build_generators_from_seeds
(seed_list, device)
train_scripts/sol_rl/train_flux1.py:111
↓ 3 callersFunction_build_sd3_latents_from_seeds
(seed_list, latent_shape, device, dtype)
train_scripts/sol_rl/train_sd3.py:98
↓ 3 callersFunction_cam_identity_tables
Cached identity RMS/RoPE tables used by ``cam_scan_chunkwise``.
diffusion/model/ops/fused_gdn_chunkwise.py:1868
↓ 3 callersFunction_clear_kv_prefix_on_blocks
(transformer: nn.Module)
diffusion/refiner/diffusers_ltx2_refiner.py:1821
↓ 3 callersMethod_decode
Internal decode method.
diffusion/model/ltx2/causal_vae.py:1762
↓ 3 callersMethod_decode_with_sana_vae
(self, sana_latent: torch.Tensor)
inference_video_scripts/wm/inference_sana_wm.py:1571
↓ 3 callersFunction_get_arch_config
Returns (a_warps, a_BLOCK_S, b_warps, b_stages, b_use_acc_fusion, c_warps, c_BLOCK_S, c_stages). dot_precision: 0=bf16 TC, 1=TF32
diffusion/model/ops/fused_gdn_chunkwise.py:272
↓ 3 callersMethod_get_current_conditional_dict
Get the conditional_dict to use for the current chunk
diffusion/longsana/model/streaming_sana_long.py:169
↓ 3 callersFunction_get_model_attr
(name: str, default: Any)
diffusion/utils/chunk_utils.py:156
↓ 3 callersMethod_get_timestep
Randomly generate a timestep tensor based on the generator's task type. It uniformly samples a timestep from the range [min_timestep,
diffusion/longsana/model/dmd_sana.py:360
↓ 3 callersMethod_initialize_inference_pipeline
initialize training pipeline for DMDSana, using SanaTrainingPipeline
diffusion/longsana/model/dmd_sana.py:322
↓ 3 callersFunction_is_local_callable_for_pickle
(value: object)
diffusion/refiner/diffusers_ltx2_refiner.py:2322
↓ 3 callersFunction_is_local_callable_for_pickle
(value: object)
inference_video_scripts/wm/inference_sana_wm.py:188
↓ 3 callersMethod_masked_multinomial_from_logweights
Vectorized categorical sampling from a single column of log-weights. logw_col: [T] starts, ends: [B], slice is [start, end)
diffusion/model/respace.py:200
↓ 3 callersFunction_new_event
()
inference_video_scripts/wm/streaming_pipeline.py:263
↓ 3 callersMethod_nvfp4_autocast
(self)
diffusion/refiner/diffusers_ltx2_refiner.py:245
↓ 3 callersMethod_pack_latents
(latents, batch_size, num_channels_latents, height, width, frame)
diffusion/model/nets/sana_multi_scale_video.py:505
↓ 3 callersFunction_prepare_encoder_attention_mask
(mask: torch.Tensor | None, dtype: torch.dtype)
diffusion/refiner/diffusers_ltx2_refiner.py:1948
↓ 3 callersFunction_prepare_latents_from_seeds
(seed_list, num_channels, latent_h, latent_w, device, dtype)
train_scripts/sol_rl/train_sana.py:121
↓ 3 callersFunction_process_camera_conditions_ucpe
Convert ``(B, F, 20)`` camera conditions (C2W flat + fx,fy,cx,cy) into ``(raymats, absmap)``. ``raymats`` is ``(B, F, H, W, 4, 4)`` ``ray<-wo
diffusion/model/nets/sana_camctrl_blocks.py:404
↓ 3 callersFunction_refiner_attention
( query: torch.Tensor, key: torch.Tensor, value: torch.Tensor, *, backend: object, par
diffusion/refiner/diffusers_ltx2_refiner.py:1641
↓ 3 callersMethod_reshape_from_temporal
Reshape (B*S, T, C) back to (B, T*S, C).
diffusion/model/nets/sana_gdn_blocks.py:340
↓ 3 callersMethod_reshape_to_temporal
Reshape (B, T*S, C) to (B*S, T, C) for temporal conv. Returns: Reshaped tensor and (B, S, T) for later restoration.
diffusion/model/nets/sana_gdn_blocks.py:325
↓ 3 callersFunction_sdpa_needs_head_pad
(head_dim: int)
diffusion/model/nets/sana_gdn_blocks.py:59
↓ 3 callersFunction_slice_rope_to_current_chunk
Slice rotary embedding freqs to the trailing ``current_n`` token positions. When ``sink_token=true``, upstream rope is built for sink + current c
diffusion/model/ops/fused_streaming.py:89
↓ 3 callersFunction_sum_cuda_seconds
(events: list[tuple[torch.cuda.Event, torch.cuda.Event]])
inference_video_scripts/wm/streaming_pipeline.py:674
↓ 3 callersMethod_unpack_latents
(latents, height, width, frame)
diffusion/model/nets/sana_multi_scale_video.py:513
↓ 3 callersMethodadams_bashforth_update
SA-Predictor, without the "rescaling" trick in Appendix D in SA-Solver paper https://arxiv.org/pdf/2309.05019.pdf
diffusion/model/sa_solver.py:663
↓ 3 callersMethodadams_bashforth_update_few_steps
SA-Predictor, with the "rescaling" trick in Appendix D in SA-Solver paper https://arxiv.org/pdf/2309.05019.pdf
diffusion/model/sa_solver.py:757
↓ 3 callersFunctionall_gather_tensor
(tensor, group_size=None, group=None)
diffusion/utils/dist_utils.py:213
↓ 3 callersMethodattn_matmul
(self, q, k, v: torch.Tensor)
diffusion/model/wan/model.py:269
↓ 3 callersFunctionbasic_clean
(text)
diffusion/model/wan/tokenizers.py:12
↓ 3 callersFunctionbuild_datasets_and_loaders
Build train/test datasets with distributed samplers and dataloaders. Returns ``(train_dataset, train_dataloader, train_sampler, test_dataset, tes
train_scripts/sol_rl/train_utils.py:599
↓ 3 callersFunctionbuild_kwargs_from_config
(config: dict, target_func: Callable)
diffusion/model/dc_ae/efficientvit/models/utils/network.py:78
↓ 3 callersFunctionbuild_norm
(name="bn2d", num_features=None, affine=True, **kwargs)
diffusion/model/norms.py:50
↓ 3 callersFunctioncalculate_zero_std_ratio
(prompts, gathered_rewards)
train_scripts/sol_rl/train_utils.py:242
↓ 3 callersFunctioncleanup_distributed
()
train_scripts/sol_rl/train_utils.py:61
↓ 3 callersMethodclear
(self)
diffusion/post_training/stat_tracking.py:39
↓ 3 callersFunctioncompute_statistics_of_path
(path, model, batch_size, dims, device, num_workers=1, flag="ref")
tools/metrics/pytorch-fid/compute_fid.py:130
← previousnext →201–300 of 2,606, ranked by callers