MCPcopy Create free account

hub / github.com/a1600012888/LaCT / functions

Functions581 in github.com/a1600012888/LaCT

↓ 32 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
lact_ar_video/minVid/models/wan/wan_base/modules/attention.py:43
↓ 27 callersMethoddevice
(self)
lact_ar_video/minVid/models/wan/wan_warpper.py:52
↓ 24 callersFunctionreport_error
(ref, ours, name="")
lact_llm/lact_model/lact_triton_kernels/benchmark.py:3
↓ 22 callersMethodupdate
(self)
lact_ar_video/minVid/utils/ema_param_utils.py:12
↓ 20 callersFunctioninstantiate_from_config
config: class_name: str (module.class) other_params, etc. will be passed as a whole config to the class
lact_ar_video/minVid/utils/config_utils.py:17
↓ 13 callersFunctionprint_rank0
(*args, **kwargs)
lact_ar_video/minVid/utils/dist_utils.py:238
↓ 12 callersFunctionzeropower_via_newtonschulz5
modified from https://github.com/MoonshotAI/Moonlight/blob/master/examples/toy_train.py#L49 Major change: G is [b, d, d] rather than [d, d]
lact_ar_video/minVid/models/blocks/functions.py:38
↓ 10 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
lact_ar_video/minVid/models/wan/wan_base/utils/fm_solvers.py:333
↓ 9 callersMethod__init__
(self, dim, out_dim, patch_size, eps=1e-6)
lact_ar_video/minVid/models/wan/wan_base/modules/hybrid_model.py:470
↓ 8 callersMethod__init__
(self, vocab_size, dim, dim_attn, dim_ffn,
lact_ar_video/minVid/models/wan/wan_base/modules/t5.py:374
↓ 8 callersMethod__init__
(self, z_dim=16, vae_pth='cache/vae_step_411000.pth', dtype
lact_ar_video/minVid/models/wan/wan_base/modules/vae.py:621
↓ 8 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
lact_ar_video/minVid/models/wan/wan_base/utils/fm_solvers_unipc.py:272
↓ 8 callersFunctionrope_apply_ar
freqs: list of 3 tensors, freq_f, freq_h, freq_w of shape [1024, 22], [1024, 21], [1024, 21] for head_dim=64. Does not support variable
lact_ar_video/minVid/models/wan/wan_base/modules/model.py:72
↓ 8 callersFunctionrope_apply_ar_inference
grid_sizes: list of 3 ints, F, H, W where F is the number of latent frames for each video in the batch. freqs: list of 3 tensors, fr
lact_ar_video/minVid/models/wan/wan_base/modules/model.py:208
↓ 8 callersFunctionrope_apply_ar_with_repeat
freqs: list of 3 tensors, freq_f, freq_h, freq_w of shape [1024, 22], [1024, 21], [1024, 21] for head_dim=64. Does not support variable
lact_ar_video/minVid/models/wan/wan_base/modules/model.py:164
↓ 7 callersMethod__init__
(self, dim, out_dim, patch_size, eps=1e-6)
lact_ar_video/minVid/models/wan/wan_base/modules/model.py:518
↓ 7 callersMethodextend
(self, prompt, system_prompt, seed=-1, *args, **kwargs)
lact_ar_video/minVid/models/wan/wan_base/utils/prompt_extend.py:128
↓ 7 callersFunctionqkv_fn
(x)
lact_ar_video/minVid/models/wan/wan_base/distributed/xdit_context_parallel.py:162
↓ 7 callersMethodset_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.py:226
↓ 6 callersMethod__init__
(self, dim, mid_dim)
lact_ar_video/minVid/models/wan/wan_base/modules/clip.py:96
↓ 6 callersFunctioncompute_simple_latent_statistics
x of shape [B, f, c, h, w]
lact_ar_video/minVid/models/video_latent_flow_matching.py:19
↓ 6 callersFunctionhalf
(x)
lact_ar_video/minVid/models/wan/wan_base/modules/attention.py:78
↓ 6 callersFunctionl2_norm
x: [b, l, d]
lact_ar_video/minVid/models/blocks/functions.py:28
↓ 6 callersFunctionrope_apply
(x, grid_sizes, freqs)
lact_ar_video/minVid/models/wan/wan_base/modules/hybrid_model.py:42
↓ 6 callersFunctionrope_params
(max_seq_len, dim, theta=10000)
lact_ar_video/minVid/models/wan/wan_base/modules/model.py:29
↓ 6 callersMethodstep
(self, model_output, timestep, sample, to_final=False)
lact_ar_video/minVid/models/wan/flow_match.py:46
↓ 6 callersFunctionzeropower_via_newtonschulz5
This is an updated version of the zeropower_via_newtonschulz5 function in here: https://github.com/KellerJordan/modded-nanogpt/blob/master/tr
lact_llm/lact_model/ttt_operation.py:31
↓ 5 callersMethoddecode
(self, zs)
lact_ar_video/minVid/models/wan/wan_base/modules/vae.py:658
↓ 5 callersFunctionfp16_clamp
(x)
lact_ar_video/minVid/models/wan/wan_base/modules/t5.py:20
↓ 5 callersMethodset_timesteps
(self, num_inference_steps=100, denoising_strength=1.0, training=False)
lact_ar_video/minVid/models/wan/flow_match.py:21
↓ 4 callersFunctionceil_by_factor
Returns the smallest integer greater than or equal to 'number' that is divisible by 'factor'.
lact_ar_video/minVid/models/wan/wan_base/utils/qwen_vl_utils.py:44
↓ 4 callersMethodclear_cache
(self)
lact_ar_video/minVid/models/wan/wan_base/modules/vae.py:582
↓ 4 callersFunctionfused_swiglu_ffn_fwd
Args: W0_W2: [B, 2 * Hidden, D] W1: [B, D, Hidden] X: [B, num_Tokens, D] Outs: Hidden: [B, num_token
lact_llm/lact_model/lact_triton_kernels/lact_swiglu_ffn.py:79
↓ 4 callersFunctionget_obj_from_str
(string, reload=False, invalidate_cache=True)
lact_ar_video/minVid/utils/config_utils.py:38
↓ 4 callersFunctionget_sampling_sigmas
(sampling_steps, shift)
lact_ar_video/minVid/models/wan/wan_base/utils/fm_solvers.py:22
↓ 4 callersFunctionretrieve_timesteps
( scheduler, num_inference_steps=None, device=None, timesteps=None, sigmas=None, **kwa
lact_ar_video/minVid/models/wan/wan_base/utils/fm_solvers.py:29
↓ 4 callersFunctionrope_apply_same_time
(x, grid_sizes, freqs, f_window_size=3)
lact_ar_video/minVid/models/blocks/functions.py:76
↓ 4 callersFunctionround_by_factor
Returns the closest integer to 'number' that is divisible by 'factor'.
lact_ar_video/minVid/models/wan/wan_base/utils/qwen_vl_utils.py:39
↓ 4 callersFunctionsilu_backprop
Args: dy: [b, d, l], gradient of the outer loss wrt the y x: [b, d, l], input of the silu activation outs: dx: [b, d,
lact_ar_video/minVid/models/blocks/functions.py:7
↓ 4 callersFunctionsmart_resize
Rescales the image so that the following conditions are met: 1. Both dimensions (height and width) are divisible by 'factor'. 2. The to
lact_ar_video/minVid/models/wan/wan_base/utils/qwen_vl_utils.py:54
↓ 4 callersFunctionzeropower_via_newtonschulz5
This is an updated version of the zeropower_via_newtonschulz5 function in here: https://github.com/KellerJordan/modded-nanogpt/blob/master/tr
lact_llm/lact_model/ttt_operation_fused_kernel.py:28
↓ 3 callersMethod__init__
(self, dim, inter_multi=4, bias=False)
lact_nvs/model.py:81
↓ 3 callersMethod__init__
(self, config: LaCTSWIGLUConfig, layer_idx: int)
lact_llm/lact_model/modeling_lact.py:38
↓ 3 callersFunction_out_dtype_flags
(t: torch.Tensor)
lact_llm/lact_model/lact_triton_kernels/triton_fused_matmul_kernels.py:492
↓ 3 callersFunction_video_vae
Autoencoder3d adapted from Stable Diffusion 1.x, 2.x and XL.
lact_ar_video/minVid/models/wan/wan_base/modules/vae.py:592
↓ 3 callersMethodbackward
Args: grad_out: [B, num_tokens, D] Outs: grad_W0_W2: [B, 2 * Hidden, D] grad_W1: [B, D, Hidden]
lact_llm/lact_model/lact_triton_kernels/lact_swiglu_ffn.py:48
↓ 3 callersFunctionbasic_clean
(text)
lact_ar_video/minVid/models/wan/wan_base/modules/tokenizers.py:12
↓ 3 callersFunctioncompute_rays
Transform target before computing loss Args: fxfycxcy (torch.tensor): [b, v, 4] c2w (torch.tensor): [b, v, 4, 4] Returns:
lact_nvs/model.py:136
↓ 3 callersMethodencode
Input: - videos_rgb: a tensor with shape [B, F+1, C, H, W] in RGB format, [0-1] Output: - video_rgb: a tensor
lact_ar_video/minVid/models/wan/wan_warpper.py:128
↓ 3 callersFunctionfloor_by_factor
Returns the largest integer less than or equal to 'number' that is divisible by 'factor'.
lact_ar_video/minVid/models/wan/wan_base/utils/qwen_vl_utils.py:49
↓ 3 callersFunctionhalf
(x)
lact_ar_video/minVid/models/wan/wan_base/distributed/xdit_context_parallel.py:158
↓ 3 callersFunctionhf_download_path
hf api is not reliable, retry when failed with max tries :param repo_path: The path of the repo to download :param odir: output path
lact_nvs/data_preprocess/dl3dv_eval_download.py:34
↓ 3 callersFunctionl2_norm_add_fused
x: [B, T, D] x_add: [B, T, D] tgt_scale: [B, T] eps: float tgt_dtype: if None, will use the same dtype as x
lact_llm/lact_model/lact_triton_kernels/l2norm_triton_kernels.py:419
↓ 3 callersFunctionmake_inputs
(B, M, N, K, dtype=torch.bfloat16)
lact_llm/lact_model/lact_triton_kernels/triton_fused_matmul_kernels.py:715
↓ 3 callersFunctionnormalize
(x)
lact_nvs/data.py:57
↓ 3 callersMethodpost_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/wan/wan_warpper.py:199
↓ 3 callersFunctionref_func
(W0, X0, W1, X1)
lact_llm/lact_model/lact_triton_kernels/triton_fused_matmul_kernels.py:723
↓ 3 callersFunctionrope_params
(max_seq_len, dim, theta=10000)
lact_ar_video/minVid/models/wan/wan_base/modules/hybrid_model.py:31
↓ 3 callersMethodsample
(self, imgs, deterministic=False)
lact_ar_video/minVid/models/wan/wan_base/modules/vae.py:575
↓ 3 callersMethodset_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.py:207
↓ 3 callersFunctionset_nested_key
Sets value in nested dictionary
lact_ar_video/minVid/utils/config_utils.py:48
↓ 3 callersFunctionsinusoidal_embedding_1d
(dim, position)
lact_ar_video/minVid/models/wan/wan_base/modules/model.py:15
↓ 3 callersFunctionslice_tensor
(x, dim, start, end)
lact_ar_video/minVid/models/wan/wan_base/distributed/sp_support.py:46
↓ 3 callersFunctionumt5_xxl
(**kwargs)
lact_ar_video/minVid/models/wan/wan_base/modules/t5.py:456
↓ 3 callersFunctionzeropower_via_newtonschulz5
This is an updated version of the zeropower_via_newtonschulz5 function in here: https://github.com/KellerJordan/modded-nanogpt/blob/master/tr
minimal_implementations/bidirectional_lact_layer.py:35
↓ 3 callersFunctionzeropower_via_newtonschulz5
This is an updated version of the zeropower_via_newtonschulz5 function in here: https://github.com/KellerJordan/modded-nanogpt/blob/master/tr
minimal_implementations/causal_lact_with_sliding_window_attn.py:45
↓ 3 callersFunctionzeropower_via_newtonschulz5
modified from https://github.com/MoonshotAI/Moonlight/blob/master/examples/toy_train.py#L49 Major change: G is [b, d, d] rather than [d, d]
lact_nvs/lact_ttt.py:33
↓ 2 callersMethod__init__
(self, config: Config)
lact_ar_video/minVid/models/wan/wan_warpper.py:82
↓ 2 callersMethod__init__
(self, vocab_size=250002, max_seq_len=514, type_size=1,
lact_ar_video/minVid/models/wan/wan_base/modules/xlm_roberta.py:81
↓ 2 callersMethod__init__
(self, model_name, is_vl=False, device=0, **kwargs)
lact_ar_video/minVid/models/wan/wan_base/utils/prompt_extend.py:114
↓ 2 callersMethod_threshold_sample
"Dynamic thresholding: At each sampling step we set s to a certain percentile absolute pixel value in xt0 (the prediction of x_0 at t
lact_ar_video/minVid/models/wan/wan_base/utils/fm_solvers.py:292
↓ 2 callersMethod_threshold_sample
"Dynamic thresholding: At each sampling step we set s to a certain percentile absolute pixel value in xt0 (the prediction of x_0 at t
lact_ar_video/minVid/models/wan/wan_base/utils/fm_solvers_unipc.py:230
↓ 2 callersMethodbackward
(ctx, dy_main, dy_momentum, dy_normalized)
lact_llm/lact_model/lact_triton_kernels/triton_prenorm_update_with_momentum.py:350
↓ 2 callersFunctionclear_old_checkpoints
Remove older checkpoint directories, keeping only the most recent ones within the specified iteration range. Args: keep_last
lact_ar_video/minVid/utils/job_checkpoint_fsdp.py:221
↓ 2 callersFunctioncount_conv3d
(model)
lact_ar_video/minVid/models/wan/wan_base/modules/vae.py:475
↓ 2 callersMethoddecode_to_pixel
latents: [batch_size, num_frames, num_channels, height, width] output: [batch_size, num_channels, num_frames, height, width]
lact_ar_video/minVid/models/wan/wan_warpper.py:108
↓ 2 callersMethodencode
(self, x, scale)
lact_ar_video/minVid/models/wan/wan_base/modules/vae.py:516
↓ 2 callersFunctionexport_to_video
Exports a video from a numpy array of frames. Args: video_frames (np.ndarray): Video frames in numpy format with shape [num_fram
lact_ar_video/minVid/utils/io_utils.py:5
↓ 2 callersFunctionfetch_image
(ele: dict[str, str | Image.Image], size_factor: int = IMAGE_FACTOR)
lact_ar_video/minVid/models/wan/wan_base/utils/qwen_vl_utils.py:85
↓ 2 callersMethodforward
(self, x)
lact_ar_video/minVid/models/wan/wan_base/modules/clip.py:106
↓ 2 callersMethodforward
(self, x)
lact_ar_video/minVid/models/wan/wan_base/modules/vae.py:510
↓ 2 callersFunctionfused_lact_swiglu_ffn_fast_weight_grads
Args: W0_W2: [B, 2 * Hidden, D] W1: [B, D, Hidden] K, V: [B, num_Tokens, D] lr0, lr1, lr2: [B, N]
lact_llm/lact_model/lact_triton_kernels/lact_fw_grad.py:159
↓ 2 callersFunctionfused_two_mm_same_out_interface
(W0, X0, W1, X1, A_transpose=True, B_transpose=True)
lact_llm/lact_model/lact_triton_kernels/triton_fused_matmul_kernels.py:620
↓ 2 callersFunctionfused_two_mm_same_out_wT_xT_triton
W0, W1: [B, K, M] (bf16/fp16/fp32) X0T, X1T: [B, N, K] Returns O: [B, M, N] with O = W0^T @ X0T.T + W1^T @ X1T.T
lact_llm/lact_model/lact_triton_kernels/triton_fused_matmul_kernels.py:496
↓ 2 callersFunctionfused_two_mm_same_out_wT_x_triton
W0, W1: [B, K, M] X0, X1: [B, K, N] Returns O: [B, M, N] with O = W0^T @ X0 + W1^T @ X1
lact_llm/lact_model/lact_triton_kernels/triton_fused_matmul_kernels.py:555
↓ 2 callersFunctionfused_two_mm_swiglu_triton
Wraps the Triton kernel. Shapes: W0, W2: [B, M, K] (bf16) X : [B, N, K] (bf16) returns O: [B, M, N] (bf16) where O = SiLU
lact_llm/lact_model/lact_triton_kernels/triton_swiglu_kernels.py:123
↓ 2 callersMethodgenerate
r""" Generates video frames from text prompt using diffusion process. Args: input_prompt (`str`): Text pr
lact_ar_video/minVid/models/wan/wan_base/text2video.py:117
↓ 2 callersMethodindex_for_timestep
(self, timestep, schedule_timesteps=None)
lact_ar_video/minVid/models/wan/wan_base/utils/fm_solvers.py:679
↓ 2 callersMethodindex_for_timestep
(self, timestep, schedule_timesteps=None)
lact_ar_video/minVid/models/wan/wan_base/utils/fm_solvers_unipc.py:628
↓ 2 callersMethodinference
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/wan_inference_pipeline.py:142
↓ 2 callersFunctioninv_softplus
(x)
lact_ar_video/minVid/models/blocks/functions.py:20
↓ 2 callersFunctionl2_norm
x: [b, l, d]
minimal_implementations/bidirectional_lact_layer.py:25
↓ 2 callersFunctionl2_norm
x: [b, l, d]
minimal_implementations/causal_lact_with_sliding_window_attn.py:35
↓ 2 callersFunctionl2_norm
x: [b, l, d]
lact_llm/lact_model/ttt_operation.py:21
↓ 2 callersFunctionlaunch_distributed_job
When launched with torchrun --nproc_per_node=<> --nnodes=<> --rdzv-endpoint=${master_addr}:${master_port} The following environment variable
lact_ar_video/minVid/utils/dist_utils.py:21
↓ 2 callersFunctionlogit_normal_integral
Compute the integral of the logit normal distribution over unit intervals for given time steps. This is a legacy version that works directly
lact_ar_video/minVid/utils/logit_normal_weighting.py:3
↓ 2 callersFunctionmake_inputs
( B, n, D, x_main_dtype=torch.float32, dx_dtype=torch.bfloat16,
lact_llm/lact_model/lact_triton_kernels/triton_prenorm_update_with_momentum.py:406
↓ 2 callersFunctionprecompute_freqs_time_for_repeat
freqs: list of 3 tensors, freq_f, freq_h, freq_w of shape [1024, 22], [1024, 21], [1024, 21] for head_dim=64.
lact_ar_video/minVid/models/wan/wan_base/modules/model.py:130
↓ 2 callersFunctionreference_l2_norm_add_fused_with_momentum
Args: x: [B, D1, D2], must be fp32 dx: [B, D1, D2], bf16 dx_momentum: [B, D1, 1], fp32 recommended momentum_mu: f
lact_llm/lact_model/lact_triton_kernels/triton_prenorm_update_with_momentum.py:10
↓ 2 callersFunctionrename_param
(name: str)
lact_ar_video/minVid/train.py:172
next →1–100 of 581, ranked by callers