MCPcopy Create free account

hub / github.com/ali-vilab/videocomposer / functions

Functions561 in github.com/ali-vilab/videocomposer

↓ 86 callersFunction_i
r"""Index tensor using t and format the output according to x.
artist/ops/diffusion.py:9
↓ 26 callersMethod__init__
(self, dim_in, dim_out)
tools/videocomposer/unet_sd.py:441
↓ 21 callersFunctionDOWNLOAD_TO_CACHE
r"""Download OSS [file or folder] to the cache folder. Only the 0th process on each node will run the downloading. Barrier all proce
artist/__init__.py:10
↓ 21 callersMethodmarginal_std
Compute sigma_t of a given continuous-time label t in [0, T].
artist/ops/dpm_solver.py:157
↓ 19 callersMethodmarginal_lambda
Compute lambda_t = log(alpha_t) - log(sigma_t) of a given continuous-time label t in [0, T].
artist/ops/dpm_solver.py:163
↓ 18 callersFunctionget_world_size
(group=None)
artist/ops/distributed.py:44
↓ 18 callersMethodload_state_dict
(self, state_dict)
artist/optim/lr_scheduler.py:53
↓ 16 callersFunctionconvert_pdc
(op, weight)
tools/annotator/sketch/pidinet.py:346
↓ 16 callersMethodmarginal_log_mean_coeff
Compute log(alpha_t) of a given continuous-time label t in [0, T].
artist/ops/dpm_solver.py:138
↓ 15 callersMethodmodel_fn
Convert the model to the noise prediction model or the data prediction model.
artist/ops/dpm_solver.py:568
↓ 14 callersFunctionload_Block
(state, prefix, new_prefix=None)
tools/videocomposer/unet_sd.py:20
↓ 13 callersMethodread
(self, tfs)
artist/ops/utils.py:715
↓ 11 callersFunctionexpand_dims
Expand the tensor `v` to the dim `dims`. Args: `v`: a PyTorch tensor with shape [N]. `dim`: a `int`. Returns: a
artist/ops/dpm_solver.py:1382
↓ 9 callersMethod__init__
(self, *, ch, out_ch, ch_mult=(1,2,4,8), num_res_blocks, attn_resolutions, dropout=0.0, resam
tools/videocomposer/autoencoder.py:284
↓ 8 callersMethod_scale_timesteps
(self, t)
artist/ops/diffusion.py:476
↓ 8 callersFunctionexists
(x)
tools/videocomposer/unet_sd.py:180
↓ 8 callersFunctionrand_name
(length=8, suffix='')
artist/ops/utils.py:251
↓ 8 callersFunctionread
(filename, mode='r', retry=5)
artist/ops/utils.py:108
↓ 7 callersMethod_scale_timesteps
(self, t)
artist/ops/diffusion.py:1007
↓ 7 callersMethodddim_sample_loop
(self, noise, model, model_kwargs={}, clamp=None, percentile=None, condition_fn=None, guide_scale=None, ddim_t
artist/ops/diffusion.py:227
↓ 7 callersFunctionnoise_pred_fn
(x, t_continuous, cond=None)
artist/ops/dpm_solver.py:300
↓ 7 callersMethodp_mean_variance
r"""Distribution of p(x_{t-1} | x_t).
artist/ops/diffusion.py:582
↓ 6 callersFunctionNormalize
(in_channels, num_groups=32)
tools/videocomposer/autoencoder.py:12
↓ 6 callersMethod__init__
(self, channels)
tools/annotator/sketch/pidinet.py:448
↓ 6 callersFunctionconfig_model_converted
(model)
tools/annotator/sketch/pidinet.py:334
↓ 6 callersMethoddecode
(self, z)
tools/videocomposer/autoencoder.py:553
↓ 6 callersFunctiondefault
(val, d)
tools/videocomposer/unet_sd.py:183
↓ 6 callersMethodmarginal_alpha
Compute alpha_t of a given continuous-time label t in [0, T].
artist/ops/dpm_solver.py:151
↓ 6 callersFunctionparse_oss_url
(path)
artist/ops/utils.py:73
↓ 6 callersFunctionprepare_model_kwargs
(partial_keys, full_model_kwargs, use_fps_condition)
tools/videocomposer/inference_multi.py:811
↓ 6 callersFunctionvisualize_with_model_kwargs
(model_kwargs, video_data, autoencoder,
tools/videocomposer/inference_multi.py:826
↓ 5 callersMethod__init__
(self, image_size=384, patch_size=16, dim=1024,
artist/models/midas.py:166
↓ 5 callersFunction_clip
(name, pretrained=False, **kwargs)
artist/models/clip.py:321
↓ 5 callersFunctionall_reduce
(tensor, op=dist.ReduceOp.SUM, group=None, **kwargs)
artist/ops/distributed.py:67
↓ 5 callersFunctionconfig_model
(model)
tools/annotator/sketch/pidinet.py:322
↓ 5 callersFunctionconvert_pidinet
(state_dict, config)
tools/annotator/sketch/pidinet.py:371
↓ 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
artist/ops/dpm_solver.py:577
↓ 5 callersMethodinverse_lambda
Compute the continuous-time label t in [0, T] of a given half-logSNR lambda_t.
artist/ops/dpm_solver.py:171
↓ 5 callersFunctionnonlinearity
(x)
tools/videocomposer/autoencoder.py:8
↓ 5 callersMethodp_mean_variance
r"""Distribution of p(x_{t-1} | x_t).
artist/ops/diffusion.py:134
↓ 5 callersMethodq_posterior_mean_variance
r"""Distribution of q(x_{t-1} | x_t, x_0).
artist/ops/diffusion.py:94
↓ 5 callersMethodsample
(self)
tools/videocomposer/autoencoder.py:26
↓ 5 callersFunctionzero_module
Zero out the parameters of a module and return it.
tools/videocomposer/unet_sd.py:449
↓ 4 callersMethod__init__
(self, embed_dim=512, image_size=224, patch_size=16,
artist/models/clip.py:215
↓ 4 callersMethod_merge_cfg_from_base
(self, cfg_base, cfg_new, preserve_base=False)
utils/config.py:170
↓ 4 callersFunctionadd_JPEG_noise
(img)
artist/ops/degration.py:787
↓ 4 callersFunctioncalculate_weights_indices
(in_length, out_length, scale, kernel, kernel_width, antialiasing)
artist/ops/degration.py:221
↓ 4 callersMethoddecode
(self, tokens)
artist/data/tokenizers.py:131
↓ 4 callersFunctionfspecial
python code from: https://github.com/ronaldosena/imagens-medicas-2/blob/40171a6c259edec7827a6693a93955de2bd39e76/Aulas/aula_2_-_uniform_fil
artist/ops/degration.py:603
↓ 4 callersFunctionget_rank
(group=None)
artist/ops/distributed.py:47
↓ 4 callersFunctionis_dist_initialized
()
artist/ops/distributed.py:41
↓ 4 callersFunctionkl_divergence
(mu1, logvar1, mu2, logvar2)
artist/ops/losses.py:6
↓ 4 callersMethodq_sample
r"""Sample from q(x_t | x_0).
artist/ops/diffusion.py:524
↓ 4 callersMethodsample
Compute the sample at time `t_end` by DPM-Solver, given the initial `x` at time `t_start`. =========================================
artist/ops/dpm_solver.py:1170
↓ 4 callersMethodvariational_lower_bound
(self, x0, xt, t, model, model_kwargs={}, clamp=None, percentile=None)
artist/ops/diffusion.py:423
↓ 4 callersFunctionvideo_tensor_to_gif
(tensor, path, duration = 120, loop = 0, optimize = True)
artist/ops/utils.py:279
↓ 3 callersFunction_all_gather
(x)
artist/ops/distributed.py:276
↓ 3 callersFunction_all_reduce
(x)
artist/ops/distributed.py:286
↓ 3 callersMethod_forward_single
(self, module, x, e, context, time_rel_pos_bias, focus_present_mask, video_mask, reference=None)
tools/videocomposer/unet_sd.py:1648
↓ 3 callersMethod_path_join
(self, path_list)
utils/config.py:88
↓ 3 callersFunction_split
(x)
artist/ops/distributed.py:292
↓ 3 callersMethodbroadcast
(self, src, dst)
tools/videocomposer/unet_sd.py:1869
↓ 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`.
artist/ops/dpm_solver.py:671
↓ 3 callersMethoddump
(self)
utils/config.py:246
↓ 3 callersMethodencode
(self, x)
tools/videocomposer/autoencoder.py:547
↓ 3 callersFunctionget_model_input_time
Convert the continuous-time `t_continuous` (in [epsilon, T]) to the model input time. For discrete-time DPMs, we convert `t_continuou
artist/ops/dpm_solver.py:289
↓ 3 callersFunctionimresize_np
(img, scale, antialiasing=True)
artist/ops/degration.py:350
↓ 3 callersFunctionpidinet_bsd
(pretrained=False, vanilla_cnn=True)
tools/annotator/sketch/pidinet.py:732
↓ 3 callersMethodq_posterior_mean_variance
r"""Distribution of q(x_{t-1} | x_t, x_0).
artist/ops/diffusion.py:540
↓ 3 callersFunctionsingle2uint
(img)
artist/ops/degration.py:43
↓ 3 callersMethodsinglestep_dpm_solver_second_update
Singlestep solver DPM-Solver-2 from time `s` to time `t`. Args: x: A pytorch tensor. The initial value at time `s`.
artist/ops/dpm_solver.py:718
↓ 3 callersFunctionsinusoidal_embedding
(timesteps, dim)
tools/videocomposer/unet_sd.py:166
↓ 3 callersFunctionsketch_simplification_gan
(pretrained=False)
tools/annotator/sketch/sketch_simplification.py:81
↓ 3 callersFunctionssim
(img1, img2)
artist/ops/degration.py:185
↓ 3 callersMethodto_rgb
(self, x)
tools/videocomposer/autoencoder.py:603
↓ 3 callersFunctionuint2single
(img)
artist/ops/degration.py:40
↓ 3 callersMethodvariational_lower_bound
(self, x0, xt, t, model, model_kwargs={}, clamp=None, percentile=None, reduction='mean')
artist/ops/diffusion.py:949
↓ 2 callersMethod__init__
(self, size)
tools/videocomposer/inference_single.py:189
↓ 2 callersMethod__init__
(self, size)
tools/videocomposer/inference_multi.py:189
↓ 2 callersFunction_pad_to_largest_tensor
(tensor, group)
artist/ops/distributed.py:165
↓ 2 callersMethod_rms
(tensor)
artist/optim/adafactor.py:129
↓ 2 callersFunction_serialize_to_tensor
(data, group)
artist/ops/distributed.py:150
↓ 2 callersMethod_tokenizer
(self, text)
artist/data/tokenizers.py:155
↓ 2 callersFunctionadd_Gaussian_noise
(img, noise_level1=2, noise_level2=25)
artist/ops/degration.py:741
↓ 2 callersFunctionadd_blur_2
(img, sf=4)
artist/ops/degration.py:876
↓ 2 callersFunctionanisotropic_Gaussian
generate an anisotropic Gaussian kernel Args: ksize : e.g., 15, kernel size theta : [0, pi], rotation angle range l1
artist/ops/degration.py:466
↓ 2 callersFunctionbicubic_degradation
Args: x: HxWxC image, [0, 1] sf: down-scale factor Return: bicubicly downsampled LR image
artist/ops/degration.py:619
↓ 2 callersFunctionbytes_to_unicode
Returns list of utf-8 byte and a corresponding list of unicode strings. The reversible bpe codes work on unicode strings. This means y
artist/data/tokenizers.py:21
↓ 2 callersFunctioncubic
(x)
artist/ops/degration.py:214
↓ 2 callersMethoddata_prediction_fn
Return the data prediction model (with thresholding).
artist/ops/dpm_solver.py:552
↓ 2 callersFunctiondefault_bpe
()
artist/data/tokenizers.py:15
↓ 2 callersFunctiondiscretized_gaussian_log_likelihood
(x0, mean, log_scale)
artist/ops/losses.py:14
↓ 2 callersFunctiongeneralized_all_gather
(data, group=None)
artist/ops/distributed.py:189
↓ 2 callersFunctionget_global_gloo_group
()
artist/ops/distributed.py:142
↓ 2 callersFunctionget_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
artist/data/tokenizers.py:42
↓ 2 callersMethodget_palette_image
(self, hist, percentile=90, width=200, height=50)
tools/annotator/histogram/palette.py:86
↓ 2 callersFunctioninterpolate_fn
A piecewise linear function y = f(x), using xp and yp as keypoints. We implement f(x) in a differentiable way (i.e. applicable for autograd).
artist/ops/dpm_solver.py:1341
↓ 2 callersMethodmultistep_dpm_solver_update
Multistep DPM-Solver with the order `order` from time `t_prev_list[-1]` to time `t`. Args: x: A pytorch tensor. The init
artist/ops/dpm_solver.py:1056
↓ 2 callersMethodnoise_prediction_fn
Return the noise prediction model.
artist/ops/dpm_solver.py:546
↓ 2 callersMethodq_sample
r"""Sample from q(x_t | x_0).
artist/ops/diffusion.py:79
next →1–100 of 561, ranked by callers