Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NVlabs/LongLive
/ functions
Functions
963 in github.com/NVlabs/LongLive
⨍
Functions
963
◇
Types & classes
175
↳
Endpoints
2
↓ 4 callers
Function
create_custom_forward
(module)
wan_5b/distributed/sequence_parallel.py:355
↓ 4 callers
Function
dequantize_kv_cache
Dequantize list of QuantizedTensor to a contiguous bf16 tensor. kv_list[block_idx] -> QuantizedTensor(block_token_size * num_heads, 128)
utils/quant.py:731
↓ 4 callers
Method
get_gradient_config
Return the quantization configuration for the gradient tensors.
fouroversix/src/fouroversix/model/config.py:105
↓ 4 callers
Method
get_local_path
Get the path of the submodule relative to the root directory.
fouroversix/scripts/resources.py:75
↓ 4 callers
Function
get_rank
()
wan_5b/distributed/util.py:32
↓ 4 callers
Method
get_scheduler
Update the current scheduler with the interface's static method
utils/wan_5b_wrapper.py:538
↓ 4 callers
Method
get_tasks_to_evaluate
Get the tasks that should be evaluated. If a group name is set, tasks will only be evaluated if they have not yet been evaluated for
fouroversix/scripts/ptq/coordinators/base.py:20
↓ 4 callers
Method
inference
Perform inference on the given noise and text prompts. Inputs: noise (torch.Tensor): The input noise tensor of shape
pipeline/causal_diffusion_inference.py:167
↓ 4 callers
Method
is_empty
(self)
utils/error_buffer.py:198
↓ 4 callers
Function
is_nvfp4_state_dict
Return True when a state dict contains materialized FourOverSix NVFP4 buffers.
utils/nvfp4_checkpoint.py:23
↓ 4 callers
Function
qkv_fn
(x)
wan_5b/distributed/sequence_parallel.py:176
↓ 4 callers
Function
resolve_sequence_parallel_group
(group=None)
wan_5b/distributed/sp_training.py:108
↓ 4 callers
Function
round_by_factor
Returns the closest integer to 'number' that is divisible by 'factor'.
wan_5b/utils/qwen_vl_utils.py:39
↓ 4 callers
Method
save_results
Save the results of a PTQ experiment to the SQLite database.
fouroversix/scripts/ptq/coordinators/base.py:66
↓ 4 callers
Method
set_timesteps
Sets the discrete timesteps used for the diffusion chain (to be run before inference). Args: num_inference_steps (`int`):
wan_5b/utils/fm_solvers_unipc.py:162
↓ 4 callers
Function
smart_resize
Rescales the image so that the following conditions are met: 1. Both dimensions (height and width) are divisible by 'factor'. 2. The to
wan_5b/utils/qwen_vl_utils.py:54
↓ 4 callers
Method
step
Predict the sample from the previous timestep by reversing the SDE. This function propagates the sample with the multistep DPMSolver.
wan_5b/utils/fm_solvers.py:703
↓ 4 callers
Method
step
Predict the sample from the previous timestep by reversing the SDE. This function propagates the sample with the multistep UniPC.
wan_5b/utils/fm_solvers_unipc.py:657
↓ 4 callers
Function
to_blocked
(a: torch.Tensor)
fouroversix/src/fouroversix/quantize/utils.py:88
↓ 4 callers
Function
validate_sequence_parallel_training_config
(config, sp_size, num_frame_per_block)
wan_5b/distributed/sp_training.py:43
↓ 3 callers
Method
__hash__
Return a hash of the configuration.
fouroversix/src/fouroversix/model/config.py:190
↓ 3 callers
Method
__init__
(self, dim, out_dim, patch_size, eps=1e-6)
wan_5b/modules/causal_model.py:935
↓ 3 callers
Function
_all_to_all_list_impl
(x, scatter_dim, gather_dim, group=None, **kwargs)
wan_5b/distributed/sp_training.py:118
↓ 3 callers
Function
_i2v_loss_mask_like
( image_or_video: torch.Tensor, context_frames: int, )
utils/i2v_conditioning.py:63
↓ 3 callers
Method
_load_caption
Load caption for a video file.
utils/dataset.py:407
↓ 3 callers
Method
_materialize_quantized_model_before_fsdp
Materialize NVFP4 weights before FSDP wraps quantized modules.
trainer/distillation.py:797
↓ 3 callers
Function
_materialize_quantized_weights_for_inference
Materialize quantized weights and drop master weights. Optionally cache an additional transposed quantized layout for training paths that
utils/quant.py:477
↓ 3 callers
Function
_maybe_to_dict
(value)
inference_sp.py:83
↓ 3 callers
Function
_maybe_to_dict
(value)
inference.py:124
↓ 3 callers
Method
_modulate
(self, err)
utils/error_buffer.py:191
↓ 3 callers
Method
_slice_block_cond_dict
Slice a block-wise conditional dict to keep only the last `new_num_segments` segments.
model/dmd.py:68
↓ 3 callers
Function
_torch_load
(path: str)
utils/inference_utils.py:34
↓ 3 callers
Method
backward
(ctx, grad_output)
wan_5b/distributed/sp_training.py:146
↓ 3 callers
Function
basic_clean
(text)
wan_5b/modules/tokenizers.py:12
↓ 3 callers
Method
cached_decode
(self, z, scale)
utils/lightvae_5b_wrapper.py:266
↓ 3 callers
Method
dequantize
Return a high-precision tensor with the dequantized values (PyTorch impl).
fouroversix/src/fouroversix/quantize/quantized_tensor.py:184
↓ 3 callers
Function
drop_fouroversix_master_weights
Drop high-precision master weights after loading materialized NVFP4 buffers.
utils/nvfp4_checkpoint.py:134
↓ 3 callers
Method
enable_gradient_checkpointing
(self)
utils/wan_5b_wrapper.py:316
↓ 3 callers
Method
encode
(self, x, scale)
wan_5b/modules/vae2_1.py:511
↓ 3 callers
Function
fake_quantize_to_e2m1
( x: torch.Tensor, *, round_style: RoundStyle = RoundStyle.nearest, )
fouroversix/src/fouroversix/quantize/pytorch/reference.py:13
↓ 3 callers
Function
floor_by_factor
Returns the largest integer less than or equal to 'number' that is divisible by 'factor'.
wan_5b/utils/qwen_vl_utils.py:49
↓ 3 callers
Method
generator_loss
Generate image/videos from noise and compute the DMD loss. The noisy input to the generator is backward simulated. This remov
model/dmd.py:269
↓ 3 callers
Function
get_sp_group
()
wan_5b/distributed/sp_ulysses_inference.py:53
↓ 3 callers
Function
half
(x)
wan_5b/distributed/sequence_parallel.py:172
↓ 3 callers
Function
is_te_nvfp4_checkpoint
Return True for checkpoints saved with TransformerEngine module state.
utils/nvfp4_checkpoint.py:30
↓ 3 callers
Function
k_smooth
(k: torch.Tensor)
utils/quant.py:797
↓ 3 callers
Method
local_sp_rank
(self)
wan_5b/distributed/sp_training.py:277
↓ 3 callers
Function
quantize_to_nvfp4
( x_scale_blocks: torch.Tensor, x_amax: torch.Tensor, *, scale_rule: ScaleRule, scale_expa
fouroversix/src/fouroversix/quantize/pytorch/reference.py:121
↓ 3 callers
Method
run
Run the command.
fouroversix/setup.py:140
↓ 3 callers
Function
select_temporal_offset_for_sample
Select the offset slice that applies to one sample. ``temporal_offset`` accepts a scalar, ``[B]`` per-sample constants, ``[F]`` shared per-fr
utils/position_embedding_utils.py:15
↓ 3 callers
Method
set_timesteps
(self, num_inference_steps=100, denoising_strength=1.0, training=False)
utils/scheduler.py:118
↓ 3 callers
Function
sp_all_gather
(tensor: torch.Tensor, dim: int = 1)
wan_5b/distributed/sp_ulysses_inference.py:94
↓ 3 callers
Function
sp_print
(msg: str, rank_only: int = 0)
wan_5b/distributed/sp_ulysses_inference.py:172
↓ 3 callers
Method
sp_root_global_rank
(self)
wan_5b/distributed/sp_training.py:273
↓ 3 callers
Function
sp_training_sequence_frame_count
Frames that are sharded by training sequence parallelism.
wan_5b/distributed/sp_training.py:38
↓ 3 callers
Method
train
(self)
trainer/diffusion.py:1080
↓ 3 callers
Function
unpatchify
(x, patch_size)
wan_5b/modules/vae2_2.py:298
↓ 3 callers
Method
unpatchify
r""" Reconstruct video tensors from patch embeddings. Args: x (List[Tensor]): List of patchified features
wan_5b/modules/model.py:544
↓ 2 callers
Method
__init__
(self, model_name, task, is_vl=False, device=0, **kwargs)
wan_5b/utils/prompt_extend.py:66
↓ 2 callers
Method
__init__
(self)
utils/wan_5b_wrapper.py:59
↓ 2 callers
Method
_apply_cache_updates
Applies cache updates collected from multiple blocks. Args: kv_cache: List of cache dictionaries for each block
wan_5b/modules/causal_model.py:1371
↓ 2 callers
Method
_apply_gathered_items
Pure local: drop ``items`` into ``buffer``. No collective, no cross-rank coordination — each rank may invoke this independently (or sk
model/diffusion.py:555
↓ 2 callers
Method
_build_quantized_weight
(self, prefix: str)
fouroversix/src/fouroversix/model/modules/linear.py:290
↓ 2 callers
Function
_compute_ulysses_frame_info
(num_frames, local_seq_len, sp_world_size, sp_rank)
wan_5b/modules/causal_model_sp_ulysses.py:69
↓ 2 callers
Method
_configure_lora_for_model
Configure LoRA for a WanDiffusionWrapper model
trainer/distillation.py:1271
↓ 2 callers
Method
_configure_model
Configures a model object. This includes setting evaluation modes, applying distributed parallel strategy, and handling device placem
wan_5b/image2video.py:128
↓ 2 callers
Method
_configure_model
Configures a model object. This includes setting evaluation modes, applying distributed parallel strategy, and handling device placem
wan_5b/text2video.py:125
↓ 2 callers
Method
_copy_tensor_into_parameter
( self, destination: torch.Tensor, source: torch.Tensor, )
utils/quant.py:273
↓ 2 callers
Method
_dataset
(self, root, latent_frames)
tests/test_i2v_dataset_frame_accounting.py:9
↓ 2 callers
Method
_exchange_qkv
(self, q, k, v)
wan_5b/modules/causal_model_sp_ulysses.py:134
↓ 2 callers
Function
_extract_checkpoint_state_dict
(raw)
utils/lightvae_5b_wrapper.py:18
↓ 2 callers
Method
_gather_errors_for_buffer
All-gather errors/timesteps across the appropriate group and return a list of ready-to-add ``(err_block, t_idx, pos_or_None)`` items.
model/diffusion.py:478
↓ 2 callers
Method
_gather_lora_state_dict
On rank-0, gather FULL_STATE_DICT, then filter only LoRA weights
trainer/distillation.py:1322
↓ 2 callers
Method
_get_video_files_in_folder
Get sorted video files in a folder, keeping only those with a per-video caption (cached).
utils/dataset.py:422
↓ 2 callers
Method
_initialize_inference_pipeline
Lazy initialize the inference pipeline during the first backward simulation run. Here we encapsulate the inference code with a model-
model/base.py:487
↓ 2 callers
Method
_is_owned_t
(self, t_bucket)
utils/error_buffer.py:87
↓ 2 callers
Method
_is_shot_boundary
Return True when *chunk_index* starts a new shot (prompt-based detection). Pure prompt check — no dependency on sink config so that Narrative
pipeline/causal_diffusion_inference.py:977
↓ 2 callers
Method
_make_key
(self, t_bucket, block_pos)
utils/error_buffer.py:103
↓ 2 callers
Function
_maybe_to_dict
(value)
utils/nvfp4_checkpoint.py:73
↓ 2 callers
Function
_normalize_vae_state_dict
(raw_state)
utils/lightvae_5b_wrapper.py:106
↓ 2 callers
Method
_parse_fps
(value)
utils/dataset.py:495
↓ 2 callers
Method
_pin_current_chunk
Mark the current chunk's buffer position as pinned for multi-shot sink. The pinned region REPLACES the original sink on the next rolling even
pipeline/causal_diffusion_inference.py:1020
↓ 2 callers
Method
_prepare_blockwise_causal_attn_mask
Block-wise causal mask. The mask is defined only by the AR chunk size: a token can attend to all tokens before the end of its current
wan_5b/modules/causal_model.py:1149
↓ 2 callers
Method
_prepare_blockwise_causal_attn_mask_i2v
we will divide the token sequence into the following format [1 latent frame] [N latent frame] ... [N latent frame] The first
wan_5b/modules/causal_model.py:1104
↓ 2 callers
Method
_run_evaluation_inference
(self)
trainer/diffusion.py:911
↓ 2 callers
Method
_run_generator
Optionally simulate the generator's input from noise using backward simulation and then run the generator for one-step. Input
model/base.py:149
↓ 2 callers
Method
_sample_frames_from_video
Sample frames from a video preserving original duration. Args: video_path: Path to video file num_frames: Num
utils/dataset.py:629
↓ 2 callers
Method
_serialize_quantized_weight
( prefix: str, quantized_weight: QuantizedTensor, )
fouroversix/src/fouroversix/model/modules/linear.py:271
↓ 2 callers
Method
_set_sp_attn
Toggle SP self-attention between training and inference. This only applies to 5B runs with SP enabled.
trainer/diffusion.py:872
↓ 2 callers
Method
_swap_ema_weights
Bidirectionally swap model weights with EMA shadow weights. Calling this twice restores both the model and EMA to their original stat
trainer/diffusion.py:897
↓ 2 callers
Method
_t_bucket
(self, timestep_index)
utils/error_buffer.py:83
↓ 2 callers
Function
_tensor_nbytes
(tensor: torch.Tensor | None)
utils/quant.py:419
↓ 2 callers
Method
_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
wan_5b/utils/fm_solvers.py:289
↓ 2 callers
Method
_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
wan_5b/utils/fm_solvers_unipc.py:232
↓ 2 callers
Function
_torch_load
(path: str)
scripts/save_merged_nvfp4_generator.py:42
↓ 2 callers
Method
_try_get_item_from_folder
Try to get item from a specific folder. Returns (True, result) on success and (False, reason) on failure. The reason is used by __get
utils/dataset.py:750
↓ 2 callers
Function
_video_vae
(pretrained_path=None, z_dim=48, dim=160, device="cpu", **kwargs)
wan_5b/modules/vae2_2.py:862
↓ 2 callers
Method
_zero_kv_data
Reset KV cache for clean recache, preserving global sink.
pipeline/causal_diffusion_inference.py:1038
↓ 2 callers
Function
adaln_modulate_triton
Fused (LayerNorm + (1+e_scale)*x + e_shift) over [B, F*frame_seqlen, C]. Replaces the WanAttentionBlock norm1/norm2 + modulate pattern. Output dt
utils/adaln_triton.py:89
↓ 2 callers
Function
build_error_buffer
Build an ErrorBuffer from an OmegaConf/dict config node. When ``num_blocks > 0`` the buffer becomes 2D (position × timestep), enabling teache
utils/error_buffer.py:296
← previous
next →
101–200 of 963, ranked by callers