MCPcopy Create free account

hub / github.com/SHI-Labs/Versatile-Diffusion / functions

Functions773 in github.com/SHI-Labs/Versatile-Diffusion

↓ 2 callersFunctioncreate_myexamples
Top-level synchronous function that creates Examples. Provided for backwards compatibility, i.e. so that gr.Examples(...) can be used to create the Ex
cusomized_gradio_blocks.py:32
↓ 2 callersMethoddecode
(self, text)
lib/model_zoo/bert.py:69
↓ 2 callersMethoddecode
generate samples from z given strategy Args: z: [batch, nsamples, nz] strategy: "beam" or "greedy" or "sample"
lib/model_zoo/optimus.py:196
↓ 2 callersMethoddecode
Converts a sequence of ids (integer) in a string, using the tokenizer and vocabulary with options to remove special tokens and clean
lib/model_zoo/optimus_models/tokenization_utils.py:733
↓ 2 callersFunctionedict_2_dict
(x)
lib/cfg_helper.py:588
↓ 2 callersMethodencode_trainable
(self, x, out_posterior=False)
lib/model_zoo/autokl.py:34
↓ 2 callersMethodeval_cond_ll
compute log p(x|z)
lib/model_zoo/optimus.py:367
↓ 2 callersMethodeval_inference_dist
this function computes log q(z | x) Args: z: tensor different z points that will be evaluated, with
lib/model_zoo/optimus.py:478
↓ 2 callersMethodeval_prior_dist
perform grid search to calculate the true posterior Args: zrange: tensor different z points that will be evaluated
lib/model_zoo/optimus.py:339
↓ 2 callersMethodfind_in_interval
(self, n)
lib/model_zoo/common/get_scheduler.py:218
↓ 2 callersFunctionget_ckpt_path
(*args, **kwargs)
lib/model_zoo/autokl_utils.py:225
↓ 2 callersFunctionget_experiment_id
(ref=None)
lib/cfg_helper.py:255
↓ 2 callersMethodget_input
(self, batch, k)
lib/model_zoo/autokl.py:66
↓ 2 callersMethodget_loss
(self, pred, target, mean=True)
lib/model_zoo/vd.py:226
↓ 2 callersFunctionget_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
lib/model_zoo/optimus_models/tokenization_gpt2.py:88
↓ 2 callersFunctionget_world_size
(type='local')
lib/sync.py:45
↓ 2 callersFunctionhighlight_print
(info)
app.py:41
↓ 2 callersMethodinitialize
(self, input)
lib/model_zoo/autokl_utils.py:17
↓ 2 callersMethodis_better
(self, x)
lib/utils.py:50
↓ 2 callersMethodmake_schedule
(self, ddim_num_steps, ddim_discretize="uniform", ddim_eta=0., verbose=True)
lib/model_zoo/ddim.py:23
↓ 2 callersFunctionnoise_like
(x, repeat=False)
lib/model_zoo/diffusion_utils.py:235
↓ 2 callersFunctionnormalize_tensor
(x,eps=1e-10)
lib/model_zoo/autokl_utils.py:218
↓ 2 callersMethodregister_stage
(self, stage)
lib/utils.py:431
↓ 2 callersFunctionremove_duplicate_word
(tx)
app.py:129
↓ 2 callersMethodsample_from_inference
perform sampling from inference net Returns: Tensor Tensor: samples from infernece nets with shape (batch_size, ns
lib/model_zoo/optimus.py:405
↓ 2 callersMethodsample_multicontext
(self, steps, shape, x_inf
lib/model_zoo/ddim.py:174
↓ 2 callersFunctionsplit_s3_path
Split a full s3 path into the bucket name and path.
lib/model_zoo/optimus_models/file_utils.py:158
↓ 2 callersMethodtie_weights
Make sure we are sharing the input and output embeddings. Export to TorchScript can't handle parameter sharing so we are cloning them ins
lib/model_zoo/optimus_models/optimus_gpt2.py:1077
↓ 2 callersMethodto_json_string
Serializes this instance to a JSON string.
lib/model_zoo/optimus_models/configuration_utils.py:198
↓ 2 callersMethodto_rgb
(self, x)
lib/model_zoo/autokl.py:134
↓ 2 callersMethodtrain_summary
(self, itern, epochn, samplen, lr, tbstep=None)
lib/log_service.py:106
↓ 2 callersMethodtrick_update_trainloader
(self, trainloader)
lib/utils.py:312
↓ 1 callersMethod__init__
(self, vae_cfg_list, ctx_cfg_list, diffuser_cfg_list,
lib/model_zoo/vd.py:43
↓ 1 callersMethod_attn
(self, q, k, v, attention_mask=None, head_mask=None)
lib/model_zoo/optimus_models/optimus_gpt2.py:144
↓ 1 callersMethod_clean_text
Performs invalid character removal and whitespace cleanup on text.
lib/model_zoo/optimus_models/tokenization_bert.py:346
↓ 1 callersMethod_convert_token_to_id
Converts a token (str/unicode) in an id using the vocab.
lib/model_zoo/optimus_models/tokenization_gpt2.py:188
↓ 1 callersMethod_encode_wmask
(self, images, masks)
lib/model_zoo/clip.py:104
↓ 1 callersMethod_from_pretrained
(cls, pretrained_model_name_or_path, *init_inputs, **kwargs)
lib/model_zoo/optimus_models/tokenization_utils.py:281
↓ 1 callersMethod_is_chinese_char
Checks whether CP is the codepoint of a CJK character.
lib/model_zoo/optimus_models/tokenization_bert.py:324
↓ 1 callersFunction_is_control
Checks whether `chars` is a control character.
lib/model_zoo/optimus_models/tokenization_bert.py:432
↓ 1 callersFunction_is_punctuation
Checks whether `chars` is a punctuation character.
lib/model_zoo/optimus_models/tokenization_bert.py:444
↓ 1 callersFunction_is_whitespace
Checks whether `chars` is a whitespace character.
lib/model_zoo/optimus_models/tokenization_bert.py:420
↓ 1 callersMethod_prune_heads
Prunes heads of the model. heads_to_prune: dict of {layer_num: list of heads to prune in this layer} See base class PreTraine
lib/model_zoo/optimus_models/optimus_bert.py:578
↓ 1 callersMethod_resize_token_embeddings
(self, new_num_tokens)
lib/model_zoo/optimus_models/optimus_bert.py:572
↓ 1 callersMethod_resize_token_embeddings
(self, new_num_tokens)
lib/model_zoo/optimus_models/optimus_gpt2.py:375
↓ 1 callersMethod_run_split_on_punc
Splits punctuation on a piece of text.
lib/model_zoo/optimus_models/tokenization_bert.py:289
↓ 1 callersMethod_run_strip_accents
Strips accents from a piece of text.
lib/model_zoo/optimus_models/tokenization_bert.py:278
↓ 1 callersMethod_tokenize_chinese_chars
Adds whitespace around any CJK character.
lib/model_zoo/optimus_models/tokenization_bert.py:311
↓ 1 callersMethodaccumulate
(self, n, **data)
lib/log_service.py:57
↓ 1 callersMethodadd_special_tokens_sentences_pair
(self, token_ids_0, token_ids_1)
lib/model_zoo/optimus_models/tokenization_utils.py:697
↓ 1 callersMethodadd_special_tokens_single_sentence
(self, token_ids)
lib/model_zoo/optimus_models/tokenization_gpt2.py:227
↓ 1 callersMethodadd_special_tokens_single_sentence
(self, token_ids)
lib/model_zoo/optimus_models/tokenization_utils.py:693
↓ 1 callersMethodapply_model
(self, input, sample_posterior=True)
lib/model_zoo/autokl.py:57
↓ 1 callersFunctionavg_pool_nd
Create a 1D, 2D, or 3D average pooling module.
lib/model_zoo/diffusion_utils.py:211
↓ 1 callersMethodbpe
(self, token)
lib/model_zoo/optimus_models/tokenization_gpt2.py:135
↓ 1 callersFunctionbytes_to_unicode
Returns list of utf-8 byte and a mapping to unicode strings. We specifically avoids mapping to whitespace/control characters the bpe code bar
lib/model_zoo/optimus_models/tokenization_gpt2.py:65
↓ 1 callersMethodcalculate_adaptive_weight
(self, nll_loss, g_loss, last_layer=None)
lib/model_zoo/autokl_utils.py:319
↓ 1 callersFunctioncfg_initiates
(cfg)
lib/cfg_helper.py:371
↓ 1 callersMethodcheck_diffuser
(self)
lib/model_zoo/vd.py:313
↓ 1 callersFunctioncombine_words
(input, length)
app.py:130
↓ 1 callersFunctioncommon_init
(m)
lib/model_zoo/common/utils.py:252
↓ 1 callersMethodconnect
Returns: Tensor1, Tensor2 Tensor1: the tensor latent z with shape [batch, nsamples, nz] Tensor2: the tenor of KL for
lib/model_zoo/optimus.py:52
↓ 1 callersMethodconnect_deterministic
Returns: Tensor1, Tensor2 Tensor1: the tensor latent z with shape [batch, nsamples, nz] Tensor2: the tenor of KL for
lib/model_zoo/optimus.py:71
↓ 1 callersMethodcopy_global
(self, reference)
lib/sync.py:126
↓ 1 callersMethodcopy_to
(self, model)
lib/model_zoo/ema.py:45
↓ 1 callersFunctiondcg_interface
(with_example=False)
app.py:760
↓ 1 callersMethodddim_sampling
(self, shape, x_info, c_info,
lib/model_zoo/ddim.py:82
↓ 1 callersMethodddim_sampling_multicontext
(self, shape, x_info,
lib/model_zoo/ddim.py:197
↓ 1 callersMethoddecode
(self, z)
lib/model_zoo/autokl.py:45
↓ 1 callersMethoddecode_trainable
(self, z)
lib/model_zoo/autokl.py:51
↓ 1 callersFunctiondecompose
(x, q=20, niter=100)
app.py:48
↓ 1 callersMethodencode_with_pretrained
(self,x)
lib/model_zoo/diffusion_modules.py:816
↓ 1 callersMethodencode_with_pretrained
(self,x)
lib/model_zoo/autokl_modules.py:816
↓ 1 callersMethodencoder_sample
sampling from the encoder Returns: Tensor1 Tensor1: the tensor latent z with shape [batch, nsamples, nz]
lib/model_zoo/optimus.py:171
↓ 1 callersMethodeval_log_model_posterior
perform grid search to calculate the true posterior this function computes p(z|x) Args: grid_z: tensor di
lib/model_zoo/optimus.py:378
↓ 1 callersMethodforward
(self, x, emb)
lib/model_zoo/openaimodel.py:2120
↓ 1 callersMethodforward
(self, x)
lib/model_zoo/diffusion_utils.py:185
↓ 1 callersMethodforward
(self, inputs, labels)
lib/model_zoo/optimus.py:111
↓ 1 callersMethodfreeze
(self)
lib/model_zoo/clip.py:47
↓ 1 callersMethodfreeze
(self)
lib/model_zoo/clip.py:82
↓ 1 callersMethodfrom_dict
Constructs a `Config` from a Python dictionary of parameters.
lib/model_zoo/optimus_models/configuration_utils.py:173
↓ 1 callersMethodfrom_json_file
Constructs a `BertConfig` from a json file of parameters.
lib/model_zoo/optimus_models/configuration_utils.py:181
↓ 1 callersFunctionget_command_line_args
()
lib/cfg_helper.py:281
↓ 1 callersMethodget_device
(self)
lib/model_zoo/clip.py:43
↓ 1 callersMethodget_device
(self)
lib/model_zoo/clip.py:78
↓ 1 callersMethodget_device
(self)
lib/model_zoo/optimus.py:726
↓ 1 callersFunctionget_from_cache
Given a URL, look for the corresponding dataset in the local cache. If it's not there, download it. Then return the path to the cached file.
lib/model_zoo/optimus_models/file_utils.py:219
↓ 1 callersMethodget_mean_value_dict
(self)
lib/log_service.py:69
↓ 1 callersFunctionget_rank
(type='local')
lib/sync.py:28
↓ 1 callersFunctionget_timestep_embedding
This matches the implementation in Denoising Diffusion Probabilistic Models: From Fairseq. Build sinusoidal embeddings. This matches
lib/model_zoo/diffusion_modules.py:12
↓ 1 callersFunctionget_timestep_embedding
This matches the implementation in Denoising Diffusion Probabilistic Models: From Fairseq. Build sinusoidal embeddings. This matches
lib/model_zoo/autokl_modules.py:12
↓ 1 callersFunctionget_total_param
(net)
lib/model_zoo/common/utils.py:282
↓ 1 callersFunctionget_total_param_sum
(net)
lib/model_zoo/common/utils.py:287
↓ 1 callersMethodget_yaml_path
(self, name)
lib/cfg_helper.py:148
↓ 1 callersMethodget_yaml_path
(self, name)
lib/cfg_helper.py:204
↓ 1 callersMethodget_yaml_path
(self, name)
lib/cfg_helper.py:230
↓ 1 callersFunctionhighlight_print
(info)
lib/model_zoo/vd.py:21
↓ 1 callersFunctionhttp_get
(url, temp_file, proxies=None)
lib/model_zoo/optimus_models/file_utils.py:207
↓ 1 callersFunctioni2i_interface
(with_example=False)
app.py:612
↓ 1 callersFunctioni2t_interface
(with_example=False)
app.py:653
← previousnext →101–200 of 773, ranked by callers