Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/fudan-generative-vision/hallo2
/ functions
Functions
805 in github.com/fudan-generative-vision/hallo2
⨍
Functions
805
◇
Types & classes
163
Method
forward
Forward pass for the CrossAttnUpBlock2D class. Args: self (CrossAttnUpBlock2D): An instance of the CrossAttnUpBlock2D cl
hallo/models/unet_2d_blocks.py:1079
Method
forward
Forward pass for the UpBlock2D class. Args: self (UpBlock2D): An instance of the UpBlock2D class. hidden_sta
hallo/models/unet_2d_blocks.py:1268
Method
forward
Forward pass for the UNetMidBlock3DCrossAttn class. Args: self (UNetMidBlock3DCrossAttn): An instance of the UNetMidBloc
hallo/models/unet_3d_blocks.py:407
Method
forward
Defines the forward pass for the CrossAttnDownBlock3D class. Parameters: - hidden_states : torch.Tensor
hallo/models/unet_3d_blocks.py:638
Method
forward
forward method for the DownBlock3D class. Args: hidden_states (Tensor): The input tensor to the DownBlock3D laye
hallo/models/unet_3d_blocks.py:884
Method
forward
Forward pass for the CrossAttnUpBlock3D class. Args: self (CrossAttnUpBlock3D): An instance of the CrossAttnUpBlock3D cl
hallo/models/unet_3d_blocks.py:1092
Method
forward
Forward pass for the UpBlock3D class. Args: self (UpBlock3D): An instance of the UpBlock3D class. hidden_sta
hallo/models/unet_3d_blocks.py:1347
Method
forward
Forward pass of the FaceLocator model. Args: conditioning (Tensor): The input conditioning tensor. Returns:
hallo/models/face_locator.py:94
Method
forward
Forward pass of the InflatedConv3d layer. Args: x (torch.Tensor): Input tensor to the layer. Returns:
hallo/models/resnet.py:50
Method
forward
Performs a forward pass through the CustomClassName. :param x: Input tensor of shape (batch_size, channels, video_length, he
hallo/models/resnet.py:88
Method
forward
Forward pass of the Upsample3D class. Args: hidden_states (torch.Tensor): Input tensor to be upsampled. outp
hallo/models/resnet.py:135
Method
forward
Forward pass for the Downsample3D class. Args: hidden_states (torch.Tensor): Input tensor to be downsampled. Re
hallo/models/resnet.py:232
Method
forward
Forward pass for the ResnetBlock3D class. Args: input_tensor (torch.Tensor): Input tensor to the ResnetBlock3D layer.
hallo/models/resnet.py:372
Method
forward
Forward pass of the TemporalTransformer3DModel. Args: hidden_states (torch.Tensor): The hidden states of the model.
hallo/models/motion_module.py:174
Method
forward
Forward pass for the TemporalTransformer3DModel. Args: hidden_states (torch.Tensor): The input hidden states with shape
hallo/models/motion_module.py:270
Method
forward
Forward pass for the TemporalTransformerBlock. Args: hidden_states (torch.Tensor): The input hidden states with shape
hallo/models/motion_module.py:387
Method
forward
Forward pass of the PositionalEncoding module. This method takes an input tensor `x` and adds the positional encoding to it. The pos
hallo/models/motion_module.py:447
Method
forward
Args: hidden_states (`torch.Tensor`): The hidden states to be passed through the model. encoder_hidde
hallo/models/motion_module.py:553
Method
fuseforward
(self, x)
facelib/detection/yolov5face/models/common.py:53
Function
g_path_regularize
(fake_img, latents, mean_path_length, decay=0.01)
basicsr/losses/losses.py:407
Function
generate_frame_indices
Generate an index list for reading `num_frames` frames from a sequence of images. Args: crt_idx (int): Current center index.
basicsr/data/data_util.py:37
Method
get
(self, filepath)
basicsr/utils/file_client.py:14
Method
get
(self, filepath)
basicsr/utils/file_client.py:47
Method
get
(self, filepath)
basicsr/utils/file_client.py:61
Method
get
Get values according to the filepath from one lmdb named client_key. Args: filepath (str | obj:`Path`): Here, filepath is the lmd
basicsr/utils/file_client.py:114
Method
get_component_locations
(self, name, status)
basicsr/data/vfhq_dataset.py:151
Method
get_current_visuals
(self)
basicsr/models/base_model.py:30
Function
get_down_block
Factory function to instantiate a down-block module for the 3D UNet architecture. Down blocks are used in the downsampling part of the U
hallo/models/unet_3d_blocks.py:26
Method
get_embedding
preprocess wav audio file convert to embeddings Args: wav_file (str): The path to the WAV file to be processed. This file should
hallo/datasets/audio_processor.py:136
Function
get_face_region
(image_path: str, detector)
hallo/utils/util.py:722
Function
get_fps
Get the frame rate (FPS) of a video file. Args: video_path (str): The path to the video file. Returns: int: The frame r
hallo/utils/util.py:281
Method
get_frame_from_list
(self)
basicsr/utils/video_util.py:73
Method
get_lr
(self)
basicsr/models/lr_scheduler.py:27
Method
get_lr
(self)
basicsr/models/lr_scheduler.py:86
Method
get_modules
Simple method to avoid too-few-public-methods pylint error
scripts/inference_long.py:91
Method
get_resolution
(self)
basicsr/utils/video_util.py:52
Method
get_sample_shape
Returns the shape of the sample tensor. Returns: Tuple: The shape of the sample tensor.
hallo/models/motion_module.py:92
Method
get_text
(self, filepath)
basicsr/utils/file_client.py:18
Method
get_text
(self, filepath)
basicsr/utils/file_client.py:54
Method
get_text
(self, filepath)
basicsr/utils/file_client.py:67
Method
get_text
(self, filepath)
basicsr/utils/file_client.py:128
Method
get_text
(self, filepath)
basicsr/utils/file_client.py:166
Function
get_up_block
Factory function to instantiate an up-block module for the 3D UNet architecture. Up blocks are used in the upsampling part of the U-Net to i
hallo/models/unet_3d_blocks.py:137
Function
get_valid_bboxes
(bboxes, h, w)
facelib/utils/face_utils.py:23
Function
gradient_penalty_loss
Calculate gradient penalty for wgan-gp. Args: discriminator (nn.Module): Network for the discriminator. real_data (Tensor): Real
basicsr/losses/losses.py:419
Method
hacked_basic_transformer_inner_forward
( self, hidden_states: torch.FloatTensor, attention_mask: Optional[torch.F
hallo/models/mutual_self_attention.py:174
Function
img_rotate
Rotate image. Args: img (ndarray): Image to be rotated. angle (float): Rotation angle in degrees. Positive values mean
basicsr/data/transforms.py:147
Function
imresize
imresize function same as MATLAB. It now only supports bicubic. The same scale applies for both height and width. Args: img (Ten
basicsr/utils/matlab_functions.py:86
Method
init_training_settings
(self)
basicsr/models/codeformer_temporal_model.py:31
Method
init_training_settings
(self)
basicsr/models/vqgan_model.py:22
Method
load_change_cross_attention_dim
Load or change the cross-attention dimension of a pre-trained model. Parameters: pretrained_model_name_or_path (:class:`
hallo/models/unet_2d_condition.py:1361
Function
log_sum_exp
Utility function for computing log_sum_exp while determining This will be used to determine unaveraged confidence loss across all examples in
facelib/detection/retinaface/retinaface_utils.py:343
Function
make_frame
(t)
hallo/utils/util.py:314
Function
make_lmdb_from_imgs
Make lmdb from images. Contents of lmdb. The file structure is: example.lmdb ├── data.mdb ├── lock.mdb ├── meta_info.txt The
basicsr/utils/lmdb_util.py:9
Function
master_only
(func)
basicsr/utils/dist_util.py:74
Function
match
Match each prior box with the ground truth box of the highest jaccard overlap, encode the bounding boxes, then return the matched indices corr
facelib/detection/retinaface/retinaface_utils.py:142
Function
matrix_iof
return iof of a and b, numpy version for data augenmentation
facelib/detection/retinaface/retinaface_utils.py:130
Function
matrix_iou
return iou of a and b, numpy version for data augenmentation
facelib/detection/retinaface/retinaface_utils.py:117
Method
next
(self)
basicsr/data/prefetch_dataloader.py:74
Function
nms
Apply non-maximum suppression at test time to avoid detecting too many overlapping bounding boxes for a given object. Args: boxes: (te
facelib/detection/retinaface/retinaface_utils.py:357
Method
optimize_parameters
(self)
basicsr/models/base_model.py:27
Method
optimize_parameters
(self, current_iter)
basicsr/models/codeformer_temporal_model.py:99
Method
optimize_parameters
(self, current_iter)
basicsr/models/vqgan_model.py:117
Function
paired_paths_from_folder
Generate paired paths from folders. Args: folders (list[str]): A list of folder path. The order of list should be [input_fold
basicsr/data/data_util.py:192
Function
paired_paths_from_lmdb
Generate paired paths from lmdb files. Contents of lmdb. Taking the `lq.lmdb` for example, the file structure is: lq.lmdb ├── data.mdb
basicsr/data/data_util.py:89
Function
paired_paths_from_meta_info_file
Generate paired paths from an meta information file. Each line in the meta information file contains the image names and image shape (usually
basicsr/data/data_util.py:148
Function
paired_random_crop
Paired random crop. It crops lists of lq and gt images with corresponding locations. Args: img_gts (list[ndarray] | ndarray): GT ima
basicsr/data/transforms.py:25
Function
parse
(x)
basicsr/archs/arch_util.py:306
Function
paths_from_folder
Generate paths from folder. Args: folder (str): Folder path. Returns: list[str]: Returned path list.
basicsr/data/data_util.py:228
Function
paths_from_lmdb
Generate paths from lmdb. Args: folder (str): Folder path. Returns: list[str]: Returned path list.
basicsr/data/data_util.py:243
Method
prepare_condition
Prepares the condition for the face animation pipeline. Args: cond_image (torch.Tensor): The conditional image tensor.
hallo/animate/face_animate_static.py:278
Method
preprocess
Apply preprocessing to the source image to prepare for face analysis. Parameters: source_image_path (str): The path to t
hallo/datasets/image_processor.py:265
Function
r1_penalty
R1 regularization for discriminator. The core idea is to penalize the gradient on real data alone: when the generator distribution pro
basicsr/losses/losses.py:390
Function
random_ff_mask
Generate a random free form mask with configuration. Args: config: Config should have configuration including IMG_SHAPES, VERT
basicsr/data/data_util.py:365
Function
random_mixed_kernels
Randomly generate mixed kernels. Args: kernel_list (tuple): a list name of kenrel types, support ['iso', 'aniso', 'skew', 'gen
basicsr/data/gaussian_kernels.py:519
Function
read_frames
Reads video frames from a given video file. Args: video_path (str): The path to the video file. Returns: container (av.
hallo/utils/util.py:245
Function
read_img_seq
Read a sequence of images from a given folder path. Args: path (list[str] | str): List of image paths or image folder path. requi
basicsr/data/data_util.py:13
Method
register
Register the given object under the the name `obj.__name__`. Can be used as either a decorator or not. See docstring of this
basicsr/utils/registry.py:43
Method
reset
(self)
basicsr/data/prefetch_dataloader.py:80
Function
resize_flow
Resize a flow according to ratio or shape. Args: flow (Tensor): Precomputed flow. shape [N, 2, H, W]. size_type (str): 'ratio' or
basicsr/archs/arch_util.py:151
Function
rgb2gray
(img, out_channel=3)
facelib/utils/misc.py:162
Function
rgb2ycbcr
Convert a RGB image to YCbCr image. This function produces the same results as Matlab's `rgb2ycbcr` function. It implements the ITU-R BT.601
basicsr/utils/matlab_functions.py:169
Method
run
(self)
basicsr/utils/realesrgan_utils.py:268
Method
run
(self)
basicsr/data/prefetch_dataloader.py:25
Method
save
(self, epoch, current_iter)
basicsr/models/codeformer_temporal_model.py:233
Method
save
(self, epoch, current_iter)
basicsr/models/vqgan_model.py:279
Function
save_image_batch
(image_tensor, save_path)
scripts/inference_long.py:125
Function
save_image_batch
(image_tensor, save_path)
scripts/train_stage2_long.py:253
Function
save_videos_grid
Save a grid of videos as an animation or video. Args: videos (torch.Tensor): A tensor of shape (batch_size, channels, time, height,
hallo/utils/util.py:207
Function
scandir
Scan a directory to find the interested files. Args: dir_path (str): Path of the directory. suffix (str | tuple(str), optional): F
facelib/utils/misc.py:106
Method
set_attn_processor
r""" Sets the attention processor to use to compute attention. Parameters: processor (`dict` of `AttentionProcessor` or o
hallo/models/unet_3d.py:471
Method
set_chunk_feed_forward
Sets the chunk size for feed-forward processing in the transformer block. Args: chunk_size (Optional[int]): The size of
hallo/models/attention.py:242
Method
set_default_attn_processor
Disables custom attention processors and sets the default attention implementation.
hallo/models/unet_2d_condition.py:774
Method
set_upscale_factor
(self, upscale_factor)
facelib/utils/face_restoration_helper.py:128
Method
set_use_memory_efficient_attention_xformers
Sets the use of memory-efficient attention xformers for the VersatileAttention class. Args: use_memory_efficient_attenti
hallo/models/motion_module.py:507
Function
show_one_kernel
()
basicsr/data/gaussian_kernels.py:588
Function
tensor2img_fast
This implementation is slightly faster than tensor2img. It now only supports torch tensor with shape (1, c, h, w). Args: tensor (Tens
basicsr/utils/img_util.py:97
Function
trunc_normal_
r"""Fills the input Tensor with values drawn from a truncated normal distribution. From: https://github.com/rwightman/pytorch-image-models/bl
basicsr/archs/arch_util.py:277
Function
upfirdn2d
(input, kernel, up=1, down=1, pad=(0, 0))
basicsr/ops/upfirdn2d/upfirdn2d.py:147
Function
weighted_loss
Create a weighted version of a given loss function. To use this decorator, the loss function must have the signature like `loss_func(pred, ta
basicsr/losses/loss_util.py:57
← previous
next →
701–800 of 805, ranked by callers