MCPcopy Create free account

hub / github.com/WuTao-CS/CustomCrafter / functions

Functions992 in github.com/WuTao-CS/CustomCrafter

↓ 78 callersFunctionexpand_dims
Expand the tensor `v` to the dim `dims`. Args: `v`: a PyTorch tensor with shape [N]. `dim`: a `int`. Returns: a
lvdm/models/samplers/dpm_solver/dpm_solver.py:1207
↓ 60 callersMethodload
Load model from file. Args: path (str): file path
extralibs/midas/midas/base_model.py:5
↓ 44 callersMethodregister_buffer
(self, name, attr)
lvdm/models/samplers/ddim.py:19
↓ 40 callersMethodload_state_dict
(self, state_dict, *args, **kwargs)
lvdm/modules/embedding_manager.py:160
↓ 39 callersFunctioninstantiate_from_config
(config, **kwargs)
utils/utils.py:35
↓ 27 callersMethodclose
Flush, close possible files, and remove stdout/stderr mirroring.
eval/dnnlib/util.py:103
↓ 24 callersMethodwrite
Write text to stdout (and a file) and optionally flush.
eval/dnnlib/util.py:81
↓ 23 callersMethodget_learned_conditioning
(self, c)
lvdm/models/ddpm3d.py:608
↓ 19 callersMethodmarginal_lambda
Compute lambda_t = log(alpha_t) - log(sigma_t) of a given continuous-time label t in [0, T].
lvdm/models/samplers/dpm_solver/dpm_solver.py:155
↓ 18 callersMethoddecode_first_stage
(self, z, **kwargs)
lvdm/models/ddpm3d.py:709
↓ 18 callersMethodmarginal_std
Compute sigma_t of a given continuous-time label t in [0, T].
lvdm/models/samplers/dpm_solver/dpm_solver.py:149
↓ 16 callersFunctionexists
(val)
lvdm/modules/networks/x_transformer.py:53
↓ 16 callersFunctionextract_into_tensor
(a, t, x_shape)
lvdm/common.py:28
↓ 16 callersMethodmarginal_log_mean_coeff
Compute log(alpha_t) of a given continuous-time label t in [0, T].
lvdm/models/samplers/dpm_solver/dpm_solver.py:129
↓ 15 callersMethod__init__
(self, *, ch, out_ch, ch_mult=(1,2,4,8), num_res_blocks, attn_resolutions, dropout=0.0, resam
lvdm/modules/networks/ae_modules.py:215
↓ 15 callersMethodmodel_fn
Convert the model to the noise prediction model or the data prediction model.
lvdm/models/samplers/dpm_solver/dpm_solver.py:408
↓ 14 callersMethodapply_model
(self, x_noisy, t, cond, **kwargs)
lvdm/models/ddpm3d.py:816
↓ 14 callersMethodencode
(self, x, **kwargs)
lvdm/models/autoencoder.py:97
↓ 13 callersFunctiondefault
(val, d)
lvdm/common.py:40
↓ 13 callersMethodregister_buffer
(self, name, attr)
lvdm/models/samplers/plms.py:18
↓ 13 callersMethodsample
(self, S, batch_size, shape, conditioning=None,
lvdm/models/samplers/ddim.py:66
↓ 12 callersMethod__init__
(self, value, fn)
lvdm/modules/networks/x_transformer.py:117
↓ 12 callersFunctionimg2tensor
Numpy array to tensor. Args: imgs (list[ndarray] | ndarray): Input images. bgr2rgb (bool): Whether to change bgr to rgb. f
extralibs/cond_api.py:10
↓ 11 callersMethoddecode
(self, z, **kwargs)
lvdm/models/autoencoder.py:104
↓ 11 callersMethodsave
(self, ckpt_path)
lvdm/modules/embedding_manager.py:155
↓ 10 callersMethod_inject_lora
inject lora to unet and text encoder
lvdm/models/ddpm3d_lora.py:216
↓ 10 callersFunctionget_activation
(name)
extralibs/midas/midas/vit.py:158
↓ 10 callersFunctionnonlinearity
(x)
lvdm/modules/networks/ae_modules.py:12
↓ 10 callersMethodq_sample
(self, x_start, t, noise=None)
lvdm/models/ddpm3d.py:306
↓ 9 callersFunctionNormalize
(in_channels, num_groups=32)
lvdm/modules/networks/ae_modules.py:17
↓ 9 callersMethod__init__
(self, dim_in, dim_out)
lvdm/modules/attention.py:422
↓ 8 callersMethod__init__
(self, embed_dim, n_classes=1000, key='class', ucg_rate=0.1)
lvdm/modules/encoders/condition.py:27
↓ 8 callersMethod_encode_image
(self, image)
eval/eval_clip.py:37
↓ 8 callersMethodpad
(self, *inputs)
eval/RAFT/core/utils_core/utils.py:18
↓ 7 callersMethod__init__
(self, channels)
extralibs/model_edge.py:388
↓ 7 callersFunctionconv_nd
Create a 1D, 2D, or 3D convolution module.
lvdm/basics.py:42
↓ 7 callersMethodget_loss
(self, pred, target, mean=True)
lvdm/models/ddpm3d.py:316
↓ 7 callersFunctionmake_attn
(in_channels, attn_type="vanilla")
lvdm/modules/networks/ae_modules.py:82
↓ 7 callersFunctionread_video_to_np
(video_path)
eval/eval_clip.py:11
↓ 7 callersFunctionresize_numpy_image
(image, max_resolution=512 * 512, resize_short_edge=None)
utils/utils.py:65
↓ 6 callersMethod__init__
(self, hidden_dim=128, input_dim=192+128)
eval/RAFT/core/update.py:17
↓ 6 callersMethod__init__
(self, txt_file, data_root, size=None,
lvdm/data/lsun.py:10
↓ 6 callersFunctioncheckpoint
Evaluate a function without caching intermediate activations, allowing for reduced memory at the expense of extra compute in the backward pas
lvdm/common.py:84
↓ 6 callersMethodconstrain_to_multiple_of
(self, x, min_val=0, max_val=None)
extralibs/midas/midas/transforms.py:94
↓ 6 callersFunctiondefault
(val, d)
lvdm/modules/networks/x_transformer.py:57
↓ 6 callersFunctionexists
(val)
lvdm/common.py:45
↓ 6 callersMethodget_input
(self, batch, k)
lvdm/models/ddpm3d.py:366
↓ 6 callersFunctionzero_module
Zero out the parameters of a module and return it.
lvdm/basics.py:25
↓ 5 callersMethod__init__
( self, prompts: List[str], words: [List[List[str]]], tokenizer, device, threshold=0.3, max_num_words=
lvdm/utils/ptp_utils.py:237
↓ 5 callersMethod_cal_sim
(self, feat1, feat2)
eval/eval_clip.py:55
↓ 5 callersFunction_make_scratch
(in_shape, out_shape, groups=1, expand=False)
extralibs/midas/midas/blocks.py:49
↓ 5 callersMethodget_time_steps
Compute the intermediate time steps for sampling. Args: skip_type: A `str`. The type for the spacing of the time steps. We suppor
lvdm/models/samplers/dpm_solver/dpm_solver.py:417
↓ 5 callersFunctionget_word_inds
(text: str, word_place: int, tokenizer)
lvdm/utils/ptp_utils.py:425
↓ 5 callersMethodinverse_lambda
Compute the continuous-time label t in [0, T] of a given half-logSNR lambda_t.
lvdm/models/samplers/dpm_solver/dpm_solver.py:163
↓ 5 callersMethodmode
(self)
lvdm/distributions.py:20
↓ 5 callersMethodsample
(self, batch_size=16, return_intermediates=False)
lvdm/models/ddpm3d.py:300
↓ 5 callersMethodtokenize
Returns the tokenized representation of given input string(s) Parameters ---------- texts : Union[str, List[str
lvdm/modules/encoders/custom_condition.py:176
↓ 4 callersMethod__init__
(self, aug_params=None, root='datasets/HD1k')
eval/RAFT/core/datasets.py:181
↓ 4 callersMethod__init__
(self, channels, use_conv, dims=2, out_channels=None, padding=1)
lvdm/modules/networks/openaimodel3d.py:94
↓ 4 callersMethod__init__
(self)
lvdm/modules/encoders/custom_condition.py:13
↓ 4 callersMethod__init__
Imagenet Superresolution Dataloader Performs following ops in order: 1. crops a crop of size s from image either as rando
lvdm/data/imagenet.py:273
↓ 4 callersMethod__init__
(self, unet_config, timesteps=1000, beta_schedule="linear",
lvdm/models/ddpm3d.py:76
↓ 4 callersMethod__init__
Init. Args: scale_factor (float): scaling mode (str): interpolation mode
extralibs/midas/midas/blocks.py:124
↓ 4 callersFunction_make_fusion_block
(features, use_bn)
extralibs/midas/midas/dpt_depth.py:15
↓ 4 callersFunction_make_vit_b16_backbone
( model, features=[96, 192, 384, 768], size=[384, 384], hooks=[2, 5, 8, 11], vit_features=
extralibs/midas/midas/vit.py:181
↓ 4 callersFunctioncollate_fn
(examples, with_prior_preservation)
custom.py:331
↓ 4 callersMethodconfigure_schedulers
(self, optimizer)
lvdm/models/ddpm3d.py:1181
↓ 4 callersMethodencode
(self, *args, **kwargs)
lvdm/modules/encoders/custom_condition.py:16
↓ 4 callersMethodencode_first_stage
(self, x)
lvdm/models/ddpm3d.py:681
↓ 4 callersFunctionextract_feat_from_np
(data,batch_size,i3d,device,progress=True)
utils/cal_fvd_text2video.py:29
↓ 4 callersMethodget_batch_input
(self, batch, random_uncond, return_first_stage_outputs=False, return_original_cond=False, is_imgbatch=False)
lvdm/models/ddpm3d.py:716
↓ 4 callersMethodget_last_layer
(self)
lvdm/models/autoencoder.py:174
↓ 4 callersFunctionlinear
Create a linear module.
lvdm/basics.py:55
↓ 4 callersFunctionload_model_checkpoint
(model, ckpt, is_pretrained=False)
pipeline/evaluation/timestep_inference.py:20
↓ 4 callersFunctionnoise_like
(shape, device, repeat=False)
lvdm/common.py:34
↓ 4 callersFunctionnoise_pred_fn
(x, t_continuous, cond=None)
lvdm/models/samplers/dpm_solver/dpm_solver.py:296
↓ 4 callersMethodpreprocess
(self, x)
lvdm/modules/encoders/condition.py:300
↓ 4 callersFunctionretrieve
(class_prompt, class_data_dir, num_class_images)
retrieve.py:25
↓ 3 callersMethod__init__
(self, output_dim=128, norm_fn='batch', dropout=0.0)
eval/RAFT/core/extractor.py:119
↓ 3 callersMethod__init__
(self, input_dim: int, output_dim: int, )
lvdm/models/ddpm3d_lora.py:294
↓ 3 callersMethod__init__
(self, start_index=1)
extralibs/midas/midas/vit.py:10
↓ 3 callersFunction_make_encoder
(backbone, features, use_pretrained, groups=1, expand=False, exportable=True, hooks=None, use_vit_only=False,
extralibs/midas/midas/blocks.py:11
↓ 3 callersMethod_make_layer
(self, dim, stride=1)
eval/RAFT/core/extractor.py:159
↓ 3 callersMethod_make_layer
(self, dim, stride=1)
eval/RAFT/core/extractor.py:235
↓ 3 callersFunction_text_lora_path
(path: str)
lvdm/models/lora.py:1078
↓ 3 callersMethodcompute_pad
(self, dim, s)
extralibs/pytorch_i3d.py:10
↓ 3 callersMethodcompute_pad
(self, dim, s)
extralibs/pytorch_i3d.py:77
↓ 3 callersMethoddpm_solver_first_update
DPM-Solver-1 (equivalent to DDIM) from time `s` to time `t`. Args: x: A pytorch tensor. The initial value at time `s`.
lvdm/models/samplers/dpm_solver/dpm_solver.py:513
↓ 3 callersMethodencode
(self, *args, **kwargs)
lvdm/modules/encoders/condition.py:16
↓ 3 callersFunctionfrechet_distance
(x1, x2)
utils/fvd_utils.py:112
↓ 3 callersMethodget_empty_store
()
lvdm/utils/ptp_utils.py:187
↓ 3 callersMethodget_first_stage_encoding
(self, encoder_posterior, noise=None)
lvdm/models/ddpm3d.py:671
↓ 3 callersMethodget_input
(self, batch, k)
lvdm/models/autoencoder.py:118
↓ 3 callersFunctionget_logits
(i3d, videos, device, batch_size=None)
utils/fvd_utils.py:141
↓ 3 callersFunctionget_obj_from_module
Traverses the object name and returns the last (rightmost) python object.
eval/dnnlib/util.py:266
↓ 3 callersFunctionimg2tensor
Numpy array to tensor. Args: imgs (list[ndarray] | ndarray): Input images. bgr2rgb (bool): Whether to change bgr to rgb.
extralibs/model_edge.py:16
↓ 3 callersMethodmarginal_alpha
Compute alpha_t of a given continuous-time label t in [0, T].
lvdm/models/samplers/dpm_solver/dpm_solver.py:143
↓ 3 callersFunctionnormalization
Make a standard normalization layer. :param channels: number of input channels. :return: an nn.Module for normalization.
lvdm/basics.py:87
↓ 3 callersMethodp_sample_ddim
(self, x, c, t, index, repeat_noise=False, use_original_steps=False, quantize_denoised=False,
lvdm/models/samplers/ddim.py:235
↓ 3 callersFunctionparse_safeloras
Converts a loaded safetensor file that contains a set of module Loras into Parameters and other information Output is a dictionary o
lvdm/models/lora.py:576
next →1–100 of 992, ranked by callers