MCPcopy Create free account

hub / github.com/NVlabs/Sana / functions

Functions2,606 in github.com/NVlabs/Sana

↓ 1 callersMethod__init__
( self, in_dim: int, out_dim: int, heads: int | None = None, heads_rat
diffusion/model/nets/sana_gdn_blocks.py:175
↓ 1 callersMethod__init__
( self, optimizer: torch.optim.Optimizer, warmup_steps: int, warmup_lr: float,
diffusion/model/dc_ae/efficientvit/apps/utils/lr.py:28
↓ 1 callersMethod__init__
(self, **kwargs)
diffusion/data/datasets/sana_data_multi_scale.py:232
↓ 1 callersMethod__init__
(self, lru_size, keep=False, localname=default_localname())
diffusion/data/wids/wids.py:398
↓ 1 callersMethod__init__
(self, to_q: nn.Linear, to_k: nn.Linear, to_v: nn.Linear)
diffusion/refiner/diffusers_ltx2_refiner.py:2432
↓ 1 callersMethod_accumulate_kv_cache
(self, kv_cache, chunk_idx)
diffusion/scheduler/longlive_flow_euler_sampler.py:420
↓ 1 callersMethod_accumulate_kv_cache
(self, kv_cache, chunk_idx)
diffusion/longsana/pipeline/sana_inference_pipeline.py:114
↓ 1 callersMethod_accumulate_softmax_kv_cache
Accumulate KV cache for chunk ``chunk_idx``. Two cache layouts are supported, distinguished by slot 6 (type flag): * **State-based**
diffusion/scheduler/self_forcing_flow_euler_sampler.py:677
↓ 1 callersMethod_apply_bidirectional_padding
Apply symmetric padding for bidirectional mode.
diffusion/model/ltx2/causal_vae.py:418
↓ 1 callersMethod_apply_causal_padding
Apply causal padding using cached history.
diffusion/model/ltx2/causal_vae.py:367
↓ 1 callersFunction_apply_fast_defaults
Set numerically-neutral perf knobs (cuDNN bench, SDPA, Inductor).
inference_video_scripts/wm/inference_sana_wm_streaming.py:317
↓ 1 callersFunction_apply_output_gate
Compiled output gate (fuses linear + silu + multiply).
diffusion/model/nets/sana_gdn_blocks.py:151
↓ 1 callersMethod_apply_positional_embedding
Apply positional embedding to input tensor. Args: x: Input tensor (N, T, D) bs: Batch size Returns:
diffusion/model/nets/sana_multi_scale.py:282
↓ 1 callersFunction_apply_refiner_rotary
( attn: nn.Module, tensor: torch.Tensor, rotary_emb: tuple[torch.Tensor, torch.Tensor], )
diffusion/refiner/diffusers_ltx2_refiner.py:1627
↓ 1 callersFunction_apply_rotary_emb
Compiled rotary embedding application (fuses view_as_complex + multiply chain).
diffusion/model/nets/sana_gdn_blocks.py:138
↓ 1 callersFunction_arch_key
Map compute capability → named arch bucket in `_CHUNKWISE_TUNING`. Blackwell (cap[0] >= 10) is split into "blackwell_dc" and "blackwell_spark"
diffusion/model/ops/fused_gdn_chunkwise.py:223
↓ 1 callersFunction_auto_config
Look up chunkwise kernel launch params from the tuning table. Resolution order: 1. `_ARCH_OVERRIDES[(cap, dot_prec)]` — exact-capability pi
diffusion/model/ops/fused_gdn_chunkwise.py:248
↓ 1 callersFunction_auto_rollout_bsz
(num_image_per_prompt)
configs/sol_rl/sana.py:110
↓ 1 callersFunction_auto_rollout_bsz
(num_image_per_prompt)
configs/sol_rl/flux1.py:95
↓ 1 callersFunction_auto_rollout_bsz
(num_image_per_prompt)
configs/sol_rl/sd3.py:106
↓ 1 callersMethod_backward_causal_conv_per_chunk
Run backward (anti-causal) conv isolated per chunk. Within each chunk the input is time-flipped, the causal conv is applied, and the
diffusion/model/nets/sana_gdn_blocks.py:563
↓ 1 callersMethod_bidirectional_causal_conv_1d
Simulate non-causal conv by combining forward + backward causal passes. A causal depthwise Conv1d with kernel ``[w_0, w_1, ..., w_{k-1}]``
diffusion/model/nets/sana_gdn_blocks.py:367
↓ 1 callersFunction_build_camctrl_cls_list
Build the per-block ``camctrl_cls`` schedule. The first ``camctrl_layers_num`` blocks use the camera-controlled attention. Within that range
diffusion/model/nets/sana_multi_scale_video_camctrl.py:583
↓ 1 callersMethod_build_index
(self)
diffusion/data/wids/wids_mmtar.py:86
↓ 1 callersMethod_build_key_tiles
(self)
diffusion/utils/action_overlay.py:172
↓ 1 callersFunction_build_parser
()
inference_video_scripts/wm/inference_sana_wm_streaming.py:104
↓ 1 callersFunction_build_parser
()
inference_video_scripts/wm/inference_sana_wm.py:1946
↓ 1 callersMethod_build_text_encoder
(self)
inference_video_scripts/wm/inference_sana_wm.py:947
↓ 1 callersMethod_cached_cam_branch
Camera branch with cached delta-rule state.
diffusion/model/nets/sana_gdn_camctrl_blocks.py:683
↓ 1 callersMethod_cached_cam_branch_softmax
Camera branch: SDPA with cached UCPE-transformed K, V.
diffusion/model/nets/sana_gdn_camctrl_blocks.py:819
↓ 1 callersFunction_cached_gdn_forward_triton
Cached chunk-causal forward through the fused Triton scan. Same return contract as the torch ``CachedChunkCausalGDN.forward`` cached path (``
diffusion/model/ops/fused_streaming.py:652
↓ 1 callersFunction_cached_temporal_short_conv
Short conv with cached left context: forward-cached + backward-isolated. Mirrors ``ChunkCausalGDN._apply_temporal_short_conv`` but replaces the
diffusion/model/ops/fused_streaming.py:116
↓ 1 callersFunction_cam_main_triton
Run the camera-branch single-path delta-rule chunk-causal scan with two ``cam_scan_chunkwise`` calls (forward seeded from cached state + per-c
diffusion/model/ops/fused_streaming.py:402
↓ 1 callersFunction_cam_prep_triton
Streaming cam-branch QKV prep through the bidir's fused Triton kernel. Mirrors the prep section of :meth:`BidirectionalGDNUCPESinglePathLiteL
diffusion/model/ops/fused_streaming.py:530
↓ 1 callersFunction_candidate_dataset_dirs
(dataset)
diffusion/post_training/prompt_dataset.py:10
↓ 1 callersMethod_causal_conv_1d
Run causal conv and preserve input dtype. Args: x: Tensor of shape (batch, seq_len, channels). conv: FLA ``ShortConvo
diffusion/model/nets/sana_gdn_blocks.py:347
↓ 1 callersMethod_clean
(self, text)
diffusion/model/wan/tokenizers.py:71
↓ 1 callersMethod_clear_cache_gradients
Clear possible gradient references in KV cache and cross-attention cache. This is important for preventing memory leaks, especially b
diffusion/longsana/model/streaming_sana_long.py:557
↓ 1 callersFunction_clear_cross_attention_kv_cache
(transformer: nn.Module)
diffusion/refiner/diffusers_ltx2_refiner.py:1725
↓ 1 callersFunction_clip
( pretrained=False, pretrained_name=None, model_cls=XLMRobertaCLIP, return_transforms=False,
diffusion/model/wan/clip.py:421
↓ 1 callersFunction_compute_frame_gates
Compiled frame gate computation (fuses sigmoid + softplus + exp chain).
diffusion/model/nets/sana_gdn_blocks.py:114
↓ 1 callersMethod_compute_kl_grad
compute KL gradient (reference DMD implementation).
diffusion/longsana/model/dmd_sana.py:400
↓ 1 callersMethod_compute_residual
Compute residual connection for pixel unshuffle.
diffusion/model/ltx2/causal_vae.py:666
↓ 1 callersMethod_compute_residual
Compute residual connection.
diffusion/model/ltx2/causal_vae.py:762
↓ 1 callersMethod_consistency_backward_simulation
(self, noise, prompt_embeds, mask, initial_latent=None)
diffusion/longsana/model/dmd_sana.py:648
↓ 1 callersFunction_contiguous_backward
Ensure downstream backward receives a contiguous gradient buffer.
diffusion/model/nets/sana_gdn_blocks.py:108
↓ 1 callersMethod_convert_flow_pred_to_x0
Convert flow matching's prediction to x0 prediction. flow_pred: the prediction with shape [B, C, H, W] xt: the input noisy da
diffusion/scheduler/longlive_flow_euler_sampler.py:218
↓ 1 callersMethod_convert_to_karras
Constructs the noise schedule of Karras et al. (2022).
diffusion/scheduler/sa_solver_diffusers.py:321
↓ 1 callersMethod_create_autoregressive_segments
(self, total_frames: int, base_chunk_frames: int)
diffusion/scheduler/longlive_flow_euler_sampler.py:401
↓ 1 callersMethod_create_autoregressive_segments
(self, total_frames: int, base_chunk_frames: int)
diffusion/longsana/pipeline/sana_training_pipeline.py:145
↓ 1 callersMethod_create_autoregressive_segments
(self, total_frames: int, base_chunk_frames: int)
diffusion/longsana/pipeline/sana_inference_pipeline.py:95
↓ 1 callersMethod_create_autoregressive_segments
(self, total_frames: int, base_chunk_frames: int)
diffusion/longsana/pipeline/sana_inference_interactive_pipeline.py:116
↓ 1 callersMethod_create_tar_index
(self)
diffusion/data/wids/wids_tar.py:52
↓ 1 callersFunction_current_refiner_prefix_tokens
(transformer: nn.Module)
diffusion/refiner/diffusers_ltx2_refiner.py:2161
↓ 1 callersMethod_dispatch_solver
( self, algo: SamplingAlgo, z: torch.Tensor, cond: torch.Tensor, neg:
inference_video_scripts/wm/inference_sana_wm.py:1506
↓ 1 callersMethod_draw_joystick
(self, canvas: Image.Image, cx: int, cy: int, yaw: float, pitch: float)
diffusion/utils/action_overlay.py:195
↓ 1 callersFunction_encode_prompt_with_clip
( text_encoder, tokenizer, prompt, device=None, text_input_ids=None, num_images_per_pr
diffusion/post_training/diffusers_patch/text_encode.py:62
↓ 1 callersFunction_encode_prompt_with_t5
( text_encoder, tokenizer, max_sequence_length, prompt=None, num_images_per_prompt=1,
diffusion/post_training/diffusers_patch/text_encode.py:28
↓ 1 callersFunction_env_flag_default_true
(name: str)
diffusion/refiner/diffusers_ltx2_refiner.py:2283
↓ 1 callersFunction_flash_attn_func
()
diffusion/refiner/diffusers_ltx2_refiner.py:1685
↓ 1 callersMethod_forward_cam_branch
( self, x: torch.Tensor, HW: tuple[int, int, int], camera_conditions: torch.Te
diffusion/model/nets/sana_gdn_blocks_triton.py:288
↓ 1 callersFunction_forward_cam_branch_softmax
Bidirectional softmax camera branch (with UCPE transforms). Uses ``F.scaled_dot_product_attention`` with optional invalid-key masking.
diffusion/model/nets/sana_gdn_camctrl_blocks.py:444
↓ 1 callersFunction_forward_softmax_attn
Softmax attention (SDPA) reusing GDN parameters. Used by the hybrid GDN+Softmax architecture: every Nth block runs softmax attention instead
diffusion/model/nets/sana_gdn_blocks.py:745
↓ 1 callersFunction_forward_softmax_attn_chunk_causal
Chunk-causal softmax attention (SDPA / flex_attention) reusing GDN parameters. Used by ``ChunkCausalSoftmaxAttn``. Reuses ``qkv``, ``q_norm``,
diffusion/model/nets/sana_gdn_blocks.py:936
↓ 1 callersMethod_forward_video_only
( self, *, hidden_states: torch.Tensor, encoder_hidden_states: torch.Tensor,
diffusion/refiner/diffusers_ltx2_refiner.py:810
↓ 1 callersFunction_fuse_refiner_self_qkv
(transformer: nn.Module)
diffusion/refiner/diffusers_ltx2_refiner.py:2457
↓ 1 callersFunction_gdn_main_triton
Run the chunk-causal main GDN scan through the fused Triton chunkwise kernels. Uses two fused Triton calls (forward-with-state + per-chunk re
diffusion/model/ops/fused_streaming.py:192
↓ 1 callersMethod_generate_chunk
Generate a single chunk. Args: noise_chunk: noise input [batch_size, chunk_frames, C, H, W] chunk_start_fram
diffusion/longsana/model/streaming_sana_long.py:193
↓ 1 callersMethod_generator
(self)
tools/metrics/clip-score/clip_score.py:152
↓ 1 callersFunction_get_clip_image_transform
(processor)
diffusion/post_training/rewards.py:97
↓ 1 callersMethod_get_closest_ratio
(self, height, width)
diffusion/utils/data_sampler.py:254
↓ 1 callersFunction_get_config
(n_gpus=8, dataset="pickscore", reward_fn=None)
configs/sol_rl/sana.py:11
↓ 1 callersFunction_get_config
(n_gpus=8, dataset="pickscore", reward_fn=None)
configs/sol_rl/flux1.py:11
↓ 1 callersFunction_get_config
(n_gpus=8, dataset="pickscore", reward_fn=None)
configs/sol_rl/sd3.py:11
↓ 1 callersMethod_get_data_info_and_ratio
(self, idx)
diffusion/utils/data_sampler.py:105
↓ 1 callersMethod_get_data_info_and_ratio
(self, idx)
diffusion/utils/data_sampler.py:239
↓ 1 callersFunction_get_frame_causal_mask
Frame-wise block-causal mask: full attention within each frame, causal across frames. Returns a boolean tensor of shape ``(1, 1, T*S, T*S)``
diffusion/model/nets/sana_gdn_blocks.py:730
↓ 1 callersFunction_get_kernel_config
Return optimal kernel parameters for the current GPU. STATE_FP32: use fp32 state_prev when SRAM is large enough. - bf16 state_prev: ~96KB t
diffusion/model/ops/fused_gdn.py:49
↓ 1 callersMethod_get_options
(self, param_shape)
diffusion/utils/optimizer.py:307
↓ 1 callersMethod_get_options
(self, param_shape)
diffusion/utils/optimizer.py:605
↓ 1 callersMethod_get_output_numel
(self, input_shape: torch.Size)
diffusion/model/dc_ae/efficientvit/models/nn/ops.py:633
↓ 1 callersMethod_get_streaming_refiner_prompt
(self, prompt: str)
inference_video_scripts/wm/inference_sana_wm.py:1359
↓ 1 callersMethod_get_streaming_stage1_prompt
( self, prompt: str, negative_prompt: str )
inference_video_scripts/wm/inference_sana_wm.py:1332
↓ 1 callersMethod_get_switch_frame_index
(self, max_length=None)
diffusion/longsana/trainer/longsana_trainer.py:484
↓ 1 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/ode_regression_sana.py:234
↓ 1 callersFunction_get_writer
()
inference_video_scripts/wm/streaming_pipeline.py:308
↓ 1 callersFunction_guard_blank_frames
(frames_np: np.ndarray)
inference_video_scripts/wm/streaming_pipeline.py:505
↓ 1 callersMethod_handle_empty_chunk
Handle empty temporal chunks by reserving cache slots.
diffusion/model/ltx2/causal_vae.py:334
↓ 1 callersMethod_handle_empty_output
Handle empty output when temporal dimension is 0.
diffusion/model/ltx2/causal_vae.py:644
↓ 1 callersFunction_hpsv2_image_transform
(image_size, mean=None, std=None, fill_color=0)
diffusion/post_training/rewards.py:66
↓ 1 callersMethod_init_cam_short_conv_for_linear_equiv
Initialize camera short convs as identity to match base at step 0.
diffusion/model/nets/sana_gdn_camctrl_blocks.py:280
↓ 1 callersMethod_init_shadow
(self, fsdp_module)
diffusion/longsana/utils/distributed.py:107
↓ 1 callersMethod_init_short_conv_for_linear_equiv
Initialize short conv as identity to match no-conv behavior at step 0.
diffusion/model/nets/sana_gdn_blocks.py:283
↓ 1 callersMethod_initialize_cached_modules
(self)
diffusion/scheduler/longlive_flow_euler_sampler.py:361
↓ 1 callersMethod_initialize_cached_modules
(self)
diffusion/longsana/pipeline/sana_inference_interactive_pipeline_long_chunk.py:73
↓ 1 callersMethod_initialize_cached_modules
initialize cached modules, refer to SelfForcingFlowEuler's implementation
diffusion/longsana/pipeline/sana_training_pipeline.py:532
↓ 1 callersMethod_initialize_cached_modules
(self)
diffusion/longsana/pipeline/sana_inference_pipeline.py:55
↓ 1 callersMethod_initialize_cached_modules
(self)
diffusion/longsana/pipeline/sana_inference_interactive_pipeline.py:76
↓ 1 callersMethod_initialize_dataset
(self, num_replicas, sort_dataset)
diffusion/data/datasets/sana_data.py:300
↓ 1 callersMethod_initialize_kv_cache
Create empty 10-slot cache: ``kv_cache[chunk][block] = [None]*10``.
diffusion/scheduler/self_forcing_flow_euler_sampler.py:669
← previousnext →701–800 of 2,606, ranked by callers