MCPcopy Create free account

hub / github.com/NVlabs/Sana / functions

Functions2,606 in github.com/NVlabs/Sana

↓ 2 callersFunctionload_intrinsics
Return ``(num_frames, 4)`` intrinsics as ``[fx, fy, cx, cy]``. Accepts ``.npy`` arrays shaped ``(3, 3)``, ``(F, 3, 3)``, ``(4,)``, or ``(F, 4
inference_video_scripts/wm/inference_sana_wm.py:651
↓ 2 callersMethodload_model
(self)
diffusion/model/dc_ae/efficientvit/models/efficientvit/dc_ae.py:544
↓ 2 callersFunctionload_remote_dsdesc_raw
Load a remote or local dataset description in JSON format.
diffusion/data/wids/wids_specs.py:99
↓ 2 callersFunctionload_selected_tensors
(path: Path, predicate: Callable[[str], bool], component: str)
tools/convert_sana_wm_refiner_to_diffusers.py:114
↓ 2 callersFunctionload_state_dict_from_file
(file: str, only_state_dict=True)
diffusion/model/dc_ae/efficientvit/models/utils/network.py:87
↓ 2 callersFunctionlog_validation
(accelerator, config, model, logger, step, device, vae=None, init_noise=None)
train_video_scripts/train_video_ivjoint.py:96
↓ 2 callersFunctionlog_validation
(accelerator, config, model, logger, step, device, vae=None, init_noise=None)
train_video_scripts/train_video_ivjoint_chunk.py:105
↓ 2 callersFunctionlog_validation
(accelerator, config, model, logger, step, device, vae=None, init_noise=None)
train_scripts/train.py:97
↓ 2 callersFunctionlog_validation
(accelerator, config, model, logger, step, device, vae=None, init_noise=None, generator=None)
train_scripts/train_scm_ladd.py:83
↓ 2 callersFunctionlog_validation
( pipeline, args, accelerator, pipeline_args, epoch, is_final_validation=False, )
train_scripts/train_dreambooth_lora_sana.py:137
↓ 2 callersMethodlru_json_load
(fpath)
diffusion/data/datasets/video/sana_video_data.py:238
↓ 2 callersFunctionmake_block
(channels: int, kernel_size: int)
diffusion/model/nets/ladd_blocks.py:69
↓ 2 callersMethodmarginal_alpha
Compute alpha_t of a given continuous-time label t in [0, T].
diffusion/model/dpm_solver.py:228
↓ 2 callersMethodmarginal_std
Compute sigma_t of a given continuous-time label t in [0, T].
diffusion/model/dpm_solver.py:235
↓ 2 callersMethodnoise_prediction_fn
Return the noise prediction model.
diffusion/model/dpm_solver.py:795
↓ 2 callersMethodnoise_prediction_fn
Return the noise prediction model.
diffusion/model/sa_solver.py:409
↓ 2 callersFunctionnormal_kl
Compute the KL divergence between two gaussians. Shapes are automatically broadcasted, so batches can be compared to scalars, among other
diffusion/model/diffusion_utils.py:26
↓ 2 callersFunctionopen_db
()
app/app_sana_sprint.py:113
↓ 2 callersFunctionopen_db
()
app/app_sana.py:123
↓ 2 callersFunctionpad_vk_mm_fwd
Input: v: (B, N, H, C) k: (B, N, H, C) Output: vk: (B, H, C+1, C)
diffusion/model/nets/fastlinear/modules/triton_lite_mla_kernels/pad_vk_mm_fwd.py:154
↓ 2 callersFunctionparse_tar_header
(header_bytes)
diffusion/data/wids/wids_mmtar.py:48
↓ 2 callersFunctionparse_with_yaml
(config_str: str)
diffusion/model/dc_ae/efficientvit/apps/utils/misc.py:32
↓ 2 callersFunctionpartial_update_config
(config: dict, partial_config: dict)
diffusion/model/dc_ae/efficientvit/apps/utils/misc.py:72
↓ 2 callersMethodpre_capture_sink
Capture the source-sink K/V before the first active refiner block. The sink is just the conditioning latent frame and does not depend on
diffusion/refiner/diffusers_ltx2_refiner.py:1005
↓ 2 callersFunctionprepare_camera
Relativise poses to frame 0 and build the model-input tensors.
inference_video_scripts/wm/inference_sana_wm.py:826
↓ 2 callersFunctionprepare_rope_tables
Complex rotary_emb `(1, 1, N, D//2)` → expanded (N, D) cos/sin tables. Encodes the interleaved-pair rotation y[2i] = x[2i]*cos[i] - x[2
diffusion/model/ops/fused_gdn.py:110
↓ 2 callersFunctionrandomize_seed_fn
(seed: int, randomize_seed: bool)
app/app_sana_multithread.py:227
↓ 2 callersFunctionread
(rel_path)
tools/metrics/pytorch-fid/setup.py:6
↓ 2 callersFunctionread
(rel_path)
tools/metrics/clip-score/setup.py:6
↓ 2 callersFunctionread_config
(file, base_dir=None)
diffusion/utils/misc.py:74
↓ 2 callersFunctionread_image_from_path
(path, image_size)
diffusion/data/transforms.py:267
↓ 2 callersFunctionread_inference_count
()
app/app_sana.py:130
↓ 2 callersFunctionrebase_shardlist
Rebase the URLs in a shardlist.
diffusion/data/wids/wids_specs.py:117
↓ 2 callersMethodrelu_linear_att
(self, qkv: torch.Tensor)
diffusion/model/dc_ae/efficientvit/models/nn/ops.py:738
↓ 2 callersMethodreset
Clear the persistent decoder cache; the next call will be the first chunk.
diffusion/model/ltx2/streaming_decoder.py:61
↓ 2 callersMethodreset_state
Reset streaming training state
diffusion/longsana/model/streaming_sana_long.py:128
↓ 2 callersMethodreset_state
reset training state
diffusion/longsana/pipeline/sana_training_pipeline.py:87
↓ 2 callersFunctionresize_and_center_crop
Aspect-preserving resize then center-crop to ``(target_h, target_w)``. Returns ``(cropped_image, src_size, resized_size, crop_offset)`` where
inference_video_scripts/wm/inference_sana_wm.py:766
↓ 2 callersFunctionrun_function
(start, end, functions)
diffusion/model/utils.py:79
↓ 2 callersFunctionrun_sampling
(init_z=None, label_suffix="", vae=None, sampler="dpm-solver")
train_video_scripts/train_video_ivjoint.py:110
↓ 2 callersFunctionrun_sampling
(init_z=None, label_suffix="", vae=None, sampler="dpm-solver")
train_video_scripts/train_video_ivjoint_chunk.py:119
↓ 2 callersFunctionrun_sampling
(init_z=None, label_suffix="", vae=None, sampler="dpm-solver")
train_scripts/train.py:110
↓ 2 callersFunctionrun_sampling
(init_z=None, label_suffix="", vae=None, sampler="dpm-solver")
train_scripts/train_scm_ladd.py:97
↓ 2 callersMethodsample_chunks
Streaming variant of :meth:`sample` — yields one chunk at a time. After each AR chunk completes (denoising + KV-cache save pass), yields
diffusion/scheduler/self_forcing_flow_euler_sampler.py:398
↓ 2 callersFunctionsave_fid_stats
Calculates the FID of two paths
tools/metrics/pytorch-fid/compute_fid.py:185
↓ 2 callersFunctionsave_git_snapshot
save git snapshot to the git repository in work_dir use exp/<job_name>_<timestamp> as branch name Args: work_dir: work directory
diffusion/utils/git.py:7
↓ 2 callersFunctionsave_image_sana
(img, seed="", save_img=False)
app/app_sana_multithread.py:215
↓ 2 callersFunctionset_seed
Helper function for reproducible behavior to set the seed in `random`, `numpy`, `torch`. Args: seed (`int`): The seed to
diffusion/longsana/utils/misc.py:7
↓ 2 callersMethodset_step
(self, step: int)
diffusion/longsana/model/dmd_sana.py:162
↓ 2 callersMethodset_timesteps
Sets the discrete timesteps used for the diffusion chain (to be run before inference). Args: num_inference_steps (`int`):
diffusion/scheduler/lcm_scheduler.py:285
↓ 2 callersMethodset_timesteps
(self, num_inference_steps=100, denoising_strength=1.0, training=False)
diffusion/scheduler/longlive_flow_euler_sampler.py:113
↓ 2 callersMethodset_timesteps
(self, num_inference_steps=100, denoising_strength=1.0, training=False)
diffusion/longsana/utils/scheduler.py:107
↓ 2 callersMethodsinglestep_dpm_solver_third_update
Singlestep solver DPM-Solver-3 from time `s` to time `t`. Args: x: A pytorch tensor. The initial value at time `s`.
diffusion/model/dpm_solver.py:1110
↓ 2 callersFunctionsinusoidal_embedding_1d
(dim, position)
diffusion/model/wan/model.py:112
↓ 2 callersMethodspatial_tiled_decode
(self, z: torch.FloatTensor)
diffusion/model/dc_ae/efficientvit/models/efficientvit/dc_ae.py:660
↓ 2 callersMethodspatial_tiled_encode
(self, x: torch.Tensor)
diffusion/model/dc_ae/efficientvit/models/efficientvit/dc_ae.py:581
↓ 2 callersFunctionsplitname
Returns the basename and extension of a filename
diffusion/data/wids/wids.py:112
↓ 2 callersMethodstart_new_sequence
(self)
diffusion/longsana/trainer/longsana_trainer.py:49
↓ 2 callersMethodstate_dict
(self)
diffusion/model/dc_ae/efficientvit/apps/utils/ema.py:48
↓ 2 callersFunctionsum_flat
Take the sum over all non-batch dimensions.
diffusion/model/gaussian_diffusion.py:40
↓ 2 callersMethodtemporal_tiled_decode
(self, z: torch.Tensor)
diffusion/model/dc_ae/efficientvit/models/efficientvit/dc_ae_with_temporal.py:648
↓ 2 callersMethodtemporal_tiled_encode
(self, x: torch.Tensor)
diffusion/model/dc_ae/efficientvit/models/efficientvit/dc_ae_with_temporal.py:558
↓ 2 callersMethodtiled_decode
r"""Decode a batch of images using a tiled decoder. Args: z: Input batch of latent vectors [B, C, T, H, W]. temb: Opt
diffusion/model/ltx2/causal_vae.py:1973
↓ 2 callersMethodtiled_encode
r"""Encode a batch of images using a tiled encoder. Args: x: Input batch of videos [B, C, T, H, W]. causal: Whether t
diffusion/model/ltx2/causal_vae.py:1907
↓ 2 callersMethodtimestep_embedding
Create sinusoidal timestep embeddings. :param t: a 1-D Tensor of N indices, one per batch element. These ma
diffusion/model/nets/sana_blocks.py:982
↓ 2 callersFunctionto_tensor_1d
(x)
diffusion/model/nets/sana_camctrl_blocks.py:184
↓ 2 callersFunctionto_tensor_flatten
(x)
diffusion/model/nets/sana_camctrl_blocks.py:110
↓ 2 callersFunctiontransform_intrinsics_for_crop
Adjust ``[fx, fy, cx, cy]`` to match a resize-then-center-crop image.
inference_video_scripts/wm/inference_sana_wm.py:742
↓ 2 callersMethodunpatchify
r""" Reconstruct video tensors from patch embeddings. Args: x (List[Tensor]): List of patchified features
diffusion/model/wan/model.py:946
↓ 2 callersMethodunpatchify
x: (N, T, patch_size**2 * C) imgs: (N, H, W, C)
diffusion/model/nets/sana_multi_scale_video_camctrl.py:1190
↓ 2 callersMethodunpatchify
x: (N, T, patch_size**2 * C) imgs: (N, H, W, C)
diffusion/model/nets/sana_multi_scale_video.py:787
↓ 2 callersMethodvalidate_mode
Validate and update cache mode. Args: causal: Desired causal mode Raises: ValueError: If mode conflicts with
diffusion/model/ltx2/causal_vae.py:126
↓ 2 callersMethodvisual
(self, videos)
diffusion/model/wan/clip.py:509
↓ 2 callersFunctionvisualize
(items, bs, sample_steps, cfg_scale, pag_scale=1.0)
scripts/inference_image_reward.py:84
↓ 2 callersFunctionvisualize
(sample_steps, cfg_scale, pag_scale)
scripts/inference_geneval.py:161
↓ 2 callersFunctionvisualize
(items, bs, sample_steps, cfg_scale, pag_scale=1.0)
scripts/inference_dpg.py:75
↓ 2 callersFunctionvisualize
(config, args, model, items, bs, sample_steps, cfg_scale)
scripts/inference_sana_sprint.py:78
↓ 2 callersFunctionvisualize
(sample_steps, cfg_scale)
scripts/inference_sana_sprint_geneval.py:160
↓ 2 callersFunctionvisualize
(config, args, model, items, bs, sample_steps, cfg_scale, pag_scale=1.0)
scripts/inference.py:84
↓ 2 callersFunctionvk_q_mm_divide_fwd
a: (B, H, C+1, D) # C=D b: (B, N, H, D)
diffusion/model/nets/fastlinear/modules/triton_lite_mla_kernels/vk_q_mm_divide_fwd.py:167
↓ 2 callersMethodweighted_sample_clipscore
(self, data, info)
diffusion/data/datasets/sana_data.py:177
↓ 2 callersFunctionwhitespace_clean
(text)
diffusion/model/wan/tokenizers.py:18
↓ 2 callersFunctionworld_to_ray_mats
Build per-pixel ``ray<-world`` transforms from camera unit rays + C2W poses.
diffusion/model/nets/sana_camctrl_blocks.py:273
↓ 2 callersMethodwrite_chunk
Append a chunk of frames. Args: frames_uint8: ``(T, H, W, 3)`` uint8 RGB tensor with ``H == height`` and ``W == w
inference_video_scripts/wm/streaming_mp4_writer.py:168
↓ 2 callersFunctionwrite_component
(name: str, config_repo: str, state_dict: dict[str, object], output_dir: Path)
tools/convert_sana_wm_refiner_to_diffusers.py:235
↓ 2 callersFunctionwrite_component_config
(model_cls, config_repo: str, subfolder: str, output_dir: Path)
tools/convert_sana_wm_refiner_to_diffusers.py:227
↓ 2 callersFunctionwrite_inference_count
(count)
app/app_sana.py:136
↓ 1 callersMethod__init__
( self, model_fn: object, condition: torch.Tensor, uncondition: torch.Tensor,
diffusion/scheduler/self_forcing_flow_euler_sampler.py:166
↓ 1 callersMethod__init__
(self, model_fn, condition, uncondition, cfg_scale, flow_shift=3.0, model_kwargs=None, apg=None)
diffusion/scheduler/flow_euler_sampler.py:30
↓ 1 callersMethod__init__
( self, sampler: Sampler, dataset: Dataset, batch_size: int, aspect_ra
diffusion/utils/data_sampler.py:26
↓ 1 callersMethod__init__
Construct a DPM-Solver. We support both DPM-Solver (`algorithm_type="dpmsolver"`) and DPM-Solver++ (`algorithm_type="dpmsolver++"`).
diffusion/model/dpm_solver.py:671
↓ 1 callersMethod__init__
(self, *args, **kwargs)
diffusion/model/wan/model_wrapper.py:11
↓ 1 callersMethod__init__
( self, input_size=32, patch_size=2, in_channels=4, hidden_size=1152,
diffusion/model/nets/sana_multi_scale_adaln.py:151
↓ 1 callersMethod__init__
( self, input_size=32, patch_size=2, in_channels=4, hidden_size=1152,
diffusion/model/nets/sana.py:168
↓ 1 callersMethod__init__
( self, input_size=32, patch_size=2, in_channels=4, hidden_size=1152,
diffusion/model/nets/sana_multi_scale_controlnet.py:87
↓ 1 callersMethod__init__
( self, input_size=32, patch_size=(1, 2, 2), in_channels=4, hidden_siz
diffusion/model/nets/sana_multi_scale_video.py:345
↓ 1 callersMethod__init__
( self, input_size=32, patch_size=2, in_channels=4, hidden_size=1152,
diffusion/model/nets/sana_U_shape_multi_scale.py:157
↓ 1 callersMethod__init__
(self, disc)
diffusion/model/nets/sana_ladd.py:84
↓ 1 callersMethod__init__
(self, *args, use_autograd_kernel: bool = False, **kwargs)
diffusion/model/nets/sana_gdn_blocks_triton.py:92
↓ 1 callersMethod__init__
( self, input_size=32, patch_size=2, in_channels=4, hidden_size=1152,
diffusion/model/nets/sana_U_shape.py:163
← previousnext →601–700 of 2,606, ranked by callers