MCPcopy Create free account

hub / github.com/G-U-N/AnimateLCM / functions

Functions274 in github.com/G-U-N/AnimateLCM

↓ 48 callersMethodto
(self, device)
animatelcm_sd15/animatelcm/utils/lcm_utils.py:112
↓ 44 callersMethodto
(self,device,dtype)
animatelcm_svd/animate_lcm_utils.py:90
↓ 13 callersFunctionassign_to_checkpoint
This does the final conversion step: take locally converted weights and apply a global renaming to them. It splits attention layers, and take
animatelcm_sd15/animatelcm/utils/convert_from_ckpt.py:144
↓ 7 callersFunctionextract_into_tensor
(a, t, x_shape)
animatelcm_sd15/animatelcm/utils/lcm_utils.py:80
↓ 6 callersFunction_copy_linear
(hf_linear, pt_linear)
animatelcm_sd15/animatelcm/utils/convert_from_ckpt.py:667
↓ 6 callersFunctionrenew_resnet_paths
Updates paths inside resnets to the new naming scheme (local renaming)
animatelcm_sd15/animatelcm/utils/convert_from_ckpt.py:63
↓ 5 callersFunctionget_motion_module
( in_channels, motion_module_type: str, motion_module_kwargs: dict )
animatelcm_sd15/animatelcm/models/motion_module.py:36
↓ 5 callersFunctionshave_segments
Removes segments. Positive values shave the first segments, negative shave the last segments.
animatelcm_sd15/animatelcm/utils/convert_from_ckpt.py:53
↓ 4 callersMethod__init__
( self, in_channels: int, prev_output_channel: int, out_channels: int,
animatelcm_sd15/animatelcm/models/unet_blocks.py:809
↓ 4 callersMethod__init__
( self, d_model, dropout=0., )
animatelcm_sd15/animatelcm/models/motion_module.py:227
↓ 4 callersFunctionconvert_ldm_unet_checkpoint
Takes a state dict and a config, and returns a converted checkpoint.
animatelcm_sd15/animatelcm/utils/convert_from_ckpt.py:320
↓ 4 callersFunctionexport_to_gif
Export a list of frames to a GIF. Args: - frames (list): List of frames (as numpy arrays or PIL Image objects). - output_gif_path (s
animatelcm_svd/train_svd_lcm.py:241
↓ 4 callersFunctionget_logits
(i3d, videos, device)
metrics/fvd.py:120
↓ 4 callersFunctionpreprocess
(videos, target_resolution)
metrics/fvd.py:18
↓ 4 callersFunctionrandn_tensor
A helper function to create random tensors on the desired `device` with the desired `dtype`. When passing a list of generators, you can seed each
animatelcm_sd15/animatelcm/scheduler/lcm_scheduler.py:136
↓ 4 callersFunctionrenew_vae_resnet_paths
Updates paths inside resnets to the new naming scheme (local renaming)
animatelcm_sd15/animatelcm/utils/convert_from_ckpt.py:85
↓ 4 callersFunctionsave_videos_grid
(videos: torch.Tensor, path: str, rescale=False, n_rows=6, fps=8)
animatelcm_sd15/animatelcm/utils/util.py:67
↓ 4 callersMethodstep
Predict the sample from the previous timestep by reversing the SDE. This function propagates the diffusion process from the learned m
animatelcm_svd/animatelcm_scheduler.py:334
↓ 3 callersMethod__init__
(self, num_channels: int, flip_sin_to_cos: bool, downscale_freq_shift: float)
animatelcm_sd15/animatelcm/models/embeddings.py:105
↓ 3 callersMethod__init__
(self, channels, use_conv=False, use_conv_transpose=False, out_channels=None, name="conv")
animatelcm_sd15/animatelcm/models/resnet.py:34
↓ 3 callersMethodcompute_pad
(self, dim, s)
metrics/pytorch_i3d.py:16
↓ 3 callersMethodcompute_pad
(self, dim, s)
metrics/pytorch_i3d.py:83
↓ 3 callersFunctionconvert_lcm_lora
(unet, path, alpha=1.0)
animatelcm_sd15/animatelcm/utils/lcm_utils.py:142
↓ 3 callersFunctionconvert_ldm_vae_checkpoint
(checkpoint, config)
animatelcm_sd15/animatelcm/utils/convert_from_ckpt.py:551
↓ 3 callersFunctionconvert_lora
(pipeline, state_dict, LORA_PREFIX_UNET="lora_unet", LORA_PREFIX_TEXT_ENCODER="lora_te", alpha=0.6)
animatelcm_sd15/animatelcm/utils/convert_lora_safetensor_to_diffusers.py:50
↓ 3 callersMethodfrom_pretrained_2d
(cls, pretrained_model_path, subfolder=None, unet_additional_kwargs=None)
animatelcm_sd15/animatelcm/models/unet.py:523
↓ 3 callersFunctionrenew_attention_paths
Updates paths inside attentions to the new naming scheme (local renaming)
animatelcm_sd15/animatelcm/utils/convert_from_ckpt.py:101
↓ 3 callersFunctionzero_module
(module)
animatelcm_sd15/animatelcm/models/adapter.py:9
↓ 2 callersMethod__init__
(self, channels=[320, 640, 1280, 1280], nums_rb=3, cin=64, ksize=3, sk=False, use_conv=True)
animatelcm_sd15/animatelcm/models/adapter.py:61
↓ 2 callersMethod__init__
Initializes Unit3D module.
metrics/pytorch_i3d.py:51
↓ 2 callersMethod_convert_to_karras
Constructs the noise schedule of Karras et al. (2022).
animatelcm_svd/animatelcm_scheduler.py:270
↓ 2 callersFunction_filter2d
(input, kernel)
animatelcm_svd/pipeline.py:654
↓ 2 callersFunction_filter2d
(input, kernel)
animatelcm_svd/train_svd_lcm.py:169
↓ 2 callersFunction_gaussian
(window_size: int, sigma)
animatelcm_svd/pipeline.py:679
↓ 2 callersFunction_gaussian
(window_size: int, sigma)
animatelcm_svd/train_svd_lcm.py:194
↓ 2 callersMethod_init_step_index
(self, timestep)
animatelcm_svd/animatelcm_scheduler.py:317
↓ 2 callersFunction_symmetric_matrix_square_root
(mat, eps=1e-10)
metrics/fvd.py:45
↓ 2 callersFunctionalpha_bar_fn
(t)
animatelcm_sd15/animatelcm/scheduler/lcm_scheduler.py:78
↓ 2 callersFunctionconv_attn_to_linear
(checkpoint)
animatelcm_sd15/animatelcm/utils/convert_from_ckpt.py:195
↓ 2 callersFunctionconvert_ldm_clip_checkpoint
(checkpoint)
animatelcm_sd15/animatelcm/utils/convert_from_ckpt.py:708
↓ 2 callersFunctioncov
Estimate a covariance matrix given data. Covariance indicates the level to which two variables vary together. If we examine N-dimensional sam
metrics/fvd.py:57
↓ 2 callersMethodforward
(self, hidden_states)
animatelcm_sd15/animatelcm/models/resnet.py:251
↓ 2 callersFunctionlogsnr_schedule_cosine_shifted
(t, image_d, noise_d, logsnr_min, logsnr_max)
animatelcm_svd/train_svd_lcm.py:86
↓ 2 callersMethodrefresh_personalized_model
(self)
animatelcm_sd15/app-i2v.py:86
↓ 2 callersMethodrefresh_personalized_model
(self)
animatelcm_sd15/app.py:86
↓ 2 callersFunctionrenew_vae_attention_paths
Updates paths inside attentions to the new naming scheme (local renaming)
animatelcm_sd15/animatelcm/utils/convert_from_ckpt.py:114
↓ 2 callersMethodsample_params
(self, indices)
animatelcm_svd/animate_lcm_utils.py:53
↓ 2 callersMethodsigma_to_t
Gets scaled timesteps from the Karras sigmas for input to the consistency model. Args: sigmas (`float` or `np.ndarray`):
animatelcm_svd/animatelcm_scheduler.py:168
↓ 2 callersFunctiontensor_to_vae_latent
(t, vae)
animatelcm_svd/train_svd_lcm.py:263
↓ 1 callersMethod__init__
( self, num_attention_heads: int = 16, attention_head_dim: int = 88, in_channe
animatelcm_sd15/animatelcm/models/attention.py:30
↓ 1 callersFunction_append_dims
Appends dimensions to the end of a tensor until it has target_dims dimensions.
animatelcm_svd/pipeline.py:38
↓ 1 callersFunction_compute_padding
Compute padding tuple.
animatelcm_svd/pipeline.py:631
↓ 1 callersFunction_compute_padding
Compute padding tuple.
animatelcm_svd/train_svd_lcm.py:146
↓ 1 callersFunction_copy_attn_layer
(hf_attn_layer, pt_attn_layer)
animatelcm_sd15/animatelcm/utils/convert_from_ckpt.py:659
↓ 1 callersFunction_copy_layer
(hf_layer, pt_layer)
animatelcm_sd15/animatelcm/utils/convert_from_ckpt.py:671
↓ 1 callersFunction_copy_layers
(hf_layers, pt_layers)
animatelcm_sd15/animatelcm/utils/convert_from_ckpt.py:684
↓ 1 callersMethod_encode_image
( self, image, device, num_videos_per_prompt, do_classifier_free_guidance )
animatelcm_svd/pipeline.py:120
↓ 1 callersMethod_encode_prompt
(self, prompt, device, num_videos_per_prompt, do_classifier_free_guidance, negative_prompt)
animatelcm_sd15/animatelcm/pipelines/pipeline_animation.py:160
↓ 1 callersMethod_encode_vae_image
( self, image: torch.Tensor, device, num_videos_per_prompt, do_classif
animatelcm_svd/pipeline.py:166
↓ 1 callersFunction_gaussian_blur2d
(input, kernel_size, sigma)
animatelcm_svd/pipeline.py:698
↓ 1 callersFunction_gaussian_blur2d
(input, kernel_size, sigma)
animatelcm_svd/train_svd_lcm.py:211
↓ 1 callersFunction_get_add_time_ids
( fps, motion_bucket_id, noise_aug_strength, dtype, batch_size, )
animatelcm_svd/train_svd_lcm.py:930
↓ 1 callersMethod_get_add_time_ids
( self, fps, motion_bucket_id, noise_aug_strength, dtype, batc
animatelcm_svd/pipeline.py:189
↓ 1 callersMethod_init_step_index
(self, timestep)
animatelcm_sd15/animatelcm/scheduler/lcm_scheduler.py:315
↓ 1 callersFunction_resize_with_antialiasing
(input, size, interpolation="bicubic", align_corners=True)
animatelcm_svd/pipeline.py:600
↓ 1 callersFunction_resize_with_antialiasing
(input, size, interpolation="bicubic", align_corners=True)
animatelcm_svd/train_svd_lcm.py:116
↓ 1 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
animatelcm_sd15/animatelcm/scheduler/lcm_scheduler.py:353
↓ 1 callersFunctionadjust_colors
(src_img, target_img)
animatelcm_sd15/animatelcm/utils/util.py:45
↓ 1 callersFunctionappend_dims
Appends dimensions to the end of a tensor until it has target_dims dimensions.
animatelcm_svd/animate_lcm_utils.py:18
↓ 1 callersFunctionavg_pool_nd
Create a 1D, 2D, or 3D average pooling module.
animatelcm_sd15/animatelcm/models/adapter.py:37
↓ 1 callersFunctionbetas_for_alpha_bar
Create a beta schedule that discretizes the given alpha_t_bar function, which defines the cumulative product of (1-beta) over time from t = [
animatelcm_sd15/animatelcm/scheduler/lcm_scheduler.py:53
↓ 1 callersMethodbuild
(self)
metrics/pytorch_i3d.py:334
↓ 1 callersMethodcheck_inputs
(self, prompt, height, width, callback_steps)
animatelcm_sd15/animatelcm/pipelines/pipeline_animation.py:309
↓ 1 callersMethodcheck_inputs
(self, image, height, width)
animatelcm_svd/pipeline.py:258
↓ 1 callersFunctionconv_nd
Create a 1D, 2D, or 3D convolution module.
animatelcm_sd15/animatelcm/models/adapter.py:16
↓ 1 callersFunctionconvert_motion_lora_ckpt_to_diffusers
(pipeline, state_dict, alpha=1.0)
animatelcm_sd15/animatelcm/utils/convert_lora_safetensor_to_diffusers.py:26
↓ 1 callersFunctioncreate_unet_diffusers_config
Creates a config for the diffusers based on the config of the LDM model.
animatelcm_sd15/animatelcm/utils/convert_from_ckpt.py:207
↓ 1 callersFunctionddim_loop
(pipeline, ddim_scheduler, latent, num_inv_steps, prompt)
animatelcm_sd15/animatelcm/utils/util.py:122
↓ 1 callersMethoddecode_latents
(self, latents, image_path)
animatelcm_sd15/animatelcm/pipelines/pipeline_animation.py:255
↓ 1 callersMethoddecode_latents
(self, latents, num_frames, decode_chunk_size=14)
animatelcm_svd/pipeline.py:219
↓ 1 callersFunctionencode_image
(pixel_values)
animatelcm_svd/train_svd_lcm.py:909
↓ 1 callersMethodencode_img
(self, image_path, height, width)
animatelcm_sd15/animatelcm/pipelines/pipeline_animation.py:360
↓ 1 callersMethodeuler_solver
(self, model_output, sample, indices, indices_next)
animatelcm_svd/animate_lcm_utils.py:78
↓ 1 callersFunctionexport_to_video
(video_frames, output_video_path, fps)
animatelcm_svd/train_svd_lcm.py:229
↓ 1 callersFunctionfixed_positional_embedding
(t, d_model)
animatelcm_sd15/animatelcm/models/adapter.py:50
↓ 1 callersMethodforward
(self, x)
metrics/pytorch_i3d.py:90
↓ 1 callersFunctionfrechet_distance
(x1, x2)
metrics/fvd.py:90
↓ 1 callersMethodget_alpha
(self, image_only_indicator: torch.Tensor)
animatelcm_sd15/animatelcm/models/resnet.py:285
↓ 1 callersMethodget_batch
(self, idx)
animatelcm_svd/dataset.py:37
↓ 1 callersFunctionget_down_block
( down_block_type, num_layers, in_channels, out_channels, temb_channels, add_downsampl
animatelcm_sd15/animatelcm/models/unet_blocks.py:11
↓ 1 callersFunctionget_noise_pred_single
(latents, t, context, unet)
animatelcm_sd15/animatelcm/utils/util.py:116
↓ 1 callersFunctionget_safetensors_files
()
animatelcm_svd/app.py:20
↓ 1 callersMethodget_scalings_for_boundary_condition
Gets the scalings used in the consistency model parameterization (from Appendix C of the [paper](https://huggingface.co/papers/2303.0
animatelcm_svd/animatelcm_scheduler.py:289
↓ 1 callersMethodget_scalings_for_boundary_condition_discrete
(self, timestep)
animatelcm_sd15/animatelcm/scheduler/lcm_scheduler.py:547
↓ 1 callersFunctionget_timestep_embedding
This matches the implementation in Denoising Diffusion Probabilistic Models: Create sinusoidal timestep embeddings. :param timesteps: a 1-D
animatelcm_sd15/animatelcm/models/embeddings.py:21
↓ 1 callersFunctionget_up_block
( up_block_type, num_layers, in_channels, out_channels, prev_output_channel, temb_chan
animatelcm_sd15/animatelcm/models/unet_blocks.py:95
↓ 1 callersFunctioninit_prompt
(prompt, pipeline)
animatelcm_sd15/animatelcm/utils/util.py:84
↓ 1 callersFunctionload_weights
( animation_pipeline, motion_module_path = "", motion_module_lora_configs = [], dreamb
animatelcm_sd15/animatelcm/utils/util.py:140
↓ 1 callersFunctionlogsnr_schedule_cosine
(t, logsnr_min, logsnr_max)
animatelcm_svd/train_svd_lcm.py:81
↓ 1 callersFunctionlogsnr_schedule_cosine_interpolated
(t, image_d, noise_d_low, noise_d_high, logsnr_min, logsnr_max)
animatelcm_svd/train_svd_lcm.py:90
next →1–100 of 274, ranked by callers