MCPcopy Create free account

hub / github.com/ModelTC/LightX2V / functions

Functions8,429 in github.com/ModelTC/LightX2V

↓ 2 callersMethodcalculate_skip_step_length
(self)
lightx2v/models/networks/flux2/infer/feature_caching/transformer_infer.py:147
↓ 2 callersFunctioncalculate_target_dimensions_from_image
Calculate target dimensions from image size while preserving aspect ratio. Args: image_size: Tuple of (width, height) of the input image
lightx2v/models/runners/longcat_image/longcat_image_runner.py:38
↓ 2 callersFunctioncalculate_target_video_length_from_duration
Calculate target_video_length from video duration using the formula: target_video_length = (fps * seconds + 3) // 4 * 4 + 1 This ensures the
lightx2v/utils/input_info.py:502
↓ 2 callersFunctioncall_sync
(base_url: str, payload: Dict[str, Any], timeout_seconds: int, poll_interval_seconds: float)
scripts/server/benchmark_sync_s3_latency.py:97
↓ 2 callersFunctioncausal_conv_gather_outputs
(x)
lightx2v/models/video_encoders/hf/seedvr/context_parallel_lib.py:47
↓ 2 callersFunctioncausal_conv_slice_inputs
(x, split_size, memory_state)
lightx2v/models/video_encoders/hf/seedvr/context_parallel_lib.py:21
↓ 2 callersFunctioncausal_rope_apply
(x, grid_sizes, freqs, start_frame=0)
lightx2v_train/lightx2v_train/model_zoo/native/wan/modules/causal_model.py:19
↓ 2 callersMethodcfg_guided_denoise
(self, latents, timestep_or_sigma, pos_cond, neg_cond)
lightx2v_train/lightx2v_train/infer/base.py:29
↓ 2 callersMethodcfg_norm_func
(self, v_pred, v_pred_condition)
lightx2v/models/networks/neopp/model.py:73
↓ 2 callersFunctioncheck
(name, out_f32, ref_f32, thresh=0.15)
lightx2v_kernel_xpu/test/test_sdp.py:39
↓ 2 callersFunctioncheck_full_body
(keypoints, threshold=0.4)
tools/preprocess/retarget_pose.py:461
↓ 2 callersMethodcheck_status
(self, bootstrap_room: int)
lightx2v/disagg/conn.py:528
↓ 2 callersFunctioncheck_valid_cuda_device_index
lightx2v_kernel/csrc/gemm/sm120_utils.h:30
↓ 2 callersMethodclean_mem
(self)
lightx2v/models/runners/vsr/utils/TCDecoder.py:277
↓ 2 callersFunctioncleanup_distributed
()
lightx2v_train/lightx2v_train/runtime/distributed.py:29
↓ 2 callersFunctioncleanup_memory
清理内存
app/utils/model_utils.py:129
↓ 2 callersMethodclear
(self)
lightx2v/models/schedulers/wan/fastwam/scheduler.py:44
↓ 2 callersMethodclear_kv_cache
Clear KV cache after generation.
lightx2v/models/networks/worldplay/ar_model.py:109
↓ 2 callersMethodcomfy_resize
(self, img, height, width, interpolation=cv2.INTER_LANCZOS4, crop=None)
lightx2v/models/runners/wan/wan_animate_runner.py:136
↓ 2 callersMethodcompute_adaln_modulation
(self, adaln_params, layer_idx)
lightx2v/models/networks/motus/model.py:112
↓ 2 callersMethodcompute_loss_on_sample
(self, sample, collect_trajectory=False)
lightx2v_train/lightx2v_train/trainers/dopsd.py:245
↓ 2 callersFunctioncompute_scaled_and_target_dims
(w0: int, h0: int, scale: float = 4.0, multiple: int = 128)
lightx2v/models/runners/vsr/vsr_wrapper.py:24
↓ 2 callersFunctioncompute_sky_mask
Compute sky segmentation mask [S,H,W] (True=non-sky, False=sky).
lightx2v/models/networks/worldmirror/utils/inference_utils.py:422
↓ 2 callersFunctioncompute_trapezoidal_mask_1d
Generate a 1D trapezoidal blending mask with linear ramps. Args: length: Output length of the mask. ramp_left: Fade-in length
lightx2v/models/video_encoders/hf/ltx2/video_vae/tiling.py:8
↓ 2 callersFunctioncond_current
(conditional_dict, current_start_frame, num_frame_per_chunk, replace=None, mode="universal")
lightx2v/models/networks/wan/infer/matrix_game2/pre_infer.py:8
↓ 2 callersMethodconfigure
(self, vision_config)
lightx2v/models/networks/hidream_o1_image/weights/vision_weights.py:15
↓ 2 callersFunctionconfigure_dynamo_for_magi_compile
Apply Dynamo settings required by magi_compiler (call when use_magi_compile=True).
lightx2v/common/magi_custom_op_mode.py:15
↓ 2 callersFunctionconv
(in_planes, out_planes, kernel_size=3, stride=1, padding=1, dilation=1)
lightx2v/models/vfi/rife/train_log/IFNet_HDv3.py:12
↓ 2 callersFunctionconv
(in_planes, out_planes, kernel_size=3, stride=1, padding=1, dilation=1)
lightx2v/models/vfi/rife/train_log/refine.py:8
↓ 2 callersMethodconvert_from_pred
(self, pred: torch.Tensor, pred_type: PredictionType, x_t: torch.Tensor, t: torch.Tensor)
lightx2v/models/schedulers/seedvr/utils.py:58
↓ 2 callersFunctionconvert_to_bf16_file
Convert checkpoint file to BF16 safetensors.
tools/convert/seko_talk_converter.py:119
↓ 2 callersFunctionconvert_to_uint8
(frames: torch.Tensor)
lightx2v/models/video_encoders/hf/ltx2/video_vae/video_vae.py:916
↓ 2 callersMethodcopy_lora_adapter_weights
(self, src_adapter, dst_adapter)
lightx2v_train/lightx2v_train/model_zoo/base.py:66
↓ 2 callersFunctioncount_conv3d
(model)
lightx2v/models/video_encoders/hf/wan/vae.py:494
↓ 2 callersFunctioncount_conv3d
(model)
lightx2v/models/video_encoders/hf/wan/vae_2_2.py:845
↓ 2 callersFunctioncount_conv3d
(model)
lightx2v_train/lightx2v_train/model_zoo/native/wan/modules/vae.py:398
↓ 2 callersFunctioncpu_sdp_ref
(Q_f32, K_f32, V_f32, scale)
lightx2v_kernel_xpu/test/test_sdp.py:26
↓ 2 callersMethodcreate_byt5
Create ByT5 tokenizer and encoder, load weights if provided. Args: args (dict): Configuration dictionary. de
lightx2v/models/input_encoders/hf/hunyuan15/byt5/model.py:204
↓ 2 callersFunctioncreate_pin_tensor
Create a tensor with pinned memory for faster data transfer to GPU. Args: tensor: Source tensor to be converted to pinned memory
lightx2v/common/ops/utils.py:76
↓ 2 callersFunctioncreate_simple_video
(frames=10, height=480, width=640)
lightx2v/utils/va_recorder_x264.py:243
↓ 2 callersFunctioncrop
Crop image according to the supplied bounding box. res: [rows, cols]
tools/preprocess/pose2d_utils.py:1026
↓ 2 callersFunctioncross_attn_forward
Mirror of WanCrossAttention.forward.
lightx2v/models/networks/wan/infer/s2v/wan_ops.py:169
↓ 2 callersFunctioncurrent_stage
(stages: Optional[list[StageSpec]] = None)
lightx2v/disagg/workload.py:195
↓ 2 callersFunctioncustom_interpolate
Custom interpolation function to handle large tensors by chunking. Avoids INT_MAX overflow issues in nn.functional.interpolate when dealing
lightx2v/models/networks/worldmirror/models/heads/dense_head.py:598
↓ 2 callersFunctionddp_config
(config)
lightx2v_train/lightx2v_train/runtime/ddp.py:54
↓ 2 callersFunctionddp_enabled
(config)
lightx2v_train/lightx2v_train/runtime/ddp.py:60
↓ 2 callersMethoddecode
( self, token_ids, skip_special_tokens: bool = False, clean_up_tokenization_sp
lightx2v/models/networks/bagel/tokenization_qwen2.py:254
↓ 2 callersMethoddecode
(self, z)
lightx2v/models/video_encoders/hf/hunyuanvideo15/hunyuanvideo_15_vae.py:815
↓ 2 callersMethoddecode
(self, latent: torch.Tensor, use_cache: bool = False)
lightx2v/models/video_encoders/hf/wan/vae_sf.py:59
↓ 2 callersMethoddecode
(self, z, scale)
lightx2v/models/video_encoders/hf/wan/vae.py:711
↓ 2 callersMethoddecode
(self, z: torch.Tensor, return_dict: bool = True, tiled: bool = False, tile_size: Tuple[int, int] = (512, 512)
lightx2v/models/video_encoders/hf/seedvr/attn_video_vae.py:1527
↓ 2 callersMethoddecode
( self, latent: torch.Tensor, tiling_config: TilingConfig | None = None, gener
lightx2v/models/video_encoders/hf/ltx2/model.py:105
↓ 2 callersMethoddecode_dist
(self, zs, world_size, cur_rank, split_dim)
lightx2v/models/video_encoders/hf/wan/vae.py:1236
↓ 2 callersMethoddecode_stream
(self, zs)
lightx2v/models/video_encoders/hf/wan/vae.py:1589
↓ 2 callersMethoddecode_video
Decode a sequence of frames from latents. x: NTCHW latent tensor; returns NTCHW RGB in ~[0, 1].
lightx2v/models/runners/vsr/utils/TCDecoder.py:259
↓ 2 callersFunctiondefault_libero_root
()
lightx2v_ros/src/simulator/simulator/libero_node/observer.py:8
↓ 2 callersFunctiondepth_edge
Compute the edge mask from depth map. The edge is defined as the pixels whose neighbors have large difference in depth. Args: depth
lightx2v/models/networks/worldmirror/utils/geometry.py:367
↓ 2 callersMethoddequantize
(self, tensor: np.ndarray, qtype: gguf.GGMLQuantizationType)
lightx2v/utils/ggml_tensor.py:341
↓ 2 callersFunctiondequantize_kv_cache_fp4
Dequantize multiple AR KV-cache blocks with one CUDA launch.
lightx2v_kernel/python/lightx2v_kernel/kv_cache.py:17
↓ 2 callersFunctiondequantize_to_dtype
Dequantize the fp4 tensor back to high precision.
lightx2v_kernel/test/nvfp4_nvfp4/test_bench1.py:56
↓ 2 callersMethoddisagg_decoder_teardown_session
(self)
lightx2v/disagg/disagg_mixin.py:621
↓ 2 callersMethoddisagg_transformer_teardown_session
(self)
lightx2v/disagg/disagg_mixin.py:558
↓ 2 callersMethoddownload_audio
(self, audio_url: str)
lightx2v/server/services/file_service.py:130
↓ 2 callersMethoddownload_image
(self, image_url: str)
lightx2v/server/services/file_service.py:127
↓ 2 callersMethoddownload_media
(self, url: str, media_type: str = "image")
lightx2v/server/services/file_service.py:85
↓ 2 callersFunctiondownload_model
统一的下载函数,根据下载源选择 Hugging Face 或 ModelScope Args: repo_id: 仓库 ID model_name: 模型名称(文件或目录名) model_path: 模型保存路径 downlo
app/utils/model_handlers.py:318
↓ 2 callersFunctiondownload_tokenizer_handler
下载 Tokenizer 处理函数 Args: model_path_val: 模型路径 tokenizer_type: tokenizer 类型 ("t5" 或 "clip") download_source_val: 下载源
app/utils/model_handlers.py:541
↓ 2 callersFunctiondownload_vae
(model_path_val, model_name, download_source_val, progress=gr.Progress())
app/utils/model_handlers.py:667
↓ 2 callersFunctiondraw_handpose_new
Draw keypoints and connections representing hand pose on a given canvas. Args: canvas (np.ndarray): A 3D numpy array representing th
tools/preprocess/human_visualization.py:97
↓ 2 callersFunctiondrop_add_residual_stochastic_depth_list
( x_list: List[Tensor], residual_func: Callable[[Tensor, Any], Tensor], sample_drop_ratio: float =
lightx2v/models/networks/worldmirror/models/layers/block.py:186
↓ 2 callersFunctione2m1_to_fp32
(int4_value)
lightx2v_kernel/test/nvfp4_nvfp4/test_bench1.py:32
↓ 2 callersMethodempty_pinned
( cls, shape: Tuple[int, ...], orig_shape: Tuple[int, ...] = None, dtype: torch.dtype = torch.float32,
lightx2v/utils/ggml_tensor.py:86
↓ 2 callersMethodenable_lightvae
( self, use_lightvae=False, use_tae=False, vae_path=None, tae_path=Non
lightx2v/pipeline.py:270
↓ 2 callersMethodenable_spatial_tiling
(self, use_tiling: bool = True)
lightx2v/models/video_encoders/hf/hunyuanvideo15/hunyuanvideo_15_vae.py:591
↓ 2 callersMethodencode
Args: batch_encoding (dict): Batch encoding from tokenizer. use_attention_mask (bool): Whether to use attention mask.
lightx2v/models/input_encoders/hf/hunyuan15/qwen25/model.py:467
↓ 2 callersMethodencode
(self, x, scale, return_mu=False)
lightx2v/models/video_encoders/hf/wan/vae.py:679
↓ 2 callersMethodencode
(self, x, scale)
lightx2v_train/lightx2v_train/model_zoo/native/wan/modules/vae.py:430
↓ 2 callersMethodencode_dist
(self, video, world_size, cur_rank, split_dim)
lightx2v/models/video_encoders/hf/wan/vae.py:1041
↓ 2 callersMethodencode_prompt_condition
(self, prompt)
lightx2v_train/lightx2v_train/model_zoo/wan_t2v.py:248
↓ 2 callersMethodencode_video
Encode a sequence of frames. Args: x: input NTCHW RGB (C=3) tensor with values in [0, 1]. parallel: if True, all fram
lightx2v/models/video_encoders/hf/tae.py:262
↓ 2 callersMethodend_run
(self)
lightx2v/models/runners/base_runner.py:220
↓ 2 callersMethodend_run
(self)
lightx2v/models/runners/hidream_o1_image/hidream_o1_image_runner.py:286
↓ 2 callersMethodend_run
(self)
lightx2v/models/runners/cosmos3/cosmos3_runner.py:768
↓ 2 callersMethodend_run_segment
(self, segment_idx, valid_duration=1e9)
lightx2v/models/runners/wan/wan_audio_runner.py:652
↓ 2 callersMethodend_run_segment
(self, segment_idx=None)
lightx2v/models/runners/wan/wan_sf_runner.py:123
↓ 2 callersMethodend_run_segment
(self, segment_idx=None)
lightx2v/models/runners/ltx2/ltx2_runner.py:902
↓ 2 callersMethodenqueue_request
( self, bootstrap_room: int, data_ptrs: List[int], )
lightx2v/disagg/conn.py:502
↓ 2 callersFunctionestimate_encoder_buffer_sizes
(config: Dict[str, Any])
lightx2v/disagg/utils.py:426
↓ 2 callersFunctionexpand_and_flatten_special_tokens
Processes specialized tokens with shape (1, 2, X, C) for multi-frame processing. Uses first position for frame 0, second position for remaini
lightx2v/models/networks/worldmirror/models/models/visual_transformer.py:498
↓ 2 callersFunctionexport_single_file
Export one safetensors file to its dummy-meta counterpart.
tools/convert/export_dummy_meta.py:59
↓ 2 callersFunctionextend_head
When memory is None: - Duplicate first frame features in the down-sampling process. When memory is not None: - Concatenate me
lightx2v/models/video_encoders/hf/seedvr/causal_inflation_lib.py:347
↓ 2 callersFunctionextract_bagel_vit_state_dict
(weight_dict)
lightx2v/models/networks/bagel/vision.py:175
↓ 2 callersFunctionextract_near_surface_volume_fn
(input_tensor: torch.Tensor, alpha: float)
lightx2v/models/video_encoders/hf/hunyuan3d/autoencoders/volume_decoders.py:30
↓ 2 callersFunctionextract_op_name
从格式化的操作符名称中提取原始名称
app/utils/model_utils.py:297
↓ 2 callersMethodextract_priors
Extract and normalize geometric priors from input views. Returns (depths, rays, poses) tuple — each may be None if unavailable.
lightx2v/models/networks/worldmirror/models/models/worldmirror.py:649
↓ 2 callersMethodfake_quant_tensor
(self, tensor)
lightx2v/utils/quant_utils.py:97
↓ 2 callersFunctionfetch_image
(ele: dict[str, str | Image.Image], size_factor: int = IMAGE_FACTOR)
lightx2v_train/lightx2v_train/model_zoo/native/wan/utils/qwen_vl_utils.py:79
↓ 2 callersFunctionfi_force_retune
(env_name: str = FI_FORCE_RETUNE_ENV)
lightx2v/common/flashinfer_autotune.py:18
↓ 2 callersFunctionfile_to_base64
(file_path: str)
scripts/server/post_sync_i2i_presigned.py:19
↓ 2 callersFunctionfind_closest_resolution
(width, height)
lightx2v/models/networks/hidream_o1_image/utils.py:234
← previousnext →1,601–1,700 of 8,429, ranked by callers