MCPcopy Create free account

hub / github.com/Tencent-Hunyuan/HunyuanVideo-I2V / functions

Functions333 in github.com/Tencent-Hunyuan/HunyuanVideo-I2V

↓ 12 callersFunctionget_activation_layer
get activation layer Args: act_type (str): the activation type Returns: torch.nn.functional: the activation layer
hyvideo/modules/activation_layers.py:4
↓ 11 callersMethoddecode
Decode a batch of images/videos. Args: z (`torch.FloatTensor`): Input batch of latent vectors. return_d
hyvideo/vae/autoencoder_kl_causal_3d.py:315
↓ 10 callersFunctionapply_gate
AI is creating summary for apply_gate Args: x (torch.Tensor): input tensor. gate (torch.Tensor, optional): gate tensor. Defaults
hyvideo/modules/modulate_layers.py:66
↓ 10 callersMethodencode
Args: batch_encoding (dict): Batch encoding from tokenizer. use_attention_mask (bool): Whether to use attention mask.
hyvideo/text_encoder/__init__.py:292
↓ 10 callersMethodfrom_pretrained
Initialize the Inference pipeline. Args: pretrained_model_path (str or pathlib.Path): The model path, including t2v,
hyvideo/inference.py:211
↓ 9 callersMethodcompute_sigma_t
Compute the noise coefficient along the path
hyvideo/diffusion/flow/path.py:29
↓ 9 callersFunctionmodulate
modulate by shift and scale Args: x (torch.Tensor): input tensor. shift (torch.Tensor, optional): shift tensor. Defaults to None.
hyvideo/modules/modulate_layers.py:37
↓ 8 callersFunctionexpand_t_like_x
Function to reshape time t to broadcastable dimension of x Args: t: [batch_dim,], time vector x: [batch_dim,...], data point
hyvideo/diffusion/flow/path.py:5
↓ 6 callersMethod__init__
( self, chan_in, chan_out, kernel_size: Union[int, Tuple[int, int, int]],
hyvideo/vae/unet_causal_3d_blocks.py:54
↓ 6 callersFunction_to_tuple
(x, dim=2)
hyvideo/modules/posemb_layers.py:5
↓ 5 callersMethodadd
(self, **kwargs)
train_image2video_lora.py:214
↓ 5 callersFunctionall_gather_sum
(running_value, device)
hyvideo/utils/helpers.py:16
↓ 5 callersMethodcompute_drift
We always output sde according to score parametrization;
hyvideo/diffusion/flow/path.py:40
↓ 4 callersFunction_ntuple
(n)
hyvideo/utils/helpers.py:87
↓ 4 callersMethodadd
(self, **kwargs)
train_image2video_lora.py:196
↓ 4 callersFunctionas_tuple
(x)
hyvideo/utils/helpers.py:105
↓ 4 callersMethodcheck_interval
( self, train_eps, sample_eps, *, diffusion_form="SBDM", sde=F
hyvideo/diffusion/flow/transport.py:99
↓ 4 callersMethodcompute_alpha_t
Compute the data coefficient along the path
hyvideo/diffusion/flow/path.py:22
↓ 4 callersMethodload_state_dict
(args, model, pretrained_model_path)
hyvideo/inference.py:447
↓ 4 callersFunctionload_vae
the fucntion to load the 3D VAE model Args: vae_type (str): the type of the 3D VAE model. Defaults to "884-16c-hy". vae_precision
hyvideo/vae/__init__.py:8
↓ 4 callersFunctionset_manual_seed
(global_seed)
hyvideo/utils/helpers.py:76
↓ 4 callersMethodstep
Predict the sample from the previous timestep by reversing the SDE. This function propagates the diffusion process from the learned m
hyvideo/diffusion/schedulers/scheduling_flow_match_discrete.py:188
↓ 4 callersMethodtext2tokens
Tokenize the input text. Args: text (str or list): Input text.
hyvideo/text_encoder/__init__.py:238
↓ 3 callersFunctionattention
Perform QKV self attention. Args: q (torch.Tensor): Query tensor with shape [b, s, a, d], where a is the number of heads. k
hyvideo/modules/attenion.py:60
↓ 3 callersMethodenable_deterministic
(self)
hyvideo/modules/models.py:128
↓ 3 callersMethodenable_spatial_tiling
(self, use_tiling: bool = True)
hyvideo/vae/autoencoder_kl_causal_3d.py:144
↓ 3 callersFunctionget_norm_layer
Get the normalization layer. Args: norm_layer (str): The type of normalization layer. Returns: norm_layer (nn.Module):
hyvideo/modules/norm_layers.py:62
↓ 3 callersFunctionload_model
load hunyuan video model Args: args (dict): model args in_channels (int): input channels number out_channels (int): outpu
hyvideo/modules/__init__.py:4
↓ 3 callersFunctionmean_flat
Take the mean over all non-batch dimensions.
hyvideo/diffusion/flow/utils.py:13
↓ 3 callersMethodmode
(self)
hyvideo/vae/vae.py:354
↓ 3 callersMethodsample
Sampling x0 & t based on shape of x1 (if needed) Args: x1 - data point; [batch, *dim]
hyvideo/diffusion/flow/transport.py:127
↓ 3 callersMethodset_timesteps
Sets the discrete timesteps used for the diffusion chain (to be run before inference). Args: num_inference_steps (`int`)
hyvideo/diffusion/schedulers/scheduling_flow_match_discrete.py:125
↓ 3 callersFunctionuse_default
(value, default)
hyvideo/text_encoder/__init__.py:21
↓ 2 callersMethod__init__
( self, patch_size=16, in_chans=3, embed_dim=768, norm_layer=None,
hyvideo/modules/embed_layers.py:23
↓ 2 callersMethod__init__
( self, hidden_size: int, heads_num: int, mlp_width_ratio: float, mlp_
hyvideo/modules/models.py:30
↓ 2 callersMethod__init__
( self, in_channels, hidden_size, heads_num, depth, mlp_width_
hyvideo/modules/token_refiner.py:168
↓ 2 callersMethod__init__
( self, in_channels, hidden_channels=None, out_features=None, act_laye
hyvideo/modules/mlp_layers.py:16
↓ 2 callersMethod_decode
(self, z: torch.FloatTensor, return_dict: bool = True)
hyvideo/vae/autoencoder_kl_causal_3d.py:297
↓ 2 callersFunctionalign_to
align hight, width according to alignment Args: value (int): height or width alignment (int): target alignment factor Return
hyvideo/utils/data_utils.py:10
↓ 2 callersFunctionapply_rotary_emb
Apply rotary embeddings to input tensors using the given frequency tensor. This function applies rotary embeddings to the given query 'xq' a
hyvideo/modules/posemb_layers.py:140
↓ 2 callersMethodapply_text_to_template
Apply text to template. Args: text (str): Input text. template (str or list): Template string or list of cha
hyvideo/text_encoder/__init__.py:222
↓ 2 callersMethodblend_h
(self, a: torch.Tensor, b: torch.Tensor, blend_extent: int)
hyvideo/vae/autoencoder_kl_causal_3d.py:349
↓ 2 callersMethodblend_t
(self, a: torch.Tensor, b: torch.Tensor, blend_extent: int)
hyvideo/vae/autoencoder_kl_causal_3d.py:355
↓ 2 callersMethodblend_v
(self, a: torch.Tensor, b: torch.Tensor, blend_extent: int)
hyvideo/vae/autoencoder_kl_causal_3d.py:343
↓ 2 callersFunctionckpt_wrapper
(module)
hyvideo/modules/modulate_layers.py:99
↓ 2 callersMethoddisable_deterministic
(self)
hyvideo/modules/models.py:131
↓ 2 callersMethodenable_temporal_tiling
(self, use_tiling: bool = True)
hyvideo/vae/autoencoder_kl_causal_3d.py:138
↓ 2 callersMethodenable_tiling
r""" Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to compute decoding and
hyvideo/vae/autoencoder_kl_causal_3d.py:150
↓ 2 callersMethodencode_prompt
r""" Encodes the prompt into text encoder hidden states. Args: prompt (`str` or `List[str]`, *optional*):
hyvideo/diffusion/pipelines/pipeline_hunyuan_video.py:239
↓ 2 callersMethodgenerate_crop_size_list
(base_size=256, patch_size=16, max_ratio=4.0)
hyvideo/hyvae_extract/dataset.py:222
↓ 2 callersFunctionget_1d_rotary_pos_embed_riflex
RIFLEx: Precompute the frequency tensor for complex exponentials (cis) with given dimensions. This function calculates a frequency tensor wi
hyvideo/inference.py:51
↓ 2 callersMethodget_batch
(self, idx)
hyvideo/dataset/video_loader.py:116
↓ 2 callersFunctionget_closest_ratio
get the closest ratio in the buckets Args: height (float): video height width (float): video width ratios (list): video a
hyvideo/utils/data_utils.py:37
↓ 2 callersFunctionget_nd_rotary_pos_embed
This is a n-d version of precompute_freqs_cis, which is a RoPE for tokens with n-d structure. Args: rope_dim_list (list of int): Dim
hyvideo/modules/posemb_layers.py:191
↓ 2 callersMethodget_target_size
(self, frames, target_size)
hyvideo/hyvae_extract/dataset.py:236
↓ 2 callersMethodget_text_tokens
(text_encoder, description)
hyvideo/dataset/video_loader.py:110
↓ 2 callersFunctionget_trainable_params
(model, args)
train_image2video_lora.py:162
↓ 2 callersFunctionlogger_filter
(name)
hyvideo/utils/file_utils.py:28
↓ 2 callersFunctionnumpy_to_pil
(images: np.ndarray)
hyvideo/utils/train_utils.py:70
↓ 2 callersFunctionparallel_attention
( hybrid_seq_parallel_attn, q, k, v, img_q_len, img_kv_len, cu_seqlens_q, cu_s
hyvideo/modules/attenion.py:159
↓ 2 callersFunctionparse_args
(mode="eval", namespace=None)
hyvideo/config.py:7
↓ 2 callersMethodprepare_extra_func_kwargs
(self, func, kwargs)
hyvideo/diffusion/pipelines/pipeline_hunyuan_video.py:477
↓ 2 callersFunctionreshape_for_broadcast
Reshape frequency tensor for broadcasting it with another tensor. This function reshapes the frequency tensor to have the same shape as the
hyvideo/modules/posemb_layers.py:65
↓ 2 callersFunctionrotate_half
(x)
hyvideo/modules/posemb_layers.py:133
↓ 2 callersFunctionsafe_dir
Create a directory (or the parent directory of a file) if it does not exist. Args: path (str or Path): Path to the directory. R
hyvideo/utils/file_utils.py:140
↓ 2 callersFunctionsafe_file
Create the parent directory of a file if it does not exist. Args: path (str or Path): Path to the file. Returns: path (
hyvideo/utils/file_utils.py:155
↓ 2 callersMethodsample
forward loop of sde
hyvideo/diffusion/flow/integrators.py:64
↓ 2 callersFunctionsave_checkpoint
( args, rank: int, logger, model_engine: DeepSpeedEngine, ema, scalar_state: ScalarSta
train_image2video_lora.py:230
↓ 2 callersMethodset_attn_processor
r""" Sets the attention processor to use to compute attention. Parameters: processor (`dict` of `AttentionProcessor`
hyvideo/vae/autoencoder_kl_causal_3d.py:207
↓ 2 callersFunctionset_manual_seed
(global_seed)
hyvideo/utils/train_utils.py:368
↓ 2 callersMethodspatial_tiled_decode
r""" Decode a batch of images/videos using a tiled decoder. Args: z (`torch.FloatTensor`): Input batch of latent vect
hyvideo/vae/autoencoder_kl_causal_3d.py:417
↓ 2 callersMethodspatial_tiled_encode
r"""Encode a batch of images/videos using a tiled encoder. When this option is enabled, the VAE will split the input tensor into tiles to c
hyvideo/vae/autoencoder_kl_causal_3d.py:361
↓ 1 callersMethod__forward_fn
TODO: generalize here by adding all private functions ending with steps to it
hyvideo/diffusion/flow/integrators.py:50
↓ 1 callersMethod__get_last_step
Get the last step function of the SDE solver
hyvideo/diffusion/flow/transport.py:325
↓ 1 callersMethod__get_sde_diffusion_and_drift
( self, *, diffusion_form="SBDM", diffusion_norm=1.0, )
hyvideo/diffusion/flow/transport.py:307
↓ 1 callersMethod__getitem__
(self, idx)
hyvideo/dataset/video_loader.py:166
↓ 1 callersMethod__init__
( self, args, vae, vae_kwargs, text_encoder, model, te
hyvideo/inference.py:177
↓ 1 callersMethod__init__
( self, in_channels: int = 3, out_channels: int = 3, down_block_types: Tup
hyvideo/vae/vae.py:37
↓ 1 callersMethod__init__
(self, sigma=0.0, reverse=False)
hyvideo/diffusion/flow/path.py:18
↓ 1 callersMethod__init__
( self, meta_files: List[str], latent_cache_dir: str, sample_size: Tuple[int,
hyvideo/hyvae_extract/dataset.py:87
↓ 1 callersFunction_get_cuda_home
()
utils/collect_env.py:48
↓ 1 callersFunction_get_musa_home
()
utils/collect_env.py:60
↓ 1 callersMethod_init_step_index
(self, timestep)
hyvideo/diffusion/schedulers/scheduling_flow_match_discrete.py:172
↓ 1 callersMethod_norm
Apply the RMSNorm normalization to the input tensor. Args: x (torch.Tensor): The input tensor. Returns:
hyvideo/modules/norm_layers.py:32
↓ 1 callersFunctionadd_data_args
(parser: argparse.ArgumentParser)
hyvideo/config.py:56
↓ 1 callersFunctionadd_deepspeed_args
(parser: argparse.ArgumentParser)
hyvideo/config.py:47
↓ 1 callersFunctionadd_denoise_schedule_args
(parser: argparse.ArgumentParser)
hyvideo/config.py:304
↓ 1 callersFunctionadd_extra_models_args
(parser: argparse.ArgumentParser)
hyvideo/config.py:183
↓ 1 callersFunctionadd_i2v_args
(parser: argparse.ArgumentParser)
hyvideo/config.py:502
↓ 1 callersFunctionadd_inference_args
(parser: argparse.ArgumentParser)
hyvideo/config.py:348
↓ 1 callersFunctionadd_lora_args
(parser: argparse.ArgumentParser)
hyvideo/config.py:541
↓ 1 callersFunctionadd_network_args
(parser: argparse.ArgumentParser)
hyvideo/config.py:144
↓ 1 callersFunctionadd_optimizer_args
(parser: argparse.ArgumentParser)
hyvideo/config.py:118
↓ 1 callersFunctionadd_parallel_args
(parser: argparse.ArgumentParser)
hyvideo/config.py:562
↓ 1 callersFunctionadd_train_denoise_schedule_args
(parser: argparse.ArgumentParser)
hyvideo/config.py:29
↓ 1 callersFunctionadd_training_args
(parser: argparse.ArgumentParser)
hyvideo/config.py:75
↓ 1 callersFunctionblack_image
generate a black image Args: width (int): image width height (int): image height Returns: _type_: a black image
hyvideo/utils/data_utils.py:23
↓ 1 callersFunctionblack_image
(width, height)
hyvideo/utils/train_utils.py:65
↓ 1 callersMethodcheck_inputs
( self, prompt, height, width, video_length, callback_steps,
hyvideo/diffusion/pipelines/pipeline_hunyuan_video.py:490
↓ 1 callersFunctioncollect_env
Collect the information of the running environments. Returns: dict: The environment information. The following fields are contained.
utils/collect_env.py:64
next →1–100 of 333, ranked by callers