MCPcopy Create free account

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

Functions508 in github.com/Francis-Rings/FlashPortrait

↓ 19 callersMethodset_timesteps
Sets the discrete timesteps used for the diffusion chain (to be run before inference). Args: num_inference_steps (`int`):
wan/utils/fm_solvers.py:226
↓ 16 callersMethodfrom_pretrained
(cls, pretrained_model_path, additional_kwargs={})
wan/models/wan_vae.py:699
↓ 13 callersFunctionconv
(n_in, n_out, **kwargs)
wan/models/wan_vae_tiny.py:13
↓ 12 callersMethod__init__
( self, in_channels: int, out_channels: int, factor_t, factor_s=1,
wan/models/wan_vae3_8.py:377
↓ 10 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
wan/utils/fm_solvers.py:333
↓ 9 callersMethod__init__
(self, dim, channel_first=True, images=True, bias=False)
wan/models/wan_vae.py:45
↓ 9 callersMethodencode
( self, x: torch.Tensor, return_dict: bool = True )
wan/models/wan_vae.py:670
↓ 8 callersMethod__getattr__
Forward attribute access to appropriate scheduler.
wan/utils/step_distill_scheduler.py:315
↓ 8 callersMethod_sigma_to_alpha_sigma_t
(self, sigma)
wan/utils/fm_solvers_unipc.py:271
↓ 8 callersFunctionattention
( q, k, v, q_lens=None, k_lens=None, dropout_p=0., softmax_scale=None, q_scale
wan/models/attention_utils.py:152
↓ 8 callersFunctionfilter_kwargs
(cls, kwargs)
wan/utils/utils.py:17
↓ 8 callersMethodpreprocess
(self, img)
wan/models/face_det.py:203
↓ 8 callersFunctionrope_params
(max_seq_len, dim, theta=10000)
wan/models/wan_transformer3d.py:45
↓ 7 callersMethod__init__
(self, dim, out_dim, patch_size, eps=1e-6)
wan/models/wan_transformer3d.py:551
↓ 7 callersMethod__init__
(self, dim, mid_dim)
wan/models/wan_image_encoder.py:98
↓ 7 callersMethodstep
Predict the sample from the previous timestep by reversing the SDE. This function propagates the sample with the multistep DPMSolver.
wan/utils/fm_solvers.py:706
↓ 6 callersMethod__init__
(self, dim, eps=1e-6)
wan/models/wan_text_encoder.py:45
↓ 6 callersMethoddecode
(self, z: torch.Tensor, return_dict: bool = True)
wan/models/wan_vae.py:691
↓ 6 callersFunctionhalf
(x)
wan/models/attention_utils.py:78
↓ 6 callersMethodreset_track
(self)
wan/models/face_model.py:336
↓ 5 callersMethod__init__
(self, n_f, stride)
wan/models/wan_vae_tiny.py:34
↓ 5 callersFunctionfp16_clamp
(x)
wan/models/wan_text_encoder.py:14
↓ 4 callersMethodclear_cache
Initialize feature caches for causal convolutions (matches LightX2V)
wan/models/wan_vae_tiled.py:77
↓ 4 callersMethodclear_cache
(self)
wan/models/wan_vae.py:592
↓ 4 callersMethodclear_cache
(self)
wan/models/wan_vae3_8.py:863
↓ 4 callersFunctionconvert_model_weight_to_float8
(model, exclude_module_name=['embed_tokens'], device=None)
wan/utils/fp8_optimization.py:19
↓ 4 callersFunctionconvert_weight_dtype_wrapper
(module, origin_dtype)
wan/utils/fp8_optimization.py:47
↓ 4 callersMethoddecode_video
(self, x, parallel=True, show_progress_bar=True)
wan/models/wan_vae_tiny.py:216
↓ 4 callersMethodforward
(self, x)
wan/models/pdf.py:386
↓ 4 callersFunctionget_sampling_sigmas
(sampling_steps, shift)
wan/utils/fm_solvers.py:22
↓ 4 callersMethodscale_model_input
Ensures interchangeability with schedulers that need to scale the denoising model input depending on the current timestep. Ar
wan/utils/fm_solvers.py:800
↓ 4 callersFunctionsimple_wrapper
(func)
wan/models/__init__.py:30
↓ 4 callersFunctiontransform_points
(points, mat, invert=False)
wan/models/face_utils.py:89
↓ 3 callersMethod__init__
(self)
wan/models/pdf.py:346
↓ 3 callersMethod__init__
( self, dim=1024, depth=8, dim_head=64, heads=16, num_qu
wan/models/portrait_encoder.py:77
↓ 3 callersFunction_batch_encode_vae
(pixel_values)
train_portrait.py:1257
↓ 3 callersFunctionarea_of
Compute the areas of rectangles given two corners. Args: left_top (N, 2): left top corner. right_bottom (N, 2): right bottom
wan/models/face_det.py:164
↓ 3 callersFunctionconv3x3
3x3 convolution with padding
wan/models/pdf.py:245
↓ 3 callersMethoddetect
(self, img)
wan/models/face_det.py:296
↓ 3 callersMethodprepare_control_latents
( self, control, control_image, batch_size, height, width, dtype, device, generator, do_classifier_fre
wan/pipeline/pipeline_wan_fun_control.py:342
↓ 3 callersFunctionreshape_tensor
(x, heads)
wan/models/portrait_encoder.py:19
↓ 3 callersFunctionretrieve_timesteps
Calls the scheduler's `set_timesteps` method and retrieves timesteps from the scheduler after the call. Handles custom timesteps. Any kwargs
wan/pipeline/pipeline_wan_fun_inpaint.py:40
↓ 3 callersFunctionretrieve_timesteps
Calls the scheduler's `set_timesteps` method and retrieves timesteps from the scheduler after the call. Handles custom timesteps. Any kwargs
wan/pipeline/pipeline_wan_fun_control.py:41
↓ 3 callersFunctionretrieve_timesteps
Calls the scheduler's `set_timesteps` method and retrieves timesteps from the scheduler after the call. Handles custom timesteps. Any kwargs
wan/pipeline/pipeline_wan.py:33
↓ 3 callersFunctionretrieve_timesteps
Calls the scheduler's `set_timesteps` method and retrieves timesteps from the scheduler after the call. Handles custom timesteps. Any kwarg
wan/pipeline/pipeline_wan_long.py:78
↓ 3 callersMethodsample
(self, imgs, deterministic=False)
wan/models/wan_vae.py:585
↓ 2 callersMethod__init__
(self, vocab_size=250002, max_seq_len=514, type_size=1,
wan/models/wan_xlm_roberta.py:81
↓ 2 callersMethod_get_t5_prompt_embeds
( self, prompt: Union[str, List[str]] = None, num_videos_per_prompt: int = 1,
wan/pipeline/pipeline_wan_fun_inpaint.py:189
↓ 2 callersMethod_get_t5_prompt_embeds
( self, prompt: Union[str, List[str]] = None, num_videos_per_prompt: int = 1,
wan/pipeline/pipeline_wan_fun_control.py:190
↓ 2 callersMethod_get_t5_prompt_embeds
( self, prompt: Union[str, List[str]] = None, num_videos_per_prompt: int = 1,
wan/pipeline/pipeline_wan.py:139
↓ 2 callersMethod_get_t5_prompt_embeds
( self, prompt: Union[str, List[str]] = None, num_videos_per_prompt: in
wan/pipeline/pipeline_wan_long.py:235
↓ 2 callersMethod_threshold_sample
"Dynamic thresholding: At each sampling step we set s to a certain percentile absolute pixel value in xt0 (the prediction of x_0 at t
wan/utils/fm_solvers.py:292
↓ 2 callersMethod_threshold_sample
"Dynamic thresholding: At each sampling step we set s to a certain percentile absolute pixel value in xt0 (the prediction of x_0 at t
wan/utils/fm_solvers_unipc.py:229
↓ 2 callersFunction_write_to_excel
(model_name, time_sum)
wan/utils/utils.py:415
↓ 2 callersMethodadd_noise
Add noise to samples according to the flow matching schedule. x_t = (1 - sigma) * x_0 + sigma * noise
wan/utils/step_distill_scheduler.py:205
↓ 2 callersFunctionapply_model_with_memblocks
(model, x, parallel, show_progress_bar)
wan/models/wan_vae_tiny.py:56
↓ 2 callersMethodarea
(self, bbox)
wan/models/face_model.py:502
↓ 2 callersMethodblend_h
Horizontal blending (matches LightX2V exactly)
wan/models/wan_vae_tiled.py:95
↓ 2 callersMethodblend_v
Vertical blending (matches LightX2V exactly)
wan/models/wan_vae_tiled.py:88
↓ 2 callersFunctioncount_conv3d
Count CausalConv3d layers for cache initialization
wan/models/wan_vae_tiled.py:21
↓ 2 callersFunctioncount_conv3d
(model)
wan/models/wan_vae.py:479
↓ 2 callersFunctioncount_conv3d
(model)
wan/models/wan_vae3_8.py:731
↓ 2 callersFunctioncreate_onnx_session
(onnx_path, gpu_id=None)
wan/models/face_utils.py:10
↓ 2 callersMethoddecode_latents
(self, latents: torch.Tensor)
wan/pipeline/pipeline_wan_fun_inpaint.py:376
↓ 2 callersMethoddecode_latents
(self, latents: torch.Tensor)
wan/pipeline/pipeline_wan_fun_control.py:375
↓ 2 callersMethoddecode_latents
(self, latents: torch.Tensor)
wan/pipeline/pipeline_wan.py:291
↓ 2 callersMethoddecode_latents
(self, latents: torch.Tensor)
wan/pipeline/pipeline_wan_long.py:423
↓ 2 callersFunctiondet_landmarks
(face_aligner, frame_list)
wan/models/pdf.py:165
↓ 2 callersMethodenable_cfg_skip
(self, cfg_skip_ratio, num_steps)
wan/models/wan_transformer3d.py:795
↓ 2 callersMethodenable_multi_gpus_inference
(self,)
wan/models/wan_transformer3d.py:845
↓ 2 callersMethodenable_teacache
( self, coefficients, num_steps: int, rel_l1_thresh: float, num_skip_s
wan/models/wan_transformer3d.py:774
↓ 2 callersMethodencode
(self, x, scale=None)
wan/models/wan_vae.py:520
↓ 2 callersMethodencode
(self, x, scale)
wan/models/wan_vae3_8.py:788
↓ 2 callersMethodencode_video
(self, x, parallel=True, show_progress_bar=True)
wan/models/wan_vae_tiny.py:207
↓ 2 callersFunctionexponential_smoothing
(a, x, x_prev)
wan/models/face_model.py:12
↓ 2 callersFunctionexponential_smoothing
(a, x, x_prev)
wan/models/face_utils.py:45
↓ 2 callersFunctionflash_attention
q: [B, Lq, Nq, C1]. k: [B, Lk, Nk, C1]. v: [B, Lk, Nk, C2]. Nq must be divisible by Nk. q_lens
wan/models/attention_utils.py:43
↓ 2 callersMethodforward
(self, x)
wan/models/wan_vae.py:55
↓ 2 callersMethodforward
(self, x)
wan/models/wan_image_encoder.py:108
↓ 2 callersMethodforward
(self, x: torch.Tensor, first_chunk=False)
wan/models/wan_vae3_8.py:395
↓ 2 callersMethodget_adapter_proj
(self, adapter_fea=None)
wan/models/portrait_encoder.py:184
↓ 2 callersFunctionget_drive_expression_pd_fgc
( pd_fpg_motion, images, landmarks, device, dtype=torch.float32 )
wan/models/pdf.py:114
↓ 2 callersFunctionget_mean_and_std
(img)
wan/utils/utils.py:43
↓ 2 callersFunctionget_relative_pose
Copied from https://github.com/hehao13/CameraCtrl/blob/main/inference.py
wan/data/utils.py:227
↓ 2 callersFunctionget_teacache_coefficients
(model_name)
wan/models/cache_utils.py:4
↓ 2 callersFunctionget_warp_mat_bbox_by_gt_pts_float
( gt_pts, base_angle=0.0, dst_size=128, expand_ratio=0.15, return_info=False )
wan/models/face_utils.py:98
↓ 2 callersFunctionimage_preprocess
(np_bgr, size, dtype=torch.float32)
wan/models/pdf.py:16
↓ 2 callersMethodindex_for_timestep
(self, timestep, schedule_timesteps=None)
wan/utils/fm_solvers.py:679
↓ 2 callersMethodindex_for_timestep
(self, timestep, schedule_timesteps=None)
wan/utils/fm_solvers_unipc.py:627
↓ 2 callersFunctionload_step_distill_lora
Load step distillation LoRA weights from file. Args: lora_path: Path to the LoRA safetensors file dtype: Data type for w
wan/utils/step_distill_lora.py:23
↓ 2 callersFunctionmerge_lora
(pipeline, lora_path, multiplier, device='cpu', dtype=torch.float32, state_dict=None, transformer_only=False,
wan/utils/lora_utils.py:384
↓ 2 callersMethodonnx_infer
(self, input_uint8)
wan/models/face_align.py:27
↓ 2 callersFunctionordered_halving
(val)
wan/pipeline/pipeline_wan_long.py:39
↓ 2 callersFunctionpadding_image
(images, new_width, new_height)
wan/utils/utils.py:352
↓ 2 callersFunctionray_condition
Copied from https://github.com/hehao13/CameraCtrl/blob/main/inference.py
wan/data/utils.py:244
↓ 2 callersFunctionreplace_parameters_by_name
(module, name_keywords, device)
wan/utils/fp8_optimization.py:8
↓ 2 callersFunctionrope_apply
(x, grid_sizes, freqs)
wan/models/wan_transformer3d.py:137
↓ 2 callersFunctionsave_videos_grid
(videos: torch.Tensor, path: str, rescale=False, n_rows=6, fps=12, imageio_backend=True, color_transfer_post_p
wan/utils/utils.py:59
↓ 2 callersMethodscale_model_input
Scale the model input (no scaling needed for flow matching).
wan/utils/step_distill_scheduler.py:121
↓ 2 callersMethodset_timesteps
Set the timesteps for step distillation. Note: num_inference_steps is ignored as we use the fixed denoising_step_list.
wan/utils/step_distill_scheduler.py:85
next →1–100 of 508, ranked by callers