MCPcopy Create free account

hub / github.com/NVlabs/Sana / functions

Functions2,606 in github.com/NVlabs/Sana

↓ 9 callersMethodclose
Close the dataset.
diffusion/data/wids/wids.py:658
↓ 9 callersMethodfinish
(self)
diffusion/refiner/diffusers_ltx2_refiner.py:2116
↓ 9 callersFunctionflush
()
diffusion/utils/dist_utils.py:330
↓ 9 callersFunctionget_2d_sincos_pos_embed
grid_size: int of the grid height and width return: pos_embed: [grid_size*grid_size, embed_dim] or [1+grid_size*grid_size, embed_dim] (w/
diffusion/model/nets/sana.py:416
↓ 9 callersMethodget_prompt_embeds
Generates embeddings and an attention mask for the given prompt(s), stripping the template part. Args: prompt (U
diffusion/model/qwen/qwen_vl.py:80
↓ 9 callersFunctionmean_flat
Take the mean over all non-batch dimensions.
diffusion/model/gaussian_diffusion.py:33
↓ 9 callersFunctionmodel_video_init_config
(config: SanaVideoConfig, latent_size: int = 32)
diffusion/utils/config.py:470
↓ 9 callersMethodsample
(self, latents, steps=28)
diffusion/scheduler/flow_euler_sampler.py:39
↓ 9 callersMethodsection
(self, name: str)
diffusion/refiner/diffusers_ltx2_refiner.py:2108
↓ 9 callersMethodset_epoch
(self, epoch)
diffusion/data/wids/wids.py:906
↓ 8 callersMethod__init__
( self, vocab_size, dim, dim_attn, dim_ffn, num_heads,
diffusion/model/wan/t5.py:316
↓ 8 callersMethod__init__
(self, z_dim=16, vae_pth="cache/vae_step_411000.pth", dtype=torch.float, device="cuda")
diffusion/model/wan/vae.py:580
↓ 8 callersMethod_apply_output_gate
(self, out: torch.Tensor, gate_x: torch.Tensor)
diffusion/model/nets/sana_gdn_blocks.py:319
↓ 8 callersMethod_apply_rotary_emb
Apply rotary embeddings (delegates to compiled ``_apply_rotary_emb``).
diffusion/model/nets/sana_gdn_blocks.py:446
↓ 8 callersFunction_capture_kv_tensor
(tensor: torch.Tensor)
diffusion/refiner/diffusers_ltx2_refiner.py:2267
↓ 8 callersFunction_default_dot_prec
Pull dot_precision from `_resolve_launch_config` (honors PRECISION_OVERRIDE).
diffusion/model/ops/fused_gdn_chunkwise.py:1492
↓ 8 callersFunction_env_flag
(name: str)
inference_video_scripts/wm/streaming_pipeline.py:48
↓ 8 callersFunction_new_timing_event
()
inference_video_scripts/wm/streaming_pipeline.py:266
↓ 8 callersMethoddecode_and_save_clip
(self, clip_btchw: torch.Tensor, save_name: str, fps: int = 16)
diffusion/longsana/model/dmd_sana.py:815
↓ 8 callersMethodexpand_frame
(self, line)
diffusion/utils/misc.py:274
↓ 8 callersFunctiongather_tensor_to_all
(tensor, world_size)
train_scripts/sol_rl/train_utils.py:77
↓ 8 callersFunctionload_checkpoint
( checkpoint, model, model_ema=None, optimizer=None, lr_scheduler=None, load_ema=False
diffusion/utils/checkpoint.py:217
↓ 8 callersFunctionsave_image
(img)
app/app_sana_controlnet_hed.py:76
↓ 8 callersFunctionwith_article
(name: str)
tools/metrics/geneval/prompts/create_prompts.py:20
↓ 7 callersMethodclose
Flush stdin, wait for ffmpeg to finalize, and return the output path. Idempotent — calling twice is a no-op on the second call. Raises
inference_video_scripts/wm/streaming_mp4_writer.py:202
↓ 7 callersFunctioncompute_density_for_timestep_sampling
Compute the density for sampling the timesteps when doing SD3 training. Courtesy: This was contributed by Rafie Walker in https://github.com/hugg
diffusion/model/respace.py:113
↓ 7 callersFunctionfind_model
Finds a pre-trained G.pt model, downloading it if necessary. Alternatively, loads a model from a local path.
sana/tools/download.py:19
↓ 7 callersFunctionflash_attention
q: [B, Lq, Nq, C1]. k: [B, Lk, Nk, C1]. v: [B, Lk, Nk, C2]. Nq must be divisible by Nk. q_lens
diffusion/model/wan/attention.py:31
↓ 7 callersFunctionget_same_padding
(kernel_size: int or tuple[int, ...])
diffusion/model/nets/fastlinear/modules/utils/model.py:37
↓ 7 callersFunctionis_triton_module_available
()
diffusion/utils/import_utils.py:37
↓ 7 callersMethodload_state_dict
(self, state_dict: dict[float, dict[str, torch.Tensor]])
diffusion/model/dc_ae/efficientvit/apps/utils/ema.py:51
↓ 7 callersMethodregister_buffer
(self, name, attr)
diffusion/scheduler/sa_sampler.py:42
↓ 7 callersFunctionresolve_hf_path
Resolve a possibly ``hf://``-prefixed path to a local filesystem path. Accepts either: * a local path (returned unchanged if it exists), or
sana/tools/hf_utils.py:25
↓ 7 callersMethodsave_pretrained
(self, path)
diffusion/model/nets/sana_ladd.py:79
↓ 7 callersFunctionset_seed
(seed, rank=0)
train_scripts/sol_rl/train_utils.py:70
↓ 7 callersMethodstep
(self, model_output, timestep, sample, to_final=False)
diffusion/longsana/utils/scheduler.py:126
↓ 7 callersFunctionsync_tensor
(tensor: Union[torch.Tensor, float], reduce="mean")
diffusion/model/dc_ae/efficientvit/apps/utils/dist.py:75
↓ 7 callersMethodupdate_progress
Update sampling progress Args: step: Current step number total_steps: Total number of steps
diffusion/model/dpm_solver.py:766
↓ 6 callersMethod__init__
(self, dim, mid_dim)
diffusion/model/wan/clip.py:93
↓ 6 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, bias=True, drop=0.0)
diffusion/model/nets/basic_modules.py:535
↓ 6 callersFunction_as_prompt_list
(prompt)
diffusion/post_training/diffusers_patch/text_encode.py:18
↓ 6 callersMethod_compute_frame_gates
Compute per-frame gates shared across spatial positions. Delegates to the module-level compiled ``_compute_frame_gates``.
diffusion/model/nets/sana_gdn_blocks.py:453
↓ 6 callersMethod_copy_non_transformer_params
copy non-transformer params, skip specific params
diffusion/model/model_growth_utils.py:122
↓ 6 callersMethod_predict_xstart_from_eps
(self, x_t, t, eps)
diffusion/model/gaussian_diffusion.py:379
↓ 6 callersMethod_prepare_latent_image_ids
(batch_size, height, width, device, dtype, frame=None)
diffusion/model/nets/sana_blocks.py:1338
↓ 6 callersMethodanalyse_variable
(self, var, ctx)
diffusion/utils/misc.py:300
↓ 6 callersFunctionbuild_dataset
(cfg, resolution=224, **kwargs)
diffusion/data/builder.py:66
↓ 6 callersFunctionbuild_norm
(name="bn2d", num_features=None, **kwargs)
diffusion/model/dc_ae/efficientvit/models/nn/norm.py:100
↓ 6 callersFunctioncollate_dict_items
(items)
train_scripts/sol_rl/train_utils.py:260
↓ 6 callersMethodenable_gradient_checkpointing
(self)
diffusion/longsana/utils/model_wrapper.py:44
↓ 6 callersFunctionfsdp_wrap
( module, sharding_strategy="full", mixed_precision=False, wrap_strategy="size", min_num_p
diffusion/longsana/utils/distributed.py:26
↓ 6 callersMethodgenerate_next_chunk
Generate the next chunk, supporting overlap to ensure temporal continuity. Args: requires_grad: whether gradients are re
diffusion/longsana/model/streaming_sana_long.py:346
↓ 6 callersFunctionget_dtype_from_str
(dtype: str)
diffusion/model/nets/fastlinear/modules/utils/dtype.py:22
↓ 6 callersFunctionget_norm_name
(norm: nn.Module or None)
diffusion/model/nets/fastlinear/modules/nn/norm.py:70
↓ 6 callersMethodget_scheduler
Update the current scheduler with the interface's static method
diffusion/longsana/utils/model_wrapper.py:25
↓ 6 callersMethodget_time_steps
Compute the intermediate time steps for sampling. Args: skip_type: A `str`. The type for the spacing of the time steps. We suppor
diffusion/model/dpm_solver.py:824
↓ 6 callersFunctionget_timesteps
( weighting_scheme=config.scheduler.weighting_scheme, logit_mean=config.schedu
train_scripts/train_scm_ladd.py:374
↓ 6 callersFunctionlru_json_load
(fpath)
diffusion/data/wids/wids.py:470
↓ 6 callersMethodmarginal_alpha
Compute alpha_t of a given continuous-time label t in [0, T].
diffusion/model/dpm_solver.py:173
↓ 6 callersFunctionmerge_dict_list
(dict_list)
diffusion/longsana/utils/misc.py:26
↓ 6 callersFunctionselect_indices_by_mode
(rewards, target_count, mode)
train_scripts/sol_rl/train_utils.py:285
↓ 6 callersMethodstate_dict
(self)
diffusion/longsana/utils/distributed.py:124
↓ 6 callersFunctionsync_lora_to_inference
(peft_model, inference_model, adapter_name="old")
train_scripts/sol_rl/train_utils.py:351
↓ 5 callersMethod__init__
(self, device)
diffusion/post_training/rewards.py:235
↓ 5 callersMethod__init__
( self, in_channels: int, out_channels: int, kernel_size: int | tuple[int] = 3
diffusion/model/dc_ae/efficientvit/models/nn/ops_3d.py:265
↓ 5 callersMethod_accumulate_kv_cache
recalculate and accumulate KV cache, align with ar_flow_euler_sampler.accumulate_kv_cache - cur_kv_cache[block_id] structure is [cum_vk, k_sum
diffusion/longsana/pipeline/sana_training_pipeline.py:499
↓ 5 callersFunction_build_rotary_emb_for_absolute_positions
Reimplement ``LTX2VideoRotaryPosEmbed.prepare_video_coords`` with explicit per-frame positions. The default helper assumes contiguous ``torch.ara
diffusion/refiner/diffusers_ltx2_refiner.py:1308
↓ 5 callersFunction_on
(stream)
inference_video_scripts/wm/streaming_pipeline.py:260
↓ 5 callersFunction_pack_latents
(latents: torch.Tensor, patch_size: int = 1, patch_size_t: int = 1)
diffusion/refiner/diffusers_ltx2_refiner.py:1915
↓ 5 callersMethod_predict_eps_from_xstart
(self, x_t, t, pred_xstart)
diffusion/model/gaussian_diffusion.py:386
↓ 5 callersMethod_quantize_state
Quantize a state tensor to 8bit Args: state_tensor: tensor to be quantized block_size: quantization block size
diffusion/utils/optimizer.py:537
↓ 5 callersFunction_sigma_to_alpha_sigma_t
(sigma)
diffusion/post_training/diffusers_patch/solver.py:354
↓ 5 callersMethod_vb_terms_bpd
Get a term for the variational lower-bound. The resulting units are bits (rather than nats, as one might expect). This allows
diffusion/model/gaussian_diffusion.py:715
↓ 5 callersMethod_wrap_model
(self, model)
diffusion/model/respace.py:474
↓ 5 callersFunctionbuild_optimizer
(model, optimizer_cfg)
diffusion/utils/optimizer.py:139
↓ 5 callersMethodcreate_autoregressive_segments
(self, total_frames)
diffusion/longsana/pipeline/sana_training_pipeline.py:329
↓ 5 callersMethodforward_chi
(self, text_prompts: List[str], use_chi_prompt: bool = True)
diffusion/longsana/utils/model_wrapper.py:177
↓ 5 callersFunctionfp16_clamp
(x)
diffusion/model/wan/t5.py:20
↓ 5 callersFunctionget_chunks
(lst, n)
diffusion/data/datasets/utils.py:647
↓ 5 callersMethodget_data_info
(self, idx)
diffusion/data/datasets/sana_data.py:445
↓ 5 callersFunctionhandle_mismatched_shapes
(key, checkpoint_param, current_shape)
tools/convert_scripts/convert_sana_to_svdquant.py:162
↓ 5 callersMethodinverse_lambda
Compute the continuous-time label t in [0, T] of a given half-logSNR lambda_t.
diffusion/model/dpm_solver.py:193
↓ 5 callersFunctionis_xformers_available
()
diffusion/utils/import_utils.py:33
↓ 5 callersMethodload_state_dict
Load state dict and convert relevant states to 8bit
diffusion/utils/optimizer.py:771
↓ 5 callersMethodload_state_dict_from_2d
(self, state_dict: dict[str, torch.Tensor], method: str)
diffusion/model/dc_ae/efficientvit/models/nn/ops_3d.py:317
↓ 5 callersFunctionmodulate
(x, shift, scale)
diffusion/model/nets/sana_blocks.py:40
↓ 5 callersMethodmove_video_modules
Move only the modules and direct parameters used by the video-only forward.
diffusion/refiner/diffusers_ltx2_refiner.py:240
↓ 5 callersMethodq_posterior_mean_variance
Compute the mean and variance of the diffusion posterior: q(x_{t-1} | x_t, x_0)
diffusion/model/gaussian_diffusion.py:278
↓ 5 callersMethodregister_progress_bar
(self, progress_fn=None)
app/sana_pipeline.py:163
↓ 5 callersFunctionreshape_param
(p, target)
diffusion/model/nets/sana_camctrl_blocks.py:239
↓ 5 callersFunctionresize_and_crop_tensor
(samples: torch.Tensor, new_width: int, new_height: int)
diffusion/model/utils.py:133
↓ 5 callersMethodsample
( self, S, batch_size, shape, conditioning=None, callback=None
diffusion/scheduler/sa_sampler.py:49
↓ 5 callersFunctionset_all
Set a key to a value in a list of dictionaries.
diffusion/data/wids/wids_specs.py:90
↓ 5 callersMethodto
(self, device)
diffusion/model/wan/t5.py:452
↓ 5 callersFunctiontracker
(args, result_dict, label="", pattern="epoch_step", metric="FID")
tools/metrics/utils.py:4
↓ 5 callersFunctionvcmd
(flag, verbose_flag="")
diffusion/data/wids/wids_dl.py:82
↓ 4 callersMethod__init__
Build pretrained InceptionV3 Parameters ---------- output_blocks : list of int Indices of blocks to return featur
tools/metrics/pytorch-fid/src/pytorch_fid/inception.py:31
↓ 4 callersMethod_apply_spatial_autochunked
Run :meth:`_apply_spatial`, chunking dim 0 to keep each call under PyTorch's 32-bit conv indexing limit. No-op for short inputs.
diffusion/model/nets/basic_modules.py:167
↓ 4 callersMethod_build_refiner
(self)
inference_video_scripts/wm/inference_sana_wm.py:1117
↓ 4 callersMethod_compute_rope_with_cp
Compute RoPE frequencies for the local frame window.
diffusion/model/nets/sana_multi_scale_video_camctrl.py:920
← previousnext →101–200 of 2,606, ranked by callers