MCPcopy Create free account

hub / github.com/magic-research/magic-animate / functions

Functions239 in github.com/magic-research/magic-animate

↓ 86 callersMethodto
(self, dtype)
magicanimate/models/mutual_self_attention.py:118
↓ 19 callersFunctionprint
(*args, **kwargs)
magicanimate/utils/dist_tools.py:87
↓ 13 callersFunctiontorch_dfs
(model: torch.nn.Module)
magicanimate/models/stable_diffusion_controlnet_reference.py:65
↓ 9 callersMethod__init__
(self, dim_in: int, dim_out: int)
magicanimate/models/orig_attention.py:789
↓ 7 callersMethodreshape_heads_to_batch_dim
(self, tensor)
magicanimate/models/orig_attention.py:578
↓ 6 callersMethod__init__
(self, num_channels: int, flip_sin_to_cos: bool, downscale_freq_shift: float)
magicanimate/models/embeddings.py:222
↓ 6 callersMethodfrom_pretrained_2d
(cls, pretrained_model_path, subfolder=None, unet_additional_kwargs=None)
magicanimate/models/unet.py:470
↓ 6 callersMethodreshape_heads_to_batch_dim
(self, tensor)
magicanimate/models/orig_attention.py:320
↓ 6 callersFunctionsave_videos_grid
(videos: torch.Tensor, path: str, rescale=False, n_rows=6, fps=25)
magicanimate/utils/util.py:21
↓ 5 callersFunctionget_motion_module
( in_channels, motion_module_type: str, motion_module_kwargs: dict )
magicanimate/models/motion_module.py:42
↓ 5 callersMethodupdate
(self, writer, dtype=torch.float16)
magicanimate/models/mutual_self_attention.py:577
↓ 5 callersFunctionzero_module
(module)
magicanimate/models/controlnet.py:575
↓ 4 callersMethod__init__
( self, in_channels: int, prev_output_channel: int, out_channels: int,
magicanimate/models/unet_3d_blocks.py:666
↓ 4 callersMethod__init__
( self, d_model, dropout = 0., max_len = 24 )
magicanimate/models/motion_module.py:231
↓ 4 callersMethodclear
(self)
magicanimate/models/mutual_self_attention.py:619
↓ 4 callersFunctionget_down_block
( down_block_type, num_layers, in_channels, out_channels, temb_channels, add_downsampl
magicanimate/models/unet_3d_blocks.py:30
↓ 4 callersMethodread
(self)
magicanimate/utils/videoreader.py:150
↓ 3 callersMethod_read_video
(self, offset)
magicanimate/utils/videoreader.py:73
↓ 3 callersMethodattn_batch
Performing attention for a batch of queries, keys, and values
magicanimate/models/mutual_self_attention.py:73
↓ 3 callersMethodforward
(self, q, k, v, sim, attn, is_cross, place_in_unet, num_heads, **kwargs)
magicanimate/models/mutual_self_attention.py:43
↓ 3 callersMethodgelu
(self, gate)
magicanimate/models/orig_attention.py:793
↓ 3 callersFunctionget_up_block
( up_block_type, num_layers, in_channels, out_channels, prev_output_channel, temb_chan
magicanimate/models/unet_3d_blocks.py:106
↓ 3 callersMethodimages2latents
Convert RGB image to VAE latents
magicanimate/pipelines/pipeline_animation.py:385
↓ 3 callersMethodreshape_batch_dim_to_heads
(self, tensor)
magicanimate/models/orig_attention.py:585
↓ 2 callersMethod__init__
(self, scale=None, *args, **kwargs)
magicanimate/models/appearance_encoder.py:83
↓ 2 callersMethod__init__
(self, channels, use_conv=False, use_conv_transpose=False, out_channels=None, name="conv")
magicanimate/models/resnet.py:42
↓ 2 callersMethod_attention
(self, query, key, value, attention_mask=None)
magicanimate/models/orig_attention.py:655
↓ 2 callersMethod_compute_video_stats
(self)
magicanimate/utils/videoreader.py:95
↓ 2 callersMethod_encode_prompt
(self, prompt, device, num_videos_per_prompt, do_classifier_free_guidance, negative_prompt)
magicanimate/pipelines/pipeline_animation.py:184
↓ 2 callersMethod_memory_efficient_attention_xformers
(self, query, key, value, attention_mask)
magicanimate/models/orig_attention.py:729
↓ 2 callersMethod_sliced_attention
(self, query, key, value, sequence_length, dim, attention_mask)
magicanimate/models/orig_attention.py:686
↓ 2 callersMethodcheck_inputs
(self, prompt, height, width, callback_steps)
magicanimate/pipelines/pipeline_animation.py:308
↓ 2 callersFunctiondistributed_init
(args)
magicanimate/utils/dist_tools.py:18
↓ 2 callersFunctionget_1d_sincos_pos_embed_from_grid
embed_dim: output dimension for each position pos: a list of positions to be encoded: size (M,) out: (M, D)
magicanimate/models/embeddings.py:100
↓ 2 callersFunctionmain
(args)
magicanimate/pipelines/animation.py:46
↓ 2 callersFunctionordered_halving
(val)
magicanimate/pipelines/context.py:12
↓ 2 callersMethodprepare_extra_step_kwargs
(self, generator, eta)
magicanimate/pipelines/pipeline_animation.py:291
↓ 2 callersMethodprepare_latents
(self, batch_size, num_channels_latents, video_length, height, width, dtype, device, generator, latents=None,
magicanimate/pipelines/pipeline_animation.py:323
↓ 2 callersFunctionrun
(args)
demo/animate_dist.py:200
↓ 2 callersMethodsample
(self, debug=False)
magicanimate/utils/videoreader.py:116
↓ 2 callersMethodseek
(self, pts, backward=True, any_frame=False)
magicanimate/utils/videoreader.py:61
↓ 1 callersMethod__init__
(self)
magicanimate/models/mutual_self_attention.py:25
↓ 1 callersMethod__init__
( self, in_channels: int = 4, flip_sin_to_cos: bool = True, freq_shift: int =
magicanimate/models/controlnet.py:98
↓ 1 callersMethod__init__
( self, num_attention_heads: int = 16, attention_head_dim: int = 88, in_channe
magicanimate/models/attention.py:50
↓ 1 callersMethod_get_video_frame_rate
(self)
magicanimate/utils/videoreader.py:113
↓ 1 callersMethod_iter_frames
(self)
magicanimate/utils/videoreader.py:90
↓ 1 callersMethod_occasional_gc
(self)
magicanimate/utils/videoreader.py:65
↓ 1 callersMethodafter_step
(self)
magicanimate/models/mutual_self_attention.py:30
↓ 1 callersFunctionddim_loop
(pipeline, ddim_scheduler, latent, num_inv_steps, prompt)
magicanimate/utils/util.py:83
↓ 1 callersMethoddecode_latents
(self, latents, rank, decoder_consistency=None)
magicanimate/pipelines/pipeline_animation.py:273
↓ 1 callersMethodforward
(self, hidden_states)
magicanimate/models/resnet.py:211
↓ 1 callersMethodgelu
(self, gate)
magicanimate/models/orig_attention.py:819
↓ 1 callersFunctionget_2d_sincos_pos_embed
grid_size: int of the grid height and width return: pos_embed: [grid_size*grid_size, embed_dim] or [1+grid_size*grid_size, embed_dim] (w/ or
magicanimate/models/embeddings.py:71
↓ 1 callersFunctionget_2d_sincos_pos_embed_from_grid
(embed_dim, grid)
magicanimate/models/embeddings.py:88
↓ 1 callersFunctionget_context_scheduler
(name: str)
magicanimate/pipelines/context.py:45
↓ 1 callersFunctionget_noise_pred_single
(latents, t, context, unet)
magicanimate/utils/util.py:77
↓ 1 callersMethodget_num_frames
(self)
magicanimate/utils/videoreader.py:155
↓ 1 callersFunctionget_rank
()
magicanimate/utils/dist_tools.py:62
↓ 1 callersFunctionget_tensor_interpolation_method
()
magicanimate/utils/util.py:118
↓ 1 callersFunctionget_timestep_embedding
This matches the implementation in Denoising Diffusion Probabilistic Models: Create sinusoidal timestep embeddings. :param timesteps: a 1-D
magicanimate/models/embeddings.py:28
↓ 1 callersFunctioninit_prompt
(prompt, pipeline)
magicanimate/utils/util.py:45
↓ 1 callersMethodinterpolate_latents
(self, latents: torch.Tensor, interpolation_factor:int, device )
magicanimate/pipelines/pipeline_animation.py:461
↓ 1 callersFunctionis_master
()
magicanimate/utils/dist_tools.py:72
↓ 1 callersFunctionnext_step
(model_output: Union[torch.FloatTensor, np.ndarray], timestep: int, sample: Union[torch.FloatTen
magicanimate/utils/util.py:64
↓ 1 callersMethodnext_step
Inverse sampling for DDIM Inversion
magicanimate/pipelines/pipeline_animation.py:361
↓ 1 callersMethodpredict
(self, source_image, motion_sequence, random_seed, step, guidance_scale, save_path, dist_kwargs, size=512)
demo/animate_dist.py:129
↓ 1 callersMethodprepare_condition
(self, condition, num_videos_per_prompt, device, dtype, do_classifier_free_guidance)
magicanimate/pipelines/pipeline_animation.py:352
↓ 1 callersMethodprepare_ref_latents
(self, refimage, batch_size, dtype, device, generator, do_classifier_free_guidance)
magicanimate/models/stable_diffusion_controlnet_reference.py:73
↓ 1 callersMethodregister_reference_hooks
( self, mode, do_classifier_free_guidance, attention_auto_ma
magicanimate/models/mutual_self_attention.py:161
↓ 1 callersMethodreshape_batch_dim_to_heads
(self, tensor)
magicanimate/models/orig_attention.py:327
↓ 1 callersFunctionrun
(args)
magicanimate/pipelines/animation.py:256
↓ 1 callersMethodselect_controlnet_res_samples
(self, controlnet_res_samples_cache_dict, context, do_classifier_free_guidance, b, f)
magicanimate/pipelines/pipeline_animation.py:496
↓ 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
magicanimate/models/unet.py:262
↓ 1 callersMethodset_attention_slice
r""" Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor in slices to comp
magicanimate/models/appearance_encoder.py:708
↓ 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
magicanimate/models/controlnet.py:384
↓ 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
magicanimate/models/unet_controlnet.py:259
↓ 1 callersMethodset_attn_processor
r""" Sets the attention processor to use to compute attention. Parameters: processor (`dict` of `AttentionProcessor` or o
magicanimate/models/appearance_encoder.py:659
↓ 1 callersFunctionsuppress_output
Suppress printing on the current device. Force printing with `force=True`.
magicanimate/utils/dist_tools.py:81
↓ 1 callersMethodtoken_drop
Drops labels to enable classifier-free guidance.
magicanimate/models/embeddings.py:350
↓ 1 callersFunctionzero_module
(module)
magicanimate/models/motion_module.py:23
Method__call__
New args: - controlnet_condition : condition map (e.g., depth, canny, keypoints) for controlnet - controlnet_conditi
magicanimate/pipelines/pipeline_animation.py:525
Method__call__
(self, q, k, v, sim, attn, is_cross, place_in_unet, num_heads, **kwargs)
magicanimate/models/mutual_self_attention.py:33
Method__call__
r""" Function invoked when calling the pipeline for generation. Args: prompt (`str` or `List[str]`, *optional*):
magicanimate/models/stable_diffusion_controlnet_reference.py:104
Method__call__
(self, source_image, motion_sequence, random_seed, step, guidance_scale, size=512)
demo/animate.py:128
Method__init__
Arguments: video_path (str): path or byte of the video to be loaded
magicanimate/utils/videoreader.py:37
Method__init__
( self, vae: AutoencoderKL, text_encoder: CLIPTextModel, tokenizer: CLIPTokeni
magicanimate/pipelines/pipeline_animation.py:76
Method__init__
( self, sample_size: Optional[int] = None, in_channels: int = 4, out_channels:
magicanimate/models/unet.py:61
Method__init__
Mutual self-attention control for Stable-Diffusion MODEl Args: total_steps: the total number of steps
magicanimate/models/mutual_self_attention.py:55
Method__init__
(self, unet, mode="write", do_classifier_free_guidance=Fal
magicanimate/models/mutual_self_attention.py:130
Method__init__
(self, *args, lora_layer: Optional[LoRALinearLayer] = None, **kwargs)
magicanimate/models/appearance_encoder.py:96
Method__init__
( self, sample_size: Optional[int] = None, in_channels: int = 4, out_channels:
magicanimate/models/appearance_encoder.py:217
Method__init__
( self, conditioning_embedding_channels: int, conditioning_channels: int = 3,
magicanimate/models/controlnet.py:59
Method__init__
( self, num_attention_heads: int = 16, attention_head_dim: int = 88, in_channe
magicanimate/models/orig_attention.py:93
Method__init__
( self, channels: int, num_head_channels: Optional[int] = None, norm_num_group
magicanimate/models/orig_attention.py:271
Method__init__
( self, dim: int, num_attention_heads: int, attention_head_dim: int, d
magicanimate/models/orig_attention.py:405
Method__init__
( self, query_dim: int, cross_attention_dim: Optional[int] = None, heads: int
magicanimate/models/orig_attention.py:531
Method__init__
( self, dim: int, dim_out: Optional[int] = None, mult: int = 4, dropou
magicanimate/models/orig_attention.py:751
Method__init__
(self, dim_in: int, dim_out: int)
magicanimate/models/orig_attention.py:815
Method__init__
(self, dim_in: int, dim_out: int)
magicanimate/models/orig_attention.py:837
Method__init__
(self, embedding_dim, num_embeddings)
magicanimate/models/orig_attention.py:851
next →1–100 of 239, ranked by callers