Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NVlabs/Sana
/ functions
Functions
2,606 in github.com/NVlabs/Sana
⨍
Functions
2,606
◇
Types & classes
463
↳
Endpoints
11
Function
generate
( prompt: str = None, height: int = 1024, width: int = 1024, num_inference_steps: int = 4,
app/app_sana_4bit_compare_bf16.py:168
Function
generate
( prompt: str = None, negative_prompt: str = "", style: str = DEFAULT_STYLE_NAME, use_negative
app/app_sana_4bit.py:175
Function
generate
( prompt: str = None, negative_prompt: str = "", style: str = DEFAULT_STYLE_NAME, use_negative
app/app_sana.py:239
Function
generate_2
( prompt: str = None, negative_prompt: str = "", style: str = DEFAULT_STYLE_NAME, use_negative
app/app_sana_multithread.py:234
Method
generate_chunk_with_cache
( self, noise: torch.Tensor, prompt_embeds: torch.Tensor, mask: Optional[torch
diffusion/longsana/pipeline/sana_switch_training_pipeline.py:22
Function
generate_img
( prompt, sampler, sample_steps, scale, pag_scale=1.0, guidance_type="classifier-free"
scripts/interface.py:116
Function
generate_random_c2w_poses
Generates N random 4x4 Camera-to-World (c2w) homogeneous transformation matrices. The rotation (R) is generated using unit quaternions for u
diffusion/utils/cam_utils.py:20
Method
generator_loss
Generate image/videos from noisy latents and compute the ODE regression loss. Input: - ode_latent: a tensor containing th
diffusion/longsana/model/ode_regression_sana.py:315
Function
get_act_name
(act: nn.Module or None)
diffusion/model/act.py:53
Method
get_attn_output
(self)
diffusion/model/wan/model.py:1110
Function
get_autotune_config
()
diffusion/model/nets/fastlinear/modules/triton_lite_mla_kernels/vk_q_mm_relu_bwd.py:37
Function
get_autotune_config
()
diffusion/model/nets/fastlinear/modules/triton_lite_mla_kernels/mm.py:84
Function
get_autotune_config
()
diffusion/model/nets/fastlinear/modules/triton_lite_mla_kernels/pad_vk_mm_fwd.py:46
Function
get_autotune_config
()
diffusion/model/nets/fastlinear/modules/triton_lite_mla_kernels/linear_relu_fwd.py:84
Function
get_autotune_config
()
diffusion/model/nets/fastlinear/modules/triton_lite_mla_kernels/vk_q_mm_divide_fwd.py:46
Function
get_autotune_config
()
diffusion/model/nets/fastlinear/modules/triton_lite_mla_kernels/vk_mm_relu_bwd.py:37
Function
get_autotune_config
()
diffusion/model/nets/fastlinear/modules/triton_lite_mla_kernels/proj_divide_bwd.py:110
Function
get_autotune_config
()
diffusion/model/nets/fastlinear/modules/triton_mb_conv_pre_glu_kernels/linear_glu_fwd.py:84
Function
get_autotune_config
()
diffusion/model/nets/fastlinear/modules/triton_mb_conv_pre_glu_kernels/depthwise_conv_fwd.py:46
Method
get_block_output
(self)
diffusion/model/wan/model.py:1123
Method
get_block_output
(self)
diffusion/model/nets/sana_multi_scale_video.py:1023
Function
get_config
(name)
configs/sol_rl/sana.py:7
Function
get_config
()
configs/sol_rl/base.py:4
Function
get_config
(name)
configs/sol_rl/flux1.py:7
Function
get_config
(name)
configs/sol_rl/sd3.py:7
Method
get_count
(self)
diffusion/model/dc_ae/efficientvit/apps/utils/metric.py:41
Method
get_data_info
(self, idx)
diffusion/data/datasets/sana_data_multi_scale.py:265
Method
get_data_info
(self, idx)
diffusion/data/datasets/video/sana_video_data.py:431
Function
get_data_path
(data_dir)
diffusion/data/builder.py:52
Function
get_data_root_and_path
(data_dir)
diffusion/data/builder.py:59
Function
get_dict_chunks
(data, bs)
tools/controlnet/inference_controlnet.py:53
Function
get_dict_chunks
(data, bs)
scripts/inference_image_reward.py:58
Function
get_dict_chunks
(data, bs)
scripts/inference_sana_sprint.py:52
Function
get_dict_chunks
(data, bs)
scripts/inference.py:58
Function
get_dict_chunks
(data, bs)
inference_video_scripts/inference_sana_video.py:64
Function
get_dtype
(model: nn.Module)
diffusion/model/dc_ae/efficientvit/models/utils/network.py:45
Function
get_dtype_from_str
(dtype: str)
diffusion/model/dc_ae/efficientvit/models/utils/network.py:104
Method
get_features
(module, input, output)
diffusion/model/nets/sana_ladd.py:50
Method
get_file
(self, i)
diffusion/data/wids/wids_mmtar.py:135
Function
get_local_proc_group
(group_size=8)
diffusion/utils/dist_utils.py:69
Method
get_lr
(self)
diffusion/model/dc_ae/efficientvit/apps/utils/lr.py:41
Method
get_lr
(self)
diffusion/model/dc_ae/efficientvit/apps/utils/lr.py:72
Function
get_named_beta_schedule
Get a pre-defined beta schedule for the given name. The beta schedule library consists of beta schedules which remain similar in the limi
diffusion/model/gaussian_diffusion.py:119
Method
get_prompt_embed
(self, prompt, num_images_per_prompt=1)
app/sana_pipeline_inpaint.py:234
Method
get_remaining_epoch
(self, epoch, post=True)
diffusion/model/dc_ae/efficientvit/apps/trainer/run_config.py:121
Function
get_same_padding
(kernel_size: int or tuple[int, ...])
diffusion/model/utils.py:174
Method
get_sequence_length
Get current sequence length
diffusion/longsana/model/streaming_sana_long.py:743
Method
get_velocity
( self, sample: torch.FloatTensor, noise: torch.FloatTensor, timesteps: torch.IntTensor )
diffusion/scheduler/lcm_scheduler.py:434
Function
hash_localname
(dldir="/tmp/_wids_cache")
diffusion/data/wids/wids.py:335
Function
hash_str_to_int
Hash a string to an integer.
app/app_sana_4bit_compare_bf16.py:91
Function
hf_download_data
Download dummy data from a Hugging Face repository. Args: repo_id (str): The ID of the Hugging Face repository. filename (str): The
sana/tools/hf_utils.py:64
Function
hpsv2_score
(device)
diffusion/post_training/rewards.py:337
Function
imagereward_score
(device)
diffusion/post_training/rewards.py:364
Function
img2mask
(img, H, W, low=10, high=90)
tools/controlnet/annotator/util.py:83
Method
in_features
(self)
train_scripts/sol_rl/train_utils.py:399
Method
inference_interactive
( self, noise: torch.Tensor, prompts: List[str], return_latents: bool = True,
diffusion/longsana/pipeline/sana_inference_interactive_pipeline_long_chunk.py:143
Method
inference_interactive
( self, noise: torch.Tensor, prompts: List[str], return_latents: bool = True,
diffusion/longsana/pipeline/sana_inference_interactive_pipeline.py:159
Method
inference_with_trajectory
( self, noise: torch.Tensor, prompt_embeds: torch.Tensor, mask: Optional[torch
diffusion/longsana/pipeline/sana_switch_training_pipeline.py:249
Method
init_block_expand
block expand strategy: each layer is expanded to continuous multiple layers Args: expand_ratio: expand ratio, default is 3, i.e.,
diffusion/model/model_growth_utils.py:297
Method
init_constant
partial random init strategy: keep the first N layers, random init the remaining layers
diffusion/model/model_growth_utils.py:240
Method
init_cyclic
cyclic copy strategy Args: zero_gate: whether to initialize the gate params of the non-first-appearing repeated layers to 0
diffusion/model/model_growth_utils.py:134
Method
init_interpolation
interpolation init strategy
diffusion/model/model_growth_utils.py:210
Function
init_model
( network: nn.Module, init_from: Optional[str] = None, backbone_init_from: Optional[str] = None,
diffusion/model/dc_ae/efficientvit/apps/setup.py:82
Function
init_model_configs
(model_cfg, vae_cfg)
diffusion/model/wan/model.py:1303
Method
init_progressive
progressive init strategy (with noise)
diffusion/model/model_growth_utils.py:186
Method
init_random
partial random init strategy: keep the first N layers, random init the remaining layers
diffusion/model/model_growth_utils.py:282
Method
init_weight
(self, conv)
diffusion/model/wan2_2/vae.py:156
Method
init_weight
(self, conv)
diffusion/model/wan/vae.py:141
Method
init_weight2
(self, conv)
diffusion/model/wan2_2/vae.py:167
Method
init_weight2
(self, conv)
diffusion/model/wan/vae.py:153
Function
init_weights
(m)
diffusion/model/wan/t5.py:27
Method
initialize_gemma_params
(self, model_name="google/gemma-2b-it")
diffusion/model/nets/sana_blocks.py:1103
Function
intersect_ranges
Return the intersection of the half-open integer interval r with the list of half-open integer intervals.
diffusion/data/wids/wids.py:819
Function
is_chunk_causal_request
Decide whether a layer should run in chunk-causal (vs. fully bidirectional) mode. Chunk-causal mode applies when EITHER: 1. ``chunk_size``
diffusion/utils/chunk_utils.py:26
Function
is_dangerous
(tokenizer, model, user_prompt, threshold=0.5)
app/safety_check.py:38
Method
is_first_chunk
Check if this is the first chunk.
diffusion/model/ltx2/causal_vae.py:108
Function
is_master
()
diffusion/utils/dist_utils.py:61
Method
is_vb
(self)
diffusion/model/gaussian_diffusion.py:77
Function
keep_while_reading
This is a possible cleanup callback for cleanup_callback of MIndexedTar. It assumes that as long as there are some readers for a file, more r
diffusion/data/wids/wids_mmtar.py:140
Method
key_gap
(self)
diffusion/utils/action_overlay.py:153
Method
key_radius
(self)
diffusion/utils/action_overlay.py:157
Method
key_size
(self)
diffusion/utils/action_overlay.py:149
Function
l2norm
This function is intended to align with the l2norm implementation in the FLA library.
diffusion/model/nets/sana_gdn_blocks.py:65
Function
lambda_forward
(x)
diffusion/model/norms.py:101
Function
lambda_forward
(x)
diffusion/model/nets/fastlinear/modules/nn/norm.py:102
Function
lambda_forward
(x)
diffusion/model/dc_ae/efficientvit/models/nn/norm.py:136
Function
linear_glu_fwd_kernel
Input: x: (..., C) weight: (2*D, C) bias: (2*D,) Output: y: (..., D)
diffusion/model/nets/fastlinear/modules/triton_mb_conv_pre_glu_kernels/linear_glu_fwd.py:98
Function
linear_quadratic_schedule
Meta MovieGen style linear-quadratic scheduler. Output range matches time_uniform_flow: from ~0.999 to 0 Args: N: Number of samp
diffusion/model/dpm_solver.py:2078
Function
linear_relu_fwd_kernel
Kernel for computing the matmul C = A x B. A has shape (M, K), B has shape (K, N) and C has shape (M, N)
diffusion/model/nets/fastlinear/modules/triton_lite_mla_kernels/linear_relu_fwd.py:98
Function
lint
(session)
tools/metrics/pytorch-fid/noxfile.py:7
Method
load_diagonal_mask
(self, *args, **kwargs)
diffusion/model/nets/sana_multi_scale_video_camctrl.py:1256
Method
load_image
Load and process the input image
app/app_sana_inpaint.py:193
Method
load_model_ckpt
(self, pretrained_model_path, init_patch_embedding=False, verbose=True, enable_lora=False)
diffusion/model/wan/model.py:1001
Function
load_model_hook
(models, input_dir)
train_scripts/train_dreambooth_lora_sana.py:1024
Method
load_pretrain_and_initialize
(self, model_path)
diffusion/model/nets/sana_multi_scale_controlnet.py:153
Method
load_state_dict
when the channel in FFN is not the same as the checkpoint, load the checkpoint
diffusion/model/nets/sana_multi_scale_video_camctrl.py:1323
Method
load_state_dict_from_2d
(self, state_dict: dict[str, torch.Tensor], method: str = "zero_pad")
diffusion/model/dc_ae/efficientvit/models/nn/ops_3d.py:132
Method
load_state_dict_from_2d
(self, state_dict: dict[str, torch.Tensor], method: str)
diffusion/model/dc_ae/efficientvit/models/nn/ops_3d.py:408
Method
load_state_dict_from_2d
(self, state_dict: dict[str, torch.Tensor], method: str)
diffusion/model/dc_ae/efficientvit/models/nn/ops_3d.py:438
Method
load_state_dict_from_2d
(self, state_dict: dict[str, torch.Tensor], method: str)
diffusion/model/dc_ae/efficientvit/models/nn/ops_3d.py:483
← previous
next →
2,301–2,400 of 2,606, ranked by callers