MCPcopy Create free account

hub / github.com/NVlabs/Sana / functions

Functions2,606 in github.com/NVlabs/Sana

Functiongenerate
( prompt: str = None, height: int = 1024, width: int = 1024, num_inference_steps: int = 4,
app/app_sana_4bit_compare_bf16.py:168
Functiongenerate
( prompt: str = None, negative_prompt: str = "", style: str = DEFAULT_STYLE_NAME, use_negative
app/app_sana_4bit.py:175
Functiongenerate
( prompt: str = None, negative_prompt: str = "", style: str = DEFAULT_STYLE_NAME, use_negative
app/app_sana.py:239
Functiongenerate_2
( prompt: str = None, negative_prompt: str = "", style: str = DEFAULT_STYLE_NAME, use_negative
app/app_sana_multithread.py:234
Methodgenerate_chunk_with_cache
( self, noise: torch.Tensor, prompt_embeds: torch.Tensor, mask: Optional[torch
diffusion/longsana/pipeline/sana_switch_training_pipeline.py:22
Functiongenerate_img
( prompt, sampler, sample_steps, scale, pag_scale=1.0, guidance_type="classifier-free"
scripts/interface.py:116
Functiongenerate_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
Methodgenerator_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
Functionget_act_name
(act: nn.Module or None)
diffusion/model/act.py:53
Methodget_attn_output
(self)
diffusion/model/wan/model.py:1110
Functionget_autotune_config
()
diffusion/model/nets/fastlinear/modules/triton_lite_mla_kernels/vk_q_mm_relu_bwd.py:37
Functionget_autotune_config
()
diffusion/model/nets/fastlinear/modules/triton_lite_mla_kernels/mm.py:84
Functionget_autotune_config
()
diffusion/model/nets/fastlinear/modules/triton_lite_mla_kernels/pad_vk_mm_fwd.py:46
Functionget_autotune_config
()
diffusion/model/nets/fastlinear/modules/triton_lite_mla_kernels/linear_relu_fwd.py:84
Functionget_autotune_config
()
diffusion/model/nets/fastlinear/modules/triton_lite_mla_kernels/vk_q_mm_divide_fwd.py:46
Functionget_autotune_config
()
diffusion/model/nets/fastlinear/modules/triton_lite_mla_kernels/vk_mm_relu_bwd.py:37
Functionget_autotune_config
()
diffusion/model/nets/fastlinear/modules/triton_lite_mla_kernels/proj_divide_bwd.py:110
Functionget_autotune_config
()
diffusion/model/nets/fastlinear/modules/triton_mb_conv_pre_glu_kernels/linear_glu_fwd.py:84
Functionget_autotune_config
()
diffusion/model/nets/fastlinear/modules/triton_mb_conv_pre_glu_kernels/depthwise_conv_fwd.py:46
Methodget_block_output
(self)
diffusion/model/wan/model.py:1123
Methodget_block_output
(self)
diffusion/model/nets/sana_multi_scale_video.py:1023
Functionget_config
(name)
configs/sol_rl/sana.py:7
Functionget_config
()
configs/sol_rl/base.py:4
Functionget_config
(name)
configs/sol_rl/flux1.py:7
Functionget_config
(name)
configs/sol_rl/sd3.py:7
Methodget_count
(self)
diffusion/model/dc_ae/efficientvit/apps/utils/metric.py:41
Methodget_data_info
(self, idx)
diffusion/data/datasets/sana_data_multi_scale.py:265
Methodget_data_info
(self, idx)
diffusion/data/datasets/video/sana_video_data.py:431
Functionget_data_path
(data_dir)
diffusion/data/builder.py:52
Functionget_data_root_and_path
(data_dir)
diffusion/data/builder.py:59
Functionget_dict_chunks
(data, bs)
tools/controlnet/inference_controlnet.py:53
Functionget_dict_chunks
(data, bs)
scripts/inference_image_reward.py:58
Functionget_dict_chunks
(data, bs)
scripts/inference_sana_sprint.py:52
Functionget_dict_chunks
(data, bs)
scripts/inference.py:58
Functionget_dict_chunks
(data, bs)
inference_video_scripts/inference_sana_video.py:64
Functionget_dtype
(model: nn.Module)
diffusion/model/dc_ae/efficientvit/models/utils/network.py:45
Functionget_dtype_from_str
(dtype: str)
diffusion/model/dc_ae/efficientvit/models/utils/network.py:104
Methodget_features
(module, input, output)
diffusion/model/nets/sana_ladd.py:50
Methodget_file
(self, i)
diffusion/data/wids/wids_mmtar.py:135
Functionget_local_proc_group
(group_size=8)
diffusion/utils/dist_utils.py:69
Methodget_lr
(self)
diffusion/model/dc_ae/efficientvit/apps/utils/lr.py:41
Methodget_lr
(self)
diffusion/model/dc_ae/efficientvit/apps/utils/lr.py:72
Functionget_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
Methodget_prompt_embed
(self, prompt, num_images_per_prompt=1)
app/sana_pipeline_inpaint.py:234
Methodget_remaining_epoch
(self, epoch, post=True)
diffusion/model/dc_ae/efficientvit/apps/trainer/run_config.py:121
Functionget_same_padding
(kernel_size: int or tuple[int, ...])
diffusion/model/utils.py:174
Methodget_sequence_length
Get current sequence length
diffusion/longsana/model/streaming_sana_long.py:743
Methodget_velocity
( self, sample: torch.FloatTensor, noise: torch.FloatTensor, timesteps: torch.IntTensor )
diffusion/scheduler/lcm_scheduler.py:434
Functionhash_localname
(dldir="/tmp/_wids_cache")
diffusion/data/wids/wids.py:335
Functionhash_str_to_int
Hash a string to an integer.
app/app_sana_4bit_compare_bf16.py:91
Functionhf_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
Functionhpsv2_score
(device)
diffusion/post_training/rewards.py:337
Functionimagereward_score
(device)
diffusion/post_training/rewards.py:364
Functionimg2mask
(img, H, W, low=10, high=90)
tools/controlnet/annotator/util.py:83
Methodin_features
(self)
train_scripts/sol_rl/train_utils.py:399
Methodinference_interactive
( self, noise: torch.Tensor, prompts: List[str], return_latents: bool = True,
diffusion/longsana/pipeline/sana_inference_interactive_pipeline_long_chunk.py:143
Methodinference_interactive
( self, noise: torch.Tensor, prompts: List[str], return_latents: bool = True,
diffusion/longsana/pipeline/sana_inference_interactive_pipeline.py:159
Methodinference_with_trajectory
( self, noise: torch.Tensor, prompt_embeds: torch.Tensor, mask: Optional[torch
diffusion/longsana/pipeline/sana_switch_training_pipeline.py:249
Methodinit_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
Methodinit_constant
partial random init strategy: keep the first N layers, random init the remaining layers
diffusion/model/model_growth_utils.py:240
Methodinit_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
Methodinit_interpolation
interpolation init strategy
diffusion/model/model_growth_utils.py:210
Functioninit_model
( network: nn.Module, init_from: Optional[str] = None, backbone_init_from: Optional[str] = None,
diffusion/model/dc_ae/efficientvit/apps/setup.py:82
Functioninit_model_configs
(model_cfg, vae_cfg)
diffusion/model/wan/model.py:1303
Methodinit_progressive
progressive init strategy (with noise)
diffusion/model/model_growth_utils.py:186
Methodinit_random
partial random init strategy: keep the first N layers, random init the remaining layers
diffusion/model/model_growth_utils.py:282
Methodinit_weight
(self, conv)
diffusion/model/wan2_2/vae.py:156
Methodinit_weight
(self, conv)
diffusion/model/wan/vae.py:141
Methodinit_weight2
(self, conv)
diffusion/model/wan2_2/vae.py:167
Methodinit_weight2
(self, conv)
diffusion/model/wan/vae.py:153
Functioninit_weights
(m)
diffusion/model/wan/t5.py:27
Methodinitialize_gemma_params
(self, model_name="google/gemma-2b-it")
diffusion/model/nets/sana_blocks.py:1103
Functionintersect_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
Functionis_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
Functionis_dangerous
(tokenizer, model, user_prompt, threshold=0.5)
app/safety_check.py:38
Methodis_first_chunk
Check if this is the first chunk.
diffusion/model/ltx2/causal_vae.py:108
Functionis_master
()
diffusion/utils/dist_utils.py:61
Methodis_vb
(self)
diffusion/model/gaussian_diffusion.py:77
Functionkeep_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
Methodkey_gap
(self)
diffusion/utils/action_overlay.py:153
Methodkey_radius
(self)
diffusion/utils/action_overlay.py:157
Methodkey_size
(self)
diffusion/utils/action_overlay.py:149
Functionl2norm
This function is intended to align with the l2norm implementation in the FLA library.
diffusion/model/nets/sana_gdn_blocks.py:65
Functionlambda_forward
(x)
diffusion/model/norms.py:101
Functionlambda_forward
(x)
diffusion/model/nets/fastlinear/modules/nn/norm.py:102
Functionlambda_forward
(x)
diffusion/model/dc_ae/efficientvit/models/nn/norm.py:136
Functionlinear_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
Functionlinear_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
Functionlinear_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
Functionlint
(session)
tools/metrics/pytorch-fid/noxfile.py:7
Methodload_diagonal_mask
(self, *args, **kwargs)
diffusion/model/nets/sana_multi_scale_video_camctrl.py:1256
Methodload_image
Load and process the input image
app/app_sana_inpaint.py:193
Methodload_model_ckpt
(self, pretrained_model_path, init_patch_embedding=False, verbose=True, enable_lora=False)
diffusion/model/wan/model.py:1001
Functionload_model_hook
(models, input_dir)
train_scripts/train_dreambooth_lora_sana.py:1024
Methodload_pretrain_and_initialize
(self, model_path)
diffusion/model/nets/sana_multi_scale_controlnet.py:153
Methodload_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
Methodload_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
Methodload_state_dict_from_2d
(self, state_dict: dict[str, torch.Tensor], method: str)
diffusion/model/dc_ae/efficientvit/models/nn/ops_3d.py:408
Methodload_state_dict_from_2d
(self, state_dict: dict[str, torch.Tensor], method: str)
diffusion/model/dc_ae/efficientvit/models/nn/ops_3d.py:438
Methodload_state_dict_from_2d
(self, state_dict: dict[str, torch.Tensor], method: str)
diffusion/model/dc_ae/efficientvit/models/nn/ops_3d.py:483
← previousnext →2,301–2,400 of 2,606, ranked by callers