MCPcopy Create free account

hub / github.com/a1600012888/LaCT / functions

Functions581 in github.com/a1600012888/LaCT

Functionfsdp_state_dict
(model)
lact_ar_video/minVid/utils/dist_utils.py:202
Functionfused_four_mm_wT_x_kernel
( W0, W1, W2, W3, X0, X1, X2, X3, O, B, M, N, K, # W0
lact_llm/lact_model/lact_triton_kernels/triton_fused_matmul_kernels.py:296
Functionfused_prenorm_update_with_momentum_and_l2_norm
x_main: [B, n, D2], fp32 or bf16, recommended to be fp32 dx: [B, n, D2], bf16 dx_momentum: [B, n, D2], same dtype as x_main momentum_
lact_llm/lact_model/lact_triton_kernels/triton_prenorm_update_with_momentum.py:379
Functionfused_two_mm_wT_xT_kernel
( W0, W1, X0T, X1T, O, B, M, N, K, # W0 strides: [B, K, M] stride_
lact_llm/lact_model/lact_triton_kernels/triton_fused_matmul_kernels.py:48
Functionfused_two_mm_wT_x_kernel
( W0, W1, X0, X1, O, B, M, N, K, # W0 strides: [B, K, M] stride_w0
lact_llm/lact_model/lact_triton_kernels/triton_fused_matmul_kernels.py:176
Methodgenerate
r""" Generates video frames from input image and text prompt using diffusion process. Args: input_prompt (`str`):
lact_ar_video/minVid/models/wan/wan_base/image2video.py:129
Functionget_autotune_configs
( block_M_list=(64, 128), block_N_list=(64, 128, 256), block_K_list=(32, 64), num_stages_list=
lact_llm/lact_model/lact_triton_kernels/triton_swiglu_bwd_kernels.py:10
Functionget_autotune_configs
( block_M_list=(64, 128), block_N_list=(64, 128, 256), block_K_list=(32, 64), num_stages_list=
lact_llm/lact_model/lact_triton_kernels/triton_fused_matmul_kernels.py:19
Functionget_autotune_configs
( block_M_list=(64, 128), block_N_list=(64, 128, 256), block_K_list=(32, 64), num_stages_list=
lact_llm/lact_model/lact_triton_kernels/triton_swiglu_kernels.py:9
Functionget_autotune_configs
( block_M_list=(64, 128), block_N_list=(64, 128, 256), block_K_list=(32, 64), num_stages_list=
lact_llm/lact_model/lact_triton_kernels/triton_swiglu_bwd_with_lr.py:9
Methodget_decoder
(self)
lact_llm/lact_model/modeling_lact.py:379
Methodget_input_embeddings
(self)
lact_llm/lact_model/modeling_lact.py:227
Methodget_input_embeddings
(self)
lact_llm/lact_model/modeling_lact.py:364
Methodget_output_embeddings
(self)
lact_llm/lact_model/modeling_lact.py:370
Methodget_trainable_params
(self, attn_only=True, **kwargs)
lact_ar_video/minVid/models/video_latent_flow_matching_ar.py:425
Methodget_trainable_params
(self, attn_only=True, **kwargs)
lact_ar_video/minVid/models/video_latent_flow_matching.py:219
Methodget_trainable_params
(self, attn_only=True, **kwargs)
lact_ar_video/minVid/models/wan/wan_warpper_versatile.py:243
Methodget_trainable_params
(self, attn_only=True)
lact_ar_video/minVid/models/wan/wan_base/modules/wan_model_warpper.py:113
Methodget_trainable_params
(self, attn_only=True, first_stage=False, **kwargs)
lact_ar_video/minVid/models/blocks/ar_lact_swa_repeat_sp.py:1151
Functiongrid
(meta)
lact_llm/lact_model/lact_triton_kernels/triton_swiglu_bwd_kernels.py:226
Functiongrid
(meta)
lact_llm/lact_model/lact_triton_kernels/triton_fused_matmul_kernels.py:521
Functiongrid
(meta)
lact_llm/lact_model/lact_triton_kernels/triton_pointwise_kernels.py:288
Functiongrid
(meta)
lact_llm/lact_model/lact_triton_kernels/triton_swiglu_kernels.py:149
Functiongrid
(meta)
lact_llm/lact_model/lact_triton_kernels/l2norm_triton_kernels.py:292
Functiongrid
(meta)
lact_llm/lact_model/lact_triton_kernels/triton_swiglu_bwd_with_lr.py:249
Methodinference
Perform inference on the given noise and text prompts. Inputs: noise (torch.Tensor): The input noise tensor of shape
lact_ar_video/minVid/models/wan/ar_wan_inference_pipeline.py:162
Methodinference_with_trajectory
Run inference with the given diffusion / distilled generators. Input: - noise: a tensor sampled from N(0, 1) with shape
lact_ar_video/minVid/models/model_interface.py:107
Methodinit_weight
(self, conv)
lact_ar_video/minVid/models/wan/wan_base/modules/vae.py:162
Methodinit_weight2
(self, conv)
lact_ar_video/minVid/models/wan/wan_base/modules/vae.py:174
Functioninit_weights
(m)
lact_ar_video/minVid/models/wan/wan_base/modules/t5.py:27
Methodinit_weights
r""" Initialize model parameters using Xavier initialization.
lact_ar_video/minVid/models/wan/wan_base/modules/wan_model_warpper.py:401
Functionis_sp
()
lact_ar_video/minVid/models/wan/wan_base/distributed/sp_support.py:23
Functionl2norm_add_bwd_kernel_2d
( y, rstd, tgt_scale, # output dy, dx, dx_add, dtgt_scale, eps, x_dtyp
lact_llm/lact_model/lact_triton_kernels/l2norm_triton_kernels.py:106
Functionl2norm_add_fwd_kernel1
( x, x_add, y, tgt_scale, rstd, eps, tgt_dtype: tl.constexpr, # 0 for bf16, 1 for
lact_llm/lact_model/lact_triton_kernels/l2norm_triton_kernels.py:182
Functionl2norm_add_fwd_kernel_2d
( x, # [B, T, D] x_add, y, tgt_scale, rstd, eps, tgt_dtype: tl.constexpr, B:
lact_llm/lact_model/lact_triton_kernels/l2norm_triton_kernels.py:31
Functionl2norm_bwd_kernel1
( y, rstd, tgt_scale, dy, # output dx, dx_add, dtgt_scale, eps, x_dtyp
lact_llm/lact_model/lact_triton_kernels/l2norm_triton_kernels.py:226
Methodnoop_no_sync
()
lact_ar_video/minVid/models/wan/ar_wan_inference_pipeline.py:192
Methodnoop_no_sync
()
lact_ar_video/minVid/models/wan/wan_inference_pipeline.py:178
Methodnoop_no_sync
()
lact_ar_video/minVid/models/wan/wan_base/image2video.py:249
Methodnoop_no_sync
()
lact_ar_video/minVid/models/wan/wan_base/text2video.py:201
Methodparam_groups
(self)
lact_ar_video/minVid/models/wan/wan_base/modules/clip.py:418
Methodpost_init
A few custom initialization steps that should be called after the object is created. Currently, the only one we have is to bind a few
lact_ar_video/minVid/models/model_interface.py:51
Functionprenorm_update_with_momentum_and_l2_norm_backward_kernel
( y_normalized_ptr, # [B, n, D2], fp32 dx_momentum_ptr, # [B, n, D2], fp32 momentum_mu_ptr, # [
lact_llm/lact_model/lact_triton_kernels/triton_prenorm_update_with_momentum.py:181
Functionprenorm_update_with_momentum_and_l2_norm_kernel
( x_main_ptr, # [B, n, D2], fp32 dx_ptr, # [B, n, D2], bf16 dx_momentum_ptr, # [B, n, D2], fp32
lact_llm/lact_model/lact_triton_kernels/triton_prenorm_update_with_momentum.py:48
Functionprepare_images_for_saving
( images_tensor, height, width, grid_size=1, range_type="neg1pos1" )
lact_ar_video/minVid/utils/dist_utils.py:219
Methodprepare_inputs_for_generation
( self, input_ids: torch.LongTensor = None, past_key_values: Optional[Union[Cache, Lis
lact_llm/lact_model/modeling_lact.py:383
Functionprocess_vision_info
( conversations: list[dict] | list[list[dict]], )
lact_ar_video/minVid/models/wan/wan_base/utils/qwen_vl_utils.py:344
Functionpytorch_swiglu_bwd_bwd_fused_cat_inp_out
In previous fwd pass: dx0 = lr0 * dh * x2 * sigma * (1 + x0 * (1 - sigma)) dx2 = lr2 * dh * silu(x0) hidden_lr1 = lr1 * x2 * silu(x0)
lact_llm/lact_model/lact_triton_kernels/lact_fw_grad.py:179
Methodqkv_fn
(x)
lact_ar_video/minVid/models/wan/wan_base/modules/hybrid_model.py:140
Methodqkv_fn
(x)
lact_ar_video/minVid/models/wan/wan_base/modules/hybrid_model.py:199
Methodqkv_fn
(x)
lact_ar_video/minVid/models/wan/wan_base/modules/hybrid_model.py:266
Methodqkv_fn
(x)
lact_ar_video/minVid/models/wan/wan_base/modules/model.py:336
Methodqkv_fn
(x)
lact_ar_video/minVid/models/blocks/ar_lact_swa_repeat_sp.py:820
Methodqkv_fn
(x)
lact_ar_video/minVid/models/blocks/ar_lact_swa_repeat.py:767
Functionreference_lact_swiglu_ffn_fast_weight_grads
Args: W0, W2: [B, M, K] or [B, Hidden, D] W1: [B, K, M] or [B, D, Hidden] X: [M, N, K] or [B, num_Tokens, D]
lact_llm/lact_model/lact_triton_kernels/lact_fw_grad.py:269
Functionreference_swiglu_ffn_fwd
Args: W0, W2: [B, M, K] or [B, Hidden, D] W1: [B, K, M] or [B, D, Hidden] X: [M, N, K] or [B, num_Tokens, D]
lact_llm/lact_model/lact_triton_kernels/lact_swiglu_ffn.py:105
Methodreturn_act_ckpt_check_fn
Will be used to apply activation checkpointing to the WanAttentionBlock. Check if the submodule is a WanAttentionBlock.
lact_ar_video/minVid/models/wan/wan_warpper_versatile.py:130
Functionsave_video
Save a video tensor to disk using imageio. Args: video_tensor (torch.Tensor): Video tensor of shape [b, f, c, h, w] in uint8 for
lact_ar_video/minVid/utils/io_utils.py:33
Methodscale_model_input
Ensures interchangeability with schedulers that need to scale the denoising model input depending on the current timestep. Ar
lact_ar_video/minVid/models/wan/wan_base/utils/fm_solvers.py:800
Methodscale_model_input
Ensures interchangeability with schedulers that need to scale the denoising model input depending on the current timestep. A
lact_ar_video/minVid/models/wan/wan_base/utils/fm_solvers_unipc.py:741
Methodset_begin_index
Sets the begin index for the scheduler. This function should be run from pipeline before the inference. Args: begin_index
lact_ar_video/minVid/models/wan/wan_base/utils/fm_solvers.py:216
Methodset_begin_index
Sets the begin index for the scheduler. This function should be run from pipeline before the inference. Args: begin_inde
lact_ar_video/minVid/models/wan/wan_base/utils/fm_solvers_unipc.py:149
Methodset_decoder
(self, decoder)
lact_llm/lact_model/modeling_lact.py:376
Methodset_input_embeddings
(self, value)
lact_llm/lact_model/modeling_lact.py:230
Methodset_input_embeddings
(self, value)
lact_llm/lact_model/modeling_lact.py:367
Methodset_module_grad
Adjusts the state of each module in the object. Parameters: - module_grad (dict): A dictionary where each key is the name of
lact_ar_video/minVid/models/model_interface.py:59
Methodset_module_grad
Adjusts the state of each module in the object. Parameters: - module_grad (dict): A dictionary where each key is the name of
lact_ar_video/minVid/models/wan/wan_warpper_versatile.py:109
Methodset_output_embeddings
(self, new_embeddings)
lact_llm/lact_model/modeling_lact.py:373
Methodset_timesteps
Sets the discrete timesteps used for the diffusion chain (to be run before inference). Args: num_inference_steps (`int`):
lact_ar_video/minVid/models/wan/wan_base/utils/fm_solvers_unipc.py:160
Functionshard_model
( model, device_id, param_dtype=torch.bfloat16, reduce_dtype=torch.float32, buffer_dtype=t
lact_ar_video/minVid/models/wan/wan_base/distributed/fsdp.py:10
Functionsp_all_gather
Note: 1. need all rank have the same size and type of x.
lact_ar_video/minVid/models/wan/wan_base/distributed/sp_support.py:131
Methodstep_index
The index counter for current timestep. It will increase 1 after each scheduler step.
lact_ar_video/minVid/models/wan/wan_base/utils/fm_solvers.py:202
Methodstep_index
The index counter for current timestep. It will increase 1 after each scheduler step.
lact_ar_video/minVid/models/wan/wan_base/utils/fm_solvers_unipc.py:135
Functionstr2bool
Convert a string to a boolean. Supported true values: 'yes', 'true', 't', 'y', '1' Supported false values: 'no', 'false', 'f', 'n', '0'
lact_ar_video/minVid/models/wan/wan_base/utils/utils.py:94
Functionswiglu_backward_three_bmm_triton_op
( W0_W2: torch.Tensor, W1: torch.Tensor, X: torch.Tensor, V: torch.Tensor )
lact_llm/lact_model/lact_triton_kernels/triton_swiglu_bwd_kernels.py:264
Methodtraining_target
(self, sample, noise, timestep)
lact_ar_video/minVid/models/wan/flow_match.py:77
Methodtraining_weight
(self, timestep)
lact_ar_video/minVid/models/wan/flow_match.py:81
Functionusp_attn_forward
(self, x, seq_lens, grid_sizes,
lact_ar_video/minVid/models/wan/wan_base/distributed/xdit_context_parallel.py:149
Functionusp_dit_forward
x: A list of videos each with shape [C, T, H, W]. t: [B]. context: A list of text embeddings each with s
lact_ar_video/minVid/models/wan/wan_base/distributed/xdit_context_parallel.py:66
Functionvalue_type
Convert str to bool/int/float if possible
lact_ar_video/minVid/utils/config_utils.py:70
Functionxlm_roberta_large
XLMRobertaLarge adapted from Huggingface.
lact_ar_video/minVid/models/wan/wan_base/modules/xlm_roberta.py:146
← previous501–581 of 581, ranked by callers