MCPcopy Create free account

hub / github.com/Francis-Rings/FlashPortrait / functions

Functions508 in github.com/Francis-Rings/FlashPortrait

↓ 2 callersFunctionsimple_save_video
()
fast_infer.py:625
↓ 2 callersFunctionsimple_save_video
()
infer.py:448
↓ 2 callersFunctionsimple_save_videos_grid
(videos: torch.Tensor, path: str, rescale=False, n_rows=6, fps=12)
wan/utils/utils.py:86
↓ 2 callersFunctionsinusoidal_embedding_1d
(dim, position)
wan/models/wan_transformer3d.py:31
↓ 2 callersFunctionsmoothing_factor
(t_e, cutoff)
wan/models/face_model.py:7
↓ 2 callersFunctionsmoothing_factor
(t_e, cutoff)
wan/models/face_utils.py:40
↓ 2 callersFunctionsplit_audio_adapter_sequence
(adapter_proj_length, num_frames=80)
wan/utils/utils.py:468
↓ 2 callersFunctionsplit_tensor_with_padding
(input_tensor, pos_idx_range, expand_length=0)
wan/utils/utils.py:494
↓ 2 callersMethodstep
Perform one step of the step distillation denoising process. The step distillation uses flow matching formulation: -
wan/utils/step_distill_scheduler.py:145
↓ 2 callersFunctionunmerge_lora
Unmerge state_dict in LoRANetwork from the pipeline in diffusers.
wan/utils/lora_utils.py:506
↓ 2 callersFunctionwarp_face_pd_fgc
(image, landmarks222, save_size=224)
wan/models/pdf.py:92
↓ 1 callersFunctionFeedForward
(dim, mult=4)
wan/models/portrait_encoder.py:9
↓ 1 callersMethod__init__
if alpha == 0 or None, alpha is rank (no scaling).
wan/utils/lora_utils.py:27
↓ 1 callersMethod__init__
(self, in_dim, out_dim, kernel_size, stride, downscale_factor=8, num_residual_blocks=1)
wan/models/wan_camera_adapter.py:6
↓ 1 callersFunction_clip
(pretrained=False, pretrained_name=None, model_cls=XLMRobertaCLIP, return_transf
wan/models/wan_image_encoder.py:436
↓ 1 callersFunction_create_special_list
(length)
train_portrait.py:85
↓ 1 callersMethod_decode
(self, zs)
wan/models/wan_vae.py:681
↓ 1 callersMethod_decode
(self, zs)
wan/models/wan_vae.py:821
↓ 1 callersMethod_decode
(self, zs)
wan/models/wan_vae3_8.py:1052
↓ 1 callersMethod_encode
(self, x: torch.Tensor)
wan/models/wan_vae.py:661
↓ 1 callersMethod_encode
(self, x: torch.Tensor)
wan/models/wan_vae.py:801
↓ 1 callersMethod_encode
(self, x: torch.Tensor)
wan/models/wan_vae3_8.py:1032
↓ 1 callersMethod_forward
(self, level, inp)
wan/models/pdf.py:274
↓ 1 callersMethod_generate_network
(self, level)
wan/models/pdf.py:262
↓ 1 callersMethod_index_for_timestep
Find the step index corresponding to the given timestep.
wan/utils/step_distill_scheduler.py:127
↓ 1 callersMethod_init_step_index
Initialize the step_index counter for the scheduler.
wan/utils/fm_solvers.py:693
↓ 1 callersMethod_init_step_index
Initialize the step_index counter for the scheduler.
wan/utils/fm_solvers_unipc.py:642
↓ 1 callersMethod_norm
(self, x)
wan/models/wan_transformer3d.py:188
↓ 1 callersMethod_read_txt_file_images
(self)
wan/data/portrait_data.py:114
↓ 1 callersMethod_relative_position_bucket
(self, rel_pos)
wan/models/wan_text_encoder.py:235
↓ 1 callersFunction_video_vae
Autoencoder3d adapted from Stable Diffusion 1.x, 2.x and XL.
wan/models/wan_vae.py:602
↓ 1 callersFunction_video_vae
(pretrained_path=None, z_dim=16, dim=160, device="cpu", **kwargs)
wan/models/wan_vae3_8.py:873
↓ 1 callersFunctionaddnet_hash_legacy
Old model hash used by sd-webui-additional-networks for .safetensors format files
wan/utils/lora_utils.py:115
↓ 1 callersFunctionaddnet_hash_safetensors
New model hash used by sd-webui-additional-networks for .safetensors format files
wan/utils/lora_utils.py:124
↓ 1 callersFunctionapply_step_distill_lora
Apply step distillation LoRA to the pipeline's transformer. This function follows LightX2V's WanLoraWrapper implementation: 1. Parse
wan/utils/step_distill_lora.py:55
↓ 1 callersMethodapply_to
(self)
wan/utils/lora_utils.py:76
↓ 1 callersFunctionautocast_model_forward
(cls, origin_dtype, *inputs, **kwargs)
wan/utils/fp8_optimization.py:36
↓ 1 callersMethodcheck_inputs
( self, prompt, height, width, negative_prompt, callback_on_st
wan/pipeline/pipeline_wan_fun_inpaint.py:402
↓ 1 callersMethodcheck_inputs
( self, prompt, height, width, negative_prompt, callback_on_st
wan/pipeline/pipeline_wan_fun_control.py:401
↓ 1 callersMethodcheck_inputs
( self, prompt, height, width, negative_prompt, callback_on_st
wan/pipeline/pipeline_wan.py:317
↓ 1 callersMethodcheck_inputs
( self, prompt, height, width, negative_promp
wan/pipeline/pipeline_wan_long.py:449
↓ 1 callersFunctionclip_xlm_roberta_vit_h_14
( pretrained=False, pretrained_name='open-clip-xlm-roberta-large-vit-huge-14', **kwarg
wan/models/wan_image_encoder.py:473
↓ 1 callersFunctioncolor_transfer
Transfer color distribution from of sc, referred to dc. Args: sc (numpy.ndarray): input image to be transfered. dc (numpy.nd
wan/utils/utils.py:31
↓ 1 callersMethodcompute_rel_l1_distance
(prev: torch.Tensor, cur: torch.Tensor)
wan/models/cache_utils.py:68
↓ 1 callersFunctioncontext_scheduler
( step: int = ..., num_steps: Optional[int] = None, num_frames: int = ...,
wan/pipeline/pipeline_wan_long.py:47
↓ 1 callersMethodconvert_model_output
Convert the model output to the corresponding type the DPMSolver/DPMSolver++ algorithm needs. DPM-Solver is designed to discretize an
wan/utils/fm_solvers.py:341
↓ 1 callersMethodconvert_model_output
r""" Convert the model output to the corresponding type the UniPC algorithm needs. Args: model_output (`torch.Tensor`):
wan/utils/fm_solvers_unipc.py:278
↓ 1 callersMethodcount_iou
(self, boxA, boxB)
wan/models/face_model.py:478
↓ 1 callersFunctioncult_dis
(old_kpts, new_kpts)
wan/models/face_model.py:35
↓ 1 callersFunctioncustom_meshgrid
Copied from https://github.com/hehao13/CameraCtrl/blob/main/inference.py
wan/data/utils.py:218
↓ 1 callersFunctioncustom_mse_loss
(noise_pred, target, weighting=None, threshold=50)
train_portrait.py:1411
↓ 1 callersMethoddecode
(self, z, scale=None)
wan/models/wan_vae.py:552
↓ 1 callersMethoddecode
(self, z, scale)
wan/models/wan_vae3_8.py:820
↓ 1 callersMethoddecode
(self, z: torch.Tensor, return_dict: bool = True)
wan/models/wan_vae3_8.py:1062
↓ 1 callersFunctiondeepcopy_function
(f)
wan/models/__init__.py:89
↓ 1 callersFunctiondeepspeed_zero_init_disabled_context_manager
returns either a context list that includes one that will disable zero.Init or an empty context list
train_portrait.py:800
↓ 1 callersFunctiondet_landmarks_without_tqdm
(face_aligner, frame_list)
wan/models/pdf.py:210
↓ 1 callersMethoddpm_solver_first_order_update
One step for the first-order DPMSolver (equivalent to DDIM). Args: model_output (`torch.Tensor`): The dir
wan/utils/fm_solvers.py:415
↓ 1 callersMethodenable_gradient_checkpointing
(self)
wan/utils/lora_utils.py:323
↓ 1 callersMethodencode
( self, x: torch.Tensor, return_dict: bool = True )
wan/models/wan_vae3_8.py:1041
↓ 1 callersMethodencode_prompt
r""" Encodes the prompt into text encoder hidden states. Args: prompt (`str` or `List[str]`, *optional*):
wan/pipeline/pipeline_wan_fun_inpaint.py:233
↓ 1 callersMethodencode_prompt
r""" Encodes the prompt into text encoder hidden states. Args: prompt (`str` or `List[str]`, *optional*):
wan/pipeline/pipeline_wan_fun_control.py:234
↓ 1 callersMethodencode_prompt
r""" Encodes the prompt into text encoder hidden states. Args: prompt (`str` or `List[str]`, *optional*):
wan/pipeline/pipeline_wan.py:183
↓ 1 callersMethodencode_prompt
r""" Encodes the prompt into text encoder hidden states. Args: prompt (`str` or `List[str]`, *optional*):
wan/pipeline/pipeline_wan_long.py:279
↓ 1 callersFunctionfilter_kwargs
(cls, kwargs)
train_portrait.py:76
↓ 1 callersMethodfind_frames_list
(self, frames_path)
wan/data/portrait_data.py:132
↓ 1 callersFunctionfind_replacement
(a)
fast_infer.py:506
↓ 1 callersFunctionfind_replacement
(a)
infer.py:342
↓ 1 callersMethodforward
r""" Args: x(Tensor): Shape [B, L1, C] e(Tensor): Shape [B, C]
wan/models/wan_transformer3d.py:566
↓ 1 callersMethodframe_count
(self, frames_path)
wan/data/portrait_data.py:126
↓ 1 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
wan/models/wan_transformer3d.py:57
↓ 1 callersFunctionget_drive_expression_pd_fgc_training
(images, landmarks, dtype=torch.float32)
wan/models/pdf.py:152
↓ 1 callersFunctionget_emo_feature
(video_path, face_aligner, pd_fpg_motion, device=torch.device("cuda"))
fast_infer.py:513
↓ 1 callersFunctionget_emo_feature
(video_path, face_aligner, pd_fpg_motion, device=torch.device("cuda"))
infer.py:349
↓ 1 callersFunctionget_random_mask
(shape, image_start_only=False)
wan/data/portrait_data.py:17
↓ 1 callersFunctionget_resize_matrix
Get resize matrix for resizing raw img to input size :param raw_shape: (width, height) of raw image :param dst_shape: (width, height)
wan/models/face_det.py:23
↓ 1 callersFunctionget_sigmas
(timesteps, n_dim=4, dtype=torch.float32)
train_portrait.py:1361
↓ 1 callersFunctionget_warp_mat_bbox
( face_bbox, base_angle, dst_size=128, expand_ratio=0.15, aug_angle=0.0, aug_scale=1.0 )
wan/models/face_utils.py:72
↓ 1 callersFunctionhard_nms
Args: box_scores (N, 5): boxes in corner-form and probabilities. iou_threshold: intersection over union threshold.
wan/models/face_det.py:108
↓ 1 callersMethodinfer_image
(self, img_input)
wan/models/face_det.py:293
↓ 1 callersMethodinit_proj
(self, cross_attention_dim=5120)
wan/models/portrait_encoder.py:180
↓ 1 callersMethodinit_weights
r""" Initialize model parameters using Xavier initialization.
wan/models/wan_transformer3d.py:1191
↓ 1 callersFunctioniou_of
Return intersection-over-union (Jaccard index) of boxes. Args: boxes0 (N, 4): ground truth boxes. boxes1 (N or 1, 4): predict
wan/models/face_det.py:145
↓ 1 callersFunctionlinear_decay
(initial_value, final_value, total_steps, current_step)
train_portrait.py:159
↓ 1 callersFunctionmain
()
train_portrait.py:683
↓ 1 callersMethodmultistep_dpm_solver_second_order_update
One step for the second-order multistep DPMSolver. Args: model_output_list (`List[torch.Tensor]`): The di
wan/utils/fm_solvers.py:486
↓ 1 callersMethodmultistep_dpm_solver_third_order_update
One step for the third-order multistep DPMSolver. Args: model_output_list (`List[torch.Tensor]`): The dir
wan/utils/fm_solvers.py:596
↓ 1 callersMethodmultistep_uni_c_bh_update
One step for the UniC (B(h) version). Args: this_model_output (`torch.Tensor`): The model outputs at `x_
wan/utils/fm_solvers_unipc.py:485
↓ 1 callersMethodmultistep_uni_p_bh_update
One step for the UniP (B(h) version). Alternatively, `self.solver_p` is used if is specified. Args: model_output (`torch
wan/utils/fm_solvers_unipc.py:349
↓ 1 callersFunctionnp_bgr_to_tensor
(img_np, dtype)
wan/models/pdf.py:11
↓ 1 callersFunctionparse_args
()
train_portrait.py:181
↓ 1 callersMethodpatch_tgrow_layers
(self, sd)
wan/models/wan_vae_tiny.py:198
↓ 1 callersFunctionpatchify
(x, patch_size)
wan/models/wan_vae3_8.py:285
↓ 1 callersFunctionpos_interpolate
(pos, seq_len)
wan/models/wan_image_encoder.py:24
↓ 1 callersMethodpostprocess
(self, scores, raw_boxes, ResizeM, raw_shape)
wan/models/face_det.py:219
↓ 1 callersFunctionprecalculate_safetensors_hashes
Precalculate the model hashes needed by sd-webui-additional-networks to save time on indexing the model later.
wan/utils/lora_utils.py:141
↓ 1 callersMethodprepare_extra_step_kwargs
(self, generator, eta)
wan/pipeline/pipeline_wan_fun_inpaint.py:384
↓ 1 callersMethodprepare_extra_step_kwargs
(self, generator, eta)
wan/pipeline/pipeline_wan_fun_control.py:383
↓ 1 callersMethodprepare_extra_step_kwargs
(self, generator, eta)
wan/pipeline/pipeline_wan.py:299
↓ 1 callersMethodprepare_extra_step_kwargs
(self, generator, eta)
wan/pipeline/pipeline_wan_long.py:431
← previousnext →101–200 of 508, ranked by callers