MCPcopy Create free account

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

Functions197 in github.com/Tencent-Hunyuan/HunyuanVideo

↓ 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
↓ 9 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
↓ 8 callersMethodfrom_pretrained
Initialize the Inference pipeline. Args: pretrained_model_path (str or pathlib.Path): The model path, including t2v, tex
hyvideo/inference.py:144
↓ 7 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:52
↓ 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
↓ 6 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:31
↓ 5 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
↓ 4 callersFunction_ntuple
(n)
hyvideo/utils/helpers.py:6
↓ 4 callersMethodencode
Args: batch_encoding (dict): Batch encoding from tokenizer. use_attention_mask (bool): Whether to use attention mask.
hyvideo/text_encoder/__init__.py:271
↓ 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 callersFunctionparse_args
(namespace=None)
hyvideo/config.py:7
↓ 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 callersMethodtext2tokens
Tokenize the input text. Args: text (str or list): Input text.
hyvideo/text_encoder/__init__.py:217
↓ 3 callersFunctionuse_default
(value, default)
hyvideo/text_encoder/__init__.py:14
↓ 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:28
↓ 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:5
↓ 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:201
↓ 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 callersMethoddisable_deterministic
(self)
hyvideo/modules/models.py:129
↓ 2 callersMethodenable_deterministic
(self)
hyvideo/modules/models.py:126
↓ 2 callersMethodenable_spatial_tiling
(self, use_tiling: bool = True)
hyvideo/vae/autoencoder_kl_causal_3d.py:144
↓ 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:238
↓ 2 callersFunctionget_rewrite_prompt
(ori_prompt, mode="Normal")
hyvideo/prompt_rewrite.py:38
↓ 2 callersMethodload_state_dict
(args, model, pretrained_model_path)
hyvideo/inference.py:280
↓ 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:178
↓ 2 callersMethodpredict
Predict the image/video from the given text. Args: prompt (str or List[str]): The input text. kwargs:
hyvideo/inference.py:498
↓ 2 callersMethodprepare_extra_func_kwargs
(self, func, kwargs)
hyvideo/diffusion/pipelines/pipeline_hunyuan_video.py:469
↓ 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 callersFunctionsave_videos_grid
save videos by video tensor copy from https://github.com/guoyww/AnimateDiff/blob/e92bd5671ba62c0d774a32951453e328018b7c5b/animatediff/utils/uti
hyvideo/utils/file_utils.py:47
↓ 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 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__init__
( self, args, vae, vae_kwargs, text_encoder, model, te
hyvideo/inference.py:108
↓ 1 callersMethod__init__
( self, in_channels: int = 3, out_channels: int = 3, down_block_types: Tup
hyvideo/vae/vae.py:37
↓ 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_denoise_schedule_args
(parser: argparse.ArgumentParser)
hyvideo/config.py:175
↓ 1 callersFunctionadd_extra_models_args
(parser: argparse.ArgumentParser)
hyvideo/config.py:54
↓ 1 callersFunctionadd_inference_args
(parser: argparse.ArgumentParser)
hyvideo/config.py:219
↓ 1 callersFunctionadd_network_args
(parser: argparse.ArgumentParser)
hyvideo/config.py:22
↓ 1 callersFunctionadd_parallel_args
(parser: argparse.ArgumentParser)
hyvideo/config.py:364
↓ 1 callersFunctionas_tuple
(x)
hyvideo/utils/helpers.py:23
↓ 1 callersMethodcheck_inputs
( self, prompt, height, width, video_length, callback_steps,
hyvideo/diffusion/pipelines/pipeline_hunyuan_video.py:482
↓ 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
↓ 1 callersFunctionconvert_fp8_linear
(module, dit_weight_path, original_dtype, params_to_keep={})
hyvideo/modules/fp8_optimization.py:82
↓ 1 callersFunctioncreate_demo
(model_path, save_path)
gradio_server.py:67
↓ 1 callersMethoddisable_spatial_tiling
(self)
hyvideo/vae/autoencoder_kl_causal_3d.py:147
↓ 1 callersMethoddisable_temporal_tiling
(self)
hyvideo/vae/autoencoder_kl_causal_3d.py:141
↓ 1 callersMethodencode
Encode a batch of images/videos into latents. Args: x (`torch.FloatTensor`): Input batch of images/videos.
hyvideo/vae/autoencoder_kl_causal_3d.py:260
↓ 1 callersFunctionfp8_activation_dequant
(qdq_out, scale, dtype)
hyvideo/modules/fp8_optimization.py:50
↓ 1 callersFunctionfp8_linear_forward
(cls, original_dtype, input)
hyvideo/modules/fp8_optimization.py:55
↓ 1 callersFunctionfp8_tensor_quant
(x, scale, bits=8, mantissa_bit=3, sign_bits=1)
hyvideo/modules/fp8_optimization.py:43
↓ 1 callersFunctiongenerate_video
( model, prompt, resolution, video_length, seed, num_inference_steps, guidance_sca
gradio_server.py:23
↓ 1 callersFunctionget_1d_rotary_pos_embed
Precompute the frequency tensor for complex exponential (cis) with given dimensions. (Note: `cis` means `cos + i * sin`, where i is the imagi
hyvideo/modules/posemb_layers.py:261
↓ 1 callersFunctionget_build_config
Obtain the build information of PyTorch or Parrots.
utils/collect_env.py:27
↓ 1 callersFunctionget_cu_seqlens
Calculate cu_seqlens_q, cu_seqlens_kv using text_mask and img_len Args: text_mask (torch.Tensor): the mask of text img_len (int):
hyvideo/modules/attenion.py:34
↓ 1 callersFunctionget_down_block3d
( down_block_type: str, num_layers: int, in_channels: int, out_channels: int, temb_ch
hyvideo/vae/unet_causal_3d_blocks.py:418
↓ 1 callersFunctionget_fp_maxval
(bits=8, mantissa_bit=3, sign_bits=1)
hyvideo/modules/fp8_optimization.py:7
↓ 1 callersFunctionget_meshgrid_nd
Get n-D meshgrid with start, stop and num. Args: start (int or tuple): If len(args) == 0, start is num; If len(args) == 1, start is
hyvideo/modules/posemb_layers.py:14
↓ 1 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
↓ 1 callersMethodget_rotary_pos_embed
(self, video_length, height, width)
hyvideo/inference.py:450
↓ 1 callersFunctionget_up_block3d
( up_block_type: str, num_layers: int, in_channels: int, out_channels: int, prev_outp
hyvideo/vae/unet_causal_3d_blocks.py:471
↓ 1 callersMethodindex_for_timestep
(self, timestep, schedule_timesteps=None)
hyvideo/diffusion/schedulers/scheduling_flow_match_discrete.py:158
↓ 1 callersFunctioninit_dist
(backend="nccl")
tests/test_attention.py:16
↓ 1 callersFunctioninitialize_model
(model_path)
gradio_server.py:14
↓ 1 callersFunctionis_cuda_available
Returns True if cuda devices exist.
utils/collect_env.py:44
↓ 1 callersFunctionis_musa_available
()
utils/collect_env.py:41
↓ 1 callersFunctionis_rocm_pytorch
Check whether the PyTorch is compiled on ROCm.
utils/collect_env.py:13
↓ 1 callersMethodload_diffusion_pipeline
Load the denoising scheduler for inference.
hyvideo/inference.py:411
↓ 1 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
↓ 1 callersFunctionload_text_encoder
( text_encoder_type, text_encoder_precision=None, text_encoder_path=None, logger=None, dev
hyvideo/text_encoder/__init__.py:18
↓ 1 callersFunctionload_tokenizer
( tokenizer_type, tokenizer_path=None, padding_side="right", logger=None )
hyvideo/text_encoder/__init__.py:58
↓ 1 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
↓ 1 callersFunctionmain
()
sample_video.py:12
↓ 1 callersMethodmode
(self)
hyvideo/vae/vae.py:354
↓ 1 callersFunctionparallelize_transformer
(pipe)
hyvideo/inference.py:40
↓ 1 callersFunctionprepare_causal_attention_mask
(n_frame: int, n_hw: int, dtype, device, batch_size: int = None)
hyvideo/vae/unet_causal_3d_blocks.py:37
↓ 1 callersMethodprepare_latents
( self, batch_size, num_channels_latents, height, width, video
hyvideo/diffusion/pipelines/pipeline_hunyuan_video.py:558
↓ 1 callersFunctionpreprocess_text_encoder_tokenizer
(args)
hyvideo/utils/preprocess_text_encoder_tokenizer_utils.py:9
↓ 1 callersFunctionquantize_to_fp8
Default is E4M3.
hyvideo/modules/fp8_optimization.py:20
↓ 1 callersFunctionrescale_noise_cfg
Rescale `noise_cfg` according to `guidance_rescale`. Based on findings of [Common Diffusion Noise Schedules and Sample Steps are Flawed](http
hyvideo/diffusion/pipelines/pipeline_hunyuan_video.py:56
↓ 1 callersFunctionretrieve_timesteps
Calls the scheduler's `set_timesteps` method and retrieves timesteps from the scheduler after the call. Handles custom timesteps. Any kwargs
hyvideo/diffusion/pipelines/pipeline_hunyuan_video.py:74
↓ 1 callersMethodsample
(self, generator: Optional[torch.Generator] = None)
hyvideo/vae/vae.py:313
↓ 1 callersFunctionsanity_check_args
(args)
hyvideo/config.py:384
↓ 1 callersMethodscale_model_input
( self, sample: torch.Tensor, timestep: Optional[int] = None )
hyvideo/diffusion/schedulers/scheduling_flow_match_discrete.py:180
↓ 1 callersMethodsd3_time_shift
(self, t: torch.Tensor)
hyvideo/diffusion/schedulers/scheduling_flow_match_discrete.py:185
↓ 1 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
next →1–100 of 197, ranked by callers