MCPcopy Create free account

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

Functions192 in github.com/Francis-Rings/MotionFollower

↓ 43 callersMethodhead_to_batch_dim
r""" Reshape the tensor from `[batch_size, seq_len, dim]` to `[batch_size, seq_len, heads, dim // heads]` `heads` is the number of h
src/models/attn_process_diffuser.py:555
↓ 13 callersMethodnorm_encoder_hidden_states
r""" Normalize the encoder hidden states. Requires `self.norm_cross` to be specified when constructing the `Attention` class.
src/models/attn_process_diffuser.py:672
↓ 13 callersMethodprepare_attention_mask
r""" Prepare the attention mask for the attention computation. Args: attention_mask (`torch.Tensor`):
src/models/attn_process_diffuser.py:625
↓ 11 callersMethodbatch_to_head_dim
r""" Reshape the tensor from `[batch_size, seq_len, dim]` to `[batch_size // heads, seq_len, dim * heads]`. `heads` is the number of
src/models/attn_process_diffuser.py:538
↓ 10 callersMethod__init__
( self, query_dim: int, cross_attention_dim: Optional[int] = None, heads:
src/models/attn_process_diffuser.py:76
↓ 8 callersMethodset_processor
r""" Set the attention processor to use. Args: processor (`AttnProcessor`): The attention processor
src/models/attn_process_diffuser.py:360
↓ 7 callersMethodget_attention_scores
r""" Compute the attention scores. Args: query (`torch.Tensor`): The query tensor. key (`torch.Tensor`):
src/models/attn_process_diffuser.py:578
↓ 5 callersFunctionget_motion_module
(in_channels, motion_module_type: str, motion_module_kwargs: dict)
src/models/motion_module.py:33
↓ 4 callersMethod__init__
( self, in_channels: int, prev_output_channel: int, out_channels: int,
src/models/unet_3d_blocks.py:816
↓ 4 callersMethod__init__
(self, d_model, dropout=0.0, max_len=24)
src/models/motion_module.py:262
↓ 3 callersMethod_reshape
(hid_states, h)
src/models/attn_process_diffuser.py:2238
↓ 3 callersMethodget_noise_pred_single
(self, latents, t, context, normal_infer=False)
src/pipelines/null_text_optimization.py:54
↓ 2 callersMethod__init__
(self, channels, use_conv, dims=2, out_channels=None, padding=1)
src/models/appearance_net.py:102
↓ 2 callersMethod__init__
( self, channels, use_conv=False, use_conv_transpose=False, out_channe
src/models/resnet.py:30
↓ 2 callersMethodforward
(self, hidden_states)
src/models/resnet.py:244
↓ 2 callersMethodfrom_pretrained_2d
( cls, pretrained_model_path: PathLike, motion_module_path: PathLike, subf
src/models/estimator.py:649
↓ 2 callersFunctionget_down_block
( down_block_type, num_layers, in_channels, out_channels, temb_channels, add_downsampl
src/models/unet_3d_blocks.py:21
↓ 2 callersFunctionget_up_block
( up_block_type, num_layers, in_channels, out_channels, prev_output_channel, temb_chan
src/models/unet_3d_blocks.py:100
↓ 2 callersMethodnext_step
(self, model_output: Union[torch.FloatTensor, np.ndarray], timestep: int, sample: Union[tor
src/pipelines/null_text_optimization.py:42
↓ 2 callersFunctionordered_halving
(val)
src/pipelines/context.py:6
↓ 2 callersMethodprev_step
(self, model_output: Union[torch.FloatTensor, np.ndarray], timestep: int, sample: Union[tor
src/pipelines/null_text_optimization.py:30
↓ 2 callersFunctionsave_videos_grid
(videos: torch.Tensor, path: str, rescale=False, n_rows=6, fps=8)
src/utils/util.py:86
↓ 2 callersFunctionzero_module
(module)
src/models/motion_module.py:14
↓ 1 callersMethod__init__
(self, hidden_size)
src/models/transformer_3d.py:31
↓ 1 callersFunctionavg_pool_nd
(dims, *args, **kwargs)
src/models/appearance_net.py:23
↓ 1 callersFunctionconv_nd
(dims, in_channels, out_channels, kernel_size, **kwargs)
src/models/appearance_net.py:5
↓ 1 callersMethodddim_inversion
(self, latent)
src/pipelines/null_text_optimization.py:176
↓ 1 callersMethodddim_loop
(self, latent, ref_images_pil=None, pose_cond_fea=None)
src/utils/inversion.py:40
↓ 1 callersMethodddim_loop
(self, latent)
src/pipelines/null_text_optimization.py:157
↓ 1 callersMethoddecode_latents
(self, latents)
src/pipelines/motion_editor.py:110
↓ 1 callersMethoddecode_latents
(self, latents)
src/pipelines/pipeline_pose2vid_collection.py:104
↓ 1 callersMethodget_noise_pred
(self, latents, t, is_forward=True, context=None, normal_infer=False)
src/pipelines/null_text_optimization.py:58
↓ 1 callersMethodget_noise_pred_single
(self, latents, t, context, ref_images_pil=None, pose_cond_fea=None)
src/utils/inversion.py:26
↓ 1 callersMethodguidance_edit
( self, source_masks, target_masks, latent, l
src/pipelines/motion_editor.py:553
↓ 1 callersMethodinit_emb_img
(self, clip_emb_im=None)
src/utils/inversion.py:36
↓ 1 callersMethodinit_signals
(self, ref_images_list, ref_pose_list)
src/pipelines/null_text_optimization.py:117
↓ 1 callersFunctionmain
()
inference-sde.py:56
↓ 1 callersFunctionmodulate
(x, shift, scale)
src/models/transformer_3d.py:27
↓ 1 callersMethodnext_step
(self, model_output: Union[torch.FloatTensor, np.ndarray], timestep: int, sample: Union[tor
src/utils/inversion.py:14
↓ 1 callersMethodnull_optimization
(self, latents, null_inner_steps, epsilon)
src/pipelines/null_text_optimization.py:180
↓ 1 callersFunctionparse_args
()
inference-sde.py:29
↓ 1 callersMethodprepare_extra_step_kwargs
(self, generator, eta)
src/pipelines/motion_editor.py:125
↓ 1 callersMethodprepare_extra_step_kwargs
(self, generator, eta)
src/pipelines/pipeline_pose2vid_collection.py:119
↓ 1 callersMethodprepare_latents
( self, batch_size, num_channels_latents, width, height,
src/pipelines/pipeline_pose2vid_collection.py:140
↓ 1 callersFunctionsave_videos_from_pil
(pil_images, path, fps=8)
src/utils/util.py:51
↓ 1 callersFunctionseed_everything
(seed)
src/utils/util.py:16
↓ 1 callersMethodset_attention_slice
r""" Enable sliced attention computation. When this option is enabled, the attention module will split the input tensor in slices, to
src/models/unet_3d.py:282
↓ 1 callersMethodset_attention_slice
r""" Enable sliced attention computation. When this option is enabled, the attention module will split the input tensor in slices,
src/models/estimator.py:283
↓ 1 callersMethodset_attn_processor
r""" Sets the attention processor to use to compute attention. Parameters: processor (`dict` of `AttentionProcessor`
src/models/estimator.py:359
Method__call__
( self, ref_images, target_pose_images, width,
src/pipelines/motion_editor.py:291
Method__call__
( self, ref_images, pose_images, width, height, video_le
src/pipelines/pipeline_pose2vid_collection.py:285
Method__call__
( self, attn, hidden_states, encoder_hidden_states=None, attentio
src/models/attention_processor.py:23
Method__call__
( self, attn: Attention, hidden_states: torch.FloatTensor, encoder_hidden_
src/models/attn_process_diffuser.py:707
Method__call__
( self, attn: Attention, hidden_states: torch.FloatTensor, encoder_hidden_
src/models/attn_process_diffuser.py:816
Method__call__
( self, attn: Attention, hidden_states: torch.FloatTensor, encoder_hidden_
src/models/attn_process_diffuser.py:881
Method__call__
( self, attn: Attention, hidden_states: torch.FloatTensor, encoder_hidden_
src/models/attn_process_diffuser.py:951
Method__call__
( self, attn: Attention, hidden_states: torch.FloatTensor, encoder_hidden_
src/models/attn_process_diffuser.py:1027
Method__call__
( self, attn: Attention, hidden_states: torch.FloatTensor, encoder_hidden_
src/models/attn_process_diffuser.py:1098
Method__call__
( self, attn: Attention, hidden_states: torch.FloatTensor, encoder_hidden_
src/models/attn_process_diffuser.py:1183
Method__call__
( self, attn: Attention, hidden_states: torch.FloatTensor, encoder_hidden_
src/models/attn_process_diffuser.py:1313
Method__call__
( self, attn: Attention, hidden_states: torch.FloatTensor, encoder_hidden_
src/models/attn_process_diffuser.py:1424
Method__call__
( self, attn: Attention, hidden_states: torch.FloatTensor, encoder_hidden_
src/models/attn_process_diffuser.py:1505
Method__call__
( self, attn: "Attention", hidden_states: torch.FloatTensor, encoder_hidde
src/models/attn_process_diffuser.py:1592
Method__call__
(self, attn: Attention, hidden_states: torch.FloatTensor, *args, **kwargs)
src/models/attn_process_diffuser.py:1752
Method__call__
(self, attn: Attention, hidden_states: torch.FloatTensor, *args, **kwargs)
src/models/attn_process_diffuser.py:1827
Method__call__
(self, attn: Attention, hidden_states: torch.FloatTensor, *args, **kwargs)
src/models/attn_process_diffuser.py:1906
Method__call__
(self, attn: Attention, hidden_states: torch.FloatTensor, *args, **kwargs)
src/models/attn_process_diffuser.py:1965
Method__call__
( self, attn, hidden_states, encoder_hidden_states=None, attentio
src/models/attn_process_diffuser.py:2012
Method__call__
( self, attn, hidden_states, encoder_hidden_states=None, attentio
src/models/attn_process_diffuser.py:2127
Method__call__
( self, attn, x, context, context_mask=None, )
src/models/attn_process_diffuser.py:2243
Method__init__
(self, model, scheduler, NUM_DDIM_STEPS)
src/utils/inversion.py:8
Method__init__
( self, vae, image_encoder, denoising_unet, p
src/pipelines/motion_editor.py:36
Method__init__
(self, model, guidance_scale, null_inv_with_prompt, null_normal_infer=False, image_encoder=None)
src/pipelines/null_text_optimization.py:225
Method__init__
( self, vae, image_encoder, denoising_unet, pose_guider,
src/pipelines/pipeline_pose2vid_collection.py:30
Method__init__
( self, hidden_size=None, cross_attention_dim=None, camera=False, )
src/models/attention_processor.py:12
Method__init__
(self, channels=[320, 640, 1280, 1280], nums_rb=3, cin=64, ksize=3, sk=False, use_conv=True)
src/models/appearance_net.py:33
Method__init__
(self, in_c, out_c, down, ksize=3, sk=False, use_conv=True)
src/models/appearance_net.py:66
Method__init__
( self, num_attention_heads: int = 16, attention_head_dim: int = 88, in_channe
src/models/transformer_3d.py:50
Method__init__
( self, sample_size: Optional[int] = None, in_channels: int = 4, out_channels:
src/models/unet_3d.py:31
Method__init__
( self, train_kv: bool = True, train_q_out: bool = True, hidden_size: Opti
src/models/attn_process_diffuser.py:790
Method__init__
(self)
src/models/attn_process_diffuser.py:945
Method__init__
(self, attention_op: Optional[Callable] = None)
src/models/attn_process_diffuser.py:1024
Method__init__
(self, attention_op: Optional[Callable] = None)
src/models/attn_process_diffuser.py:1095
Method__init__
(self)
src/models/attn_process_diffuser.py:1179
Method__init__
( self, train_kv: bool = True, train_q_out: bool = False, hidden_size: Opt
src/models/attn_process_diffuser.py:1285
Method__init__
( self, train_kv: bool = True, train_q_out: bool = True, hidden_size: Opti
src/models/attn_process_diffuser.py:1398
Method__init__
(self, slice_size: int)
src/models/attn_process_diffuser.py:1502
Method__init__
(self, slice_size)
src/models/attn_process_diffuser.py:1589
Method__init__
( self, f_channels: int, zq_channels: int, )
src/models/attn_process_diffuser.py:1682
Method__init__
( self, hidden_size: int, cross_attention_dim: Optional[int] = None, rank:
src/models/attn_process_diffuser.py:1718
Method__init__
( self, hidden_size: int, cross_attention_dim: Optional[int] = None, rank:
src/models/attn_process_diffuser.py:1791
Method__init__
( self, hidden_size: int, cross_attention_dim: int, rank: int = 4,
src/models/attn_process_diffuser.py:1870
Method__init__
( self, hidden_size: int, cross_attention_dim: Optional[int] = None, rank:
src/models/attn_process_diffuser.py:1945
Method__init__
(self, hidden_size, cross_attention_dim=None, num_tokens=4, scale=1.0)
src/models/attn_process_diffuser.py:2001
Method__init__
(self, hidden_size, cross_attention_dim=None, num_tokens=4, scale=1.0)
src/models/attn_process_diffuser.py:2111
Method__init__
( self, dim: int, num_attention_heads: int, attention_head_dim
src/models/attention.py:22
Method__init__
( self, in_channels: int, temb_channels: int, dropout: float = 0.0, nu
src/models/unet_3d_blocks.py:178
Method__init__
( self, in_channels: int, out_channels: int, temb_channels: int, dropo
src/models/unet_3d_blocks.py:314
Method__init__
( self, in_channels: int, out_channels: int, temb_channels: int, dropo
src/models/unet_3d_blocks.py:510
Method__init__
( self, in_channels: int, out_channels: int, prev_output_channel: int,
src/models/unet_3d_blocks.py:638
next →1–100 of 192, ranked by callers