MCPcopy Create free account

hub / github.com/Fanghua-Yu/SUPIR / functions

Functions867 in github.com/Fanghua-Yu/SUPIR

↓ 41 callersMethodfrom_pretrained
See `AutoTokenizer.from_pretrained` docstring.
llava/model/language_model/mpt/adapt_tokenizer.py:37
↓ 30 callersFunctioninstantiate_from_config
(config)
sgm/util.py:168
↓ 26 callersMethodappend_message
(self, role, message)
llava/conversation.py:106
↓ 24 callersFunctiontokenizer_image_token
(prompt, tokenizer, image_token_index=IMAGE_TOKEN_INDEX, return_tensors=None)
llava/mm_utils.py:43
↓ 22 callersFunctiondefault
(val, d)
sgm/modules/attention.py:66
↓ 21 callersMethodcopy
(self)
llava/conversation.py:190
↓ 21 callersMethodstore
Save the current parameters for restoring later. Args: parameters: Iterable of `torch.nn.Parameter`; the parameters to be
sgm/modules/ema.py:65
↓ 20 callersFunctionappend_dims
Appends dimensions to the end of a tensor until it has target_dims dimensions.
sgm/util.py:192
↓ 20 callersFunctionconv_nd
Create a 1D, 2D, or 3D convolution module.
sgm/modules/diffusionmodules/util.py:279
↓ 18 callersMethodwrite
(self, buf)
llava/utils.py:73
↓ 16 callersFunctionlinear
Create a linear module.
sgm/modules/diffusionmodules/util.py:292
↓ 15 callersMethod__init__
(self, normalize_input=False, **kwargs)
sgm/modules/encoders/modules.py:298
↓ 15 callersMethoddevice
(self)
llava/model/multimodal_encoder/clip_encoder.py:68
↓ 15 callersMethodget_model
(self)
llava/model/llava_arch.py:84
↓ 15 callersMethodget_prompt
(self)
llava/conversation.py:29
↓ 12 callersMethodto_gradio_chatbot
(self)
llava/conversation.py:159
↓ 11 callersMethod__init__
(self, in_channels=3, model_channels=64)
sgm/modules/diffusionmodules/openaimodel.py:1244
↓ 11 callersMethodencode
(self, x)
sgm/models/autoencoder.py:304
↓ 11 callersFunctionnormalization
Make a standard normalization layer. :param channels: number of input channels. :return: an nn.Module for normalization.
sgm/modules/diffusionmodules/util.py:258
↓ 10 callersFunctionresblock2task
Turn a ResNetBlock into a sequence of tasks and append to the task queue @param queue: the target task queue @param block: ResNetBlock
SUPIR/utils/tilevae.py:374
↓ 9 callersFunctionHWC3
(x)
SUPIR/util.py:97
↓ 9 callersMethodget_sigma_gen
(self, num_sigmas)
sgm/modules/diffusionmodules/sampling.py:63
↓ 9 callersMethodprepare_sampling_loop
(self, x, cond, uc=None, num_steps=None)
sgm/modules/diffusionmodules/sampling.py:378
↓ 9 callersFunctionto_sigma
(neg_log_sigma)
sgm/modules/diffusionmodules/sampling_utils.py:47
↓ 9 callersFunctionzero_module
Zero out the parameters of a module and return it.
sgm/modules/diffusionmodules/util.py:233
↓ 8 callersMethod__init__
(self, dim_in, dim_out)
sgm/modules/attention.py:85
↓ 8 callersMethod__init__
( self, *, ch, out_ch, ch_mult=(1, 2, 4, 8), num_res_blocks,
sgm/modules/diffusionmodules/model.py:308
↓ 8 callersFunctionconvert_dtype
(dtype_str)
SUPIR/util.py:171
↓ 8 callersMethodembed_tokens
(self, x)
llava/model/language_model/llava_mpt.py:41
↓ 8 callersFunctionexists
(val)
sgm/modules/attention.py:58
↓ 8 callersFunctionload_pretrained_model
(model_path, model_base, model_name, load_8bit=False, load_4bit=False, device_map="auto", device="cuda")
llava/model/builder.py:26
↓ 8 callersMethodpreprocess
(self, x)
sgm/modules/encoders/modules.py:733
↓ 7 callersFunctionNormalize
(in_channels, num_groups=32)
sgm/modules/diffusionmodules/model.py:49
↓ 7 callersMethod__init__
( self, s_churn=0.0, s_tmin=0.0, s_tmax=float("inf"), s_noise=1.0, *args, **kwargs )
sgm/modules/diffusionmodules/sampling.py:87
↓ 7 callersMethodbatchify_sample
[N, C], [-1, 1], RGB
SUPIR/models/SUPIR_model.py:80
↓ 7 callersMethoddecode
(self, z, **decoder_kwargs)
sgm/models/autoencoder.py:313
↓ 7 callersMethoddenoise
(self, x, denoiser, sigma, cond, uc, control_scale=1.0)
sgm/modules/diffusionmodules/sampling.py:390
↓ 7 callersFunctiondisable_torch_init
Disable the redundant torch default initialization to accelerate model creation.
llava/utils.py:93
↓ 7 callersFunctionget_model_name_from_path
(model_path)
llava/mm_utils.py:65
↓ 7 callersFunctionnonlinearity
(x)
sgm/modules/diffusionmodules/model.py:44
↓ 6 callersMethodbatchify_denoise
[N, C, H, W], [-1, 1], RGB
SUPIR/models/SUPIR_model.py:72
↓ 6 callersFunctioncheckpoint
Evaluate a function without caching intermediate activations, allowing for reduced memory at the expense of extra compute in the backward pas
sgm/modules/diffusionmodules/util.py:153
↓ 6 callersMethodflush
(self)
llava/utils.py:87
↓ 6 callersMethodfrom_pretrained
(cls, name="vgg_lpips")
sgm/modules/autoencoding/lpips/loss/lpips.py:36
↓ 6 callersMethodget_vision_tower
(self)
llava/model/llava_arch.py:36
↓ 6 callersFunctionload_state_dict
(ckpt_path, location='cpu')
SUPIR/util.py:15
↓ 5 callersFunction_cast_if_autocast_enabled
(tensor)
llava/model/language_model/mpt/norm.py:3
↓ 5 callersMethodgen_image_caption
[PIL.Image, ...]
llava/llava_agent.py:65
↓ 5 callersFunctiongeneric_param_init_fn_
(module: nn.Module, init_fn_, n_layers: int, d_model: Optional[int]=None, init_div_is_residual: Union[int, flo
llava/model/language_model/mpt/param_init_fns.py:28
↓ 5 callersMethodget_images
(self, return_pil=False)
llava/conversation.py:109
↓ 5 callersMethodget_input_embeddings
(self)
llava/model/language_model/mpt/modeling_mpt.py:81
↓ 5 callersFunctionget_obj_from_str
(string, reload=False, invalidate_cache=True)
sgm/util.py:178
↓ 5 callersFunctionmake_attn
(in_channels, attn_type="vanilla", attn_kwargs=None)
sgm/modules/diffusionmodules/model.py:274
↓ 5 callersMethodprepare_inputs
(self, x, s, c, uc)
sgm/modules/diffusionmodules/guiders.py:65
↓ 5 callersFunctiontimestep_embedding
Create sinusoidal timestep embeddings. :param timesteps: a 1-D Tensor of N indices, one per batch element. These may be
sgm/modules/diffusionmodules/util.py:206
↓ 5 callersFunctionto_d
(x, sigma, denoised)
sgm/modules/diffusionmodules/sampling_utils.py:39
↓ 5 callersFunctionupscale_image
(input_image, upscale, min_size=None, unit_resolution=64)
SUPIR/util.py:116
↓ 4 callersMethod__init__
(self, label_nc, norm_nc, concat_channels=0, norm=True, mask=False)
SUPIR/modules/SUPIR_v0.py:63
↓ 4 callersFunctionattn2task
(task_queue, net)
SUPIR/utils/tilevae.py:349
↓ 4 callersFunctioncall_og_forward
()
llava/model/language_model/mpt/hf_prefixlm_converter.py:74
↓ 4 callersFunctioncreate_SUPIR_model
(config_path, SUPIR_sign=None, load_default_setting=False)
SUPIR/util.py:34
↓ 4 callersMethodget_last_layer
(self)
sgm/models/autoencoder.py:163
↓ 4 callersFunctionget_location
(val, length)
SUPIR/utils/face_restoration_helper.py:15
↓ 4 callersMethodget_output_embeddings
(self)
llava/model/language_model/mpt/modeling_mpt.py:261
↓ 4 callersMethodget_unconditional_conditioning
(self, bs, device="cuda")
sgm/modules/encoders/modules.py:341
↓ 4 callersFunctionget_var_mean
Get mean and var for group norm
SUPIR/utils/tilevae.py:511
↓ 4 callersMethodinit_tile_vae
(self, encoder_tile_size=512, decoder_tile_size=64)
SUPIR/models/SUPIR_model.py:138
↓ 4 callersFunctionprocess_images
(images, image_processor, model_cfg)
llava/mm_utils.py:28
↓ 4 callersFunctionread_jsonl
(path: str, key: str=None)
llava/eval/generate_webpage_data_from_table.py:10
↓ 4 callersMethodsampler_step
(self, sigma, next_sigma, denoiser, x, cond, uc=None, gamma=0.0)
sgm/modules/diffusionmodules/sampling.py:97
↓ 4 callersFunctiontext2Markdown
(text)
llava/eval/webpage/script.js:35
↓ 3 callersMethod__init__
(self, use_dropout=True)
sgm/modules/autoencoding/lpips/loss/lpips.py:14
↓ 3 callersMethod__init__
(self, embed_dim: int, **kwargs)
sgm/models/autoencoder.py:283
↓ 3 callersFunction_flash_attn_backward
(do, q, k, v, o, lse, dq, dk, dv, bias=None, causal=False, softmax_scale=None)
llava/model/language_model/mpt/flash_attn_triton.py:366
↓ 3 callersFunction_flash_attn_forward
(q, k, v, bias=None, causal=False, softmax_scale=None)
llava/model/language_model/mpt/flash_attn_triton.py:329
↓ 3 callersFunction_sliding_windows
(h: int, w: int, tile_size: int, tile_stride: int)
sgm/modules/diffusionmodules/sampling.py:753
↓ 3 callersMethodancestral_euler_step
(self, x, denoised, sigma, sigma_down)
sgm/modules/diffusionmodules/sampling.py:146
↓ 3 callersMethodancestral_step
(self, x, sigma, next_sigma, sigma_up)
sgm/modules/diffusionmodules/sampling.py:152
↓ 3 callersMethodattention
(self, h_: torch.Tensor)
sgm/modules/diffusionmodules/model.py:177
↓ 3 callersFunctionbuild_logger
(logger_name, logger_filename)
llava/utils.py:17
↓ 3 callersFunctioncount_params
(model, verbose=False)
sgm/util.py:161
↓ 3 callersMethoddecode
(self, z)
sgm/modules/encoders/modules.py:1022
↓ 3 callersMethoddecode_first_stage
(self, z)
SUPIR/models/SUPIR_model.py:65
↓ 3 callersFunctiondisplayQuestion
(index)
llava/eval/webpage/script.js:110
↓ 3 callersMethodencode
(self, x)
sgm/modules/encoders/modules.py:321
↓ 3 callersMethodeuler_step
(self, x, d, dt)
sgm/modules/diffusionmodules/sampling.py:82
↓ 3 callersFunctionexists
(x)
sgm/util.py:137
↓ 3 callersFunctionexpand2square
(pil_img, background_color)
llava/mm_utils.py:14
↓ 3 callersFunctionexpand_dims_like
(x, y)
sgm/util.py:141
↓ 3 callersFunctionfix_resize
(input_image, size=512, unit_resolution=64)
SUPIR/util.py:134
↓ 3 callersFunctionfn
(tau)
sgm/modules/diffusionmodules/sampling_utils.py:16
↓ 3 callersFunctionget_ancestral_step
(sigma_from, sigma_to, eta=1.0)
sgm/modules/diffusionmodules/sampling_utils.py:27
↓ 3 callersMethodget_input
(self, batch: Dict)
sgm/models/autoencoder.py:145
↓ 3 callersFunctionget_length_grouped_indices
(lengths, batch_size, world_size, generator=None, merge=True)
llava/train/llava_trainer.py:87
↓ 3 callersFunctionget_pred_idx
Get the index (e.g. 2) from the prediction (e.g. 'C')
llava/eval/eval_science_qa_gpt4_requery.py:30
↓ 3 callersMethodget_worker_status
(self, worker_name: str)
llava/serve/controller.py:88
↓ 3 callersFunctionload_QF_ckpt
(config_path)
SUPIR/util.py:53
↓ 3 callersMethodload_model
(self)
llava/model/multimodal_encoder/clip_encoder.py:26
↓ 3 callersFunctionlog_txt_as_img
(wh, xc, size=10)
sgm/util.py:68
↓ 3 callersFunctionmaybe_zero_3
(param, ignore_status=False, name=None)
llava/train/train.py:109
next →1–100 of 867, ranked by callers