MCPcopy Create free account

hub / github.com/Damarcreative/rem-wm / functions

Functions235 in github.com/Damarcreative/rem-wm

↓ 86 callersMethodto
(self, device)
lama_cleaner/model/sd.py:46
↓ 39 callersMethodregister_buffer
(self, name, attr)
lama_cleaner/model/ddim_sampler.py:17
↓ 36 callersFunctionnf
(stage, channel_base=32768, channel_decay=1.0, channel_max=512)
lama_cleaner/model/mat.py:451
↓ 29 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
lama_cleaner/model/mat.py:457
↓ 17 callersMethod__init__
(self, in_channels, out_channels, kernel_size, ratio_gin, ratio_gout, stride=1, padding=0,
lama_cleaner/model/fcf.py:654
↓ 13 callersMethodregister_buffer
(self, name, attr)
lama_cleaner/model/plms_sampler.py:15
↓ 12 callersFunctionget_style_code
(a, b)
lama_cleaner/model/mat.py:154
↓ 11 callersFunctionget_cache_path_by_url
(url)
lama_cleaner/helper.py:13
↓ 9 callersFunctionupfirdn2d
r"""Pad, upsample, filter, and downsample a batch of 2D images. Performs the following sequence of operations for each channel: 1. Upsample
lama_cleaner/model/utils.py:304
↓ 8 callersFunctionfeature2token
(x)
lama_cleaner/model/mat.py:925
↓ 8 callersFunctionnorm_img
(np_img)
lama_cleaner/helper.py:102
↓ 8 callersFunctionto_tensor
(img, scale=True, norm=False)
lama_cleaner/model/zits.py:55
↓ 8 callersFunctiontoken2feature
(x, x_size)
lama_cleaner/model/mat.py:918
↓ 7 callersMethod_pad_forward
(self, image, mask, config: Config)
lama_cleaner/model/base.py:44
↓ 7 callersFunctionload_jit_model
(url_or_path, device)
lama_cleaner/helper.py:39
↓ 6 callersFunction_conv2d_wrapper
Wrapper for the underlying `conv2d()` and `conv_transpose2d()` implementations.
lama_cleaner/model/utils.py:534
↓ 6 callersFunctionsetup_filter
r"""Convenience function to setup 2D FIR filter for `upfirdn2d()`. Args: f: Torch tensor, numpy array, or python list of the sh
lama_cleaner/model/utils.py:225
↓ 5 callersFunctionbias_act
r"""Fused bias and activation function. Adds bias `b` to activation tensor `x`, evaluates activation function `act`, and scales the result by
lama_cleaner/model/utils.py:149
↓ 4 callersFunction_parse_scaling
(scaling)
lama_cleaner/model/utils.py:203
↓ 4 callersFunctionnormalize_2nd_moment
(x, dim=1, eps=1e-8)
lama_cleaner/model/utils.py:97
↓ 4 callersFunctionresize_max_size
( np_img, size_limit: int, interpolation=cv2.INTER_CUBIC )
lama_cleaner/helper.py:110
↓ 3 callersFunction_get_filter_size
(f)
lama_cleaner/model/utils.py:184
↓ 3 callersFunction_unbroadcast
(x, shape)
lama_cleaner/model/fcf.py:310
↓ 3 callersMethodapply_model
(self, x_noisy, t, cond)
lama_cleaner/model/ldm.py:220
↓ 3 callersFunctionconv2d_resample
r"""2D convolution with optional up/downsampling. Padding is performed only once at the beginning, not between the operations. Args:
lama_cleaner/model/utils.py:562
↓ 3 callersFunctiondownload_model
(url)
lama_cleaner/helper.py:24
↓ 3 callersFunctionwindow_partition
Args: x: (B, H, W, C) window_size (int): window size Returns: windows: (num_windows*B, window_size, window_size, C)
lama_cleaner/model/mat.py:470
↓ 2 callersMethod__init__
(self, in_channels, # Number of input channels. out_channels, # Number of
lama_cleaner/model/utils.py:665
↓ 2 callersMethod__init__
(self, device, fp16: bool = True, **kwargs)
lama_cleaner/model/ldm.py:230
↓ 2 callersMethod_crop_box
Args: image: [H, W, C] RGB mask: [H, W, 1] box: [left,top,right,bottom] Returns: BG
lama_cleaner/model/base.py:118
↓ 2 callersFunction_get_weight_shape
(w)
lama_cleaner/model/utils.py:198
↓ 2 callersMethod_norm
(self, tensor)
lama_cleaner/model/ldm.py:311
↓ 2 callersFunction_parse_padding
(padding)
lama_cleaner/model/utils.py:213
↓ 2 callersFunctionboxes_from_mask
Args: mask: (h, w, 1) 0~255 Returns:
lama_cleaner/helper.py:161
↓ 2 callersMethodcalculate_mask
(self, x_size)
lama_cleaner/model/mat.py:656
↓ 2 callersFunctionceil_modulo
(x, mod)
lama_cleaner/helper.py:33
↓ 2 callersMethodinit_model
(self, name: str, device, **kwargs)
lama_cleaner/model_manager.py:20
↓ 2 callersFunctionload_model
(model: torch.nn.Module, url_or_path, device)
lama_cleaner/helper.py:56
↓ 2 callersFunctionmake_ddim_sampling_parameters
(alphacums, ddim_timesteps, eta, verbose=True)
lama_cleaner/model/utils.py:35
↓ 2 callersFunctionmake_ddim_timesteps
(ddim_discr_method, num_ddim_timesteps, num_ddpm_timesteps, verbose=True)
lama_cleaner/model/utils.py:49
↓ 2 callersFunctionmodulated_conv2d
( x, # Input tensor of shape [batch_size, in_channels, in_height, in_width]. weight, # Weight tensor
lama_cleaner/model/fcf.py:322
↓ 2 callersFunctionnoise_like
(shape, device, repeat=False)
lama_cleaner/model/utils.py:66
↓ 2 callersFunctionpad_img_to_modulo
Args: img: [H, W, C] mod: square: 是否为正方形 min_size: Returns:
lama_cleaner/helper.py:124
↓ 2 callersMethodregister_schedule
( self, given_betas=None, beta_schedule="linear", timesteps=1000, line
lama_cleaner/model/ldm.py:74
↓ 2 callersFunctionresize
(img, height, width, center_crop=False)
lama_cleaner/model/zits.py:36
↓ 2 callersFunctionupsample2d
r"""Upsample a batch of 2D images using the given 2D FIR filter. By default, the result is padded so that its shape is a multiple of the input.
lama_cleaner/model/utils.py:436
↓ 2 callersFunctionwindow_reverse
Args: windows: (num_windows*B, window_size, window_size, C) window_size (int): Window size H (int): Height of image
lama_cleaner/model/mat.py:484
↓ 1 callersMethod__init__
(self, *args, **kwargs)
lama_cleaner/model/sd.py:59
↓ 1 callersFunction_bias_act_ref
Slow reference implementation of `bias_act()` using standard TensorFlow ops.
lama_cleaner/model/utils.py:117
↓ 1 callersFunction_ntuple
(n)
lama_cleaner/model/utils.py:272
↓ 1 callersMethod_run_box
Args: image: [H, W, C] RGB mask: [H, W, 1] box: [left,top,right,bottom] Returns: BG
lama_cleaner/model/base.py:170
↓ 1 callersFunction_upfirdn2d_ref
Slow reference implementation of `upfirdn2d()` using standard PyTorch ops.
lama_cleaner/model/utils.py:349
↓ 1 callersFunction_upfirdn2d_ref
Slow reference implementation of `upfirdn2d()` using standard PyTorch ops.
lama_cleaner/model/fcf.py:25
↓ 1 callersFunctioncreate_mask
(image, prediction)
gradio.py:54
↓ 1 callersMethodcreate_mask
(self, image, prediction)
remwm.py:46
↓ 1 callersMethodddim_sampling
( self, cond, shape, ddim_use_original_steps=False, quantize_denoised=
lama_cleaner/model/ddim_sampler.py:99
↓ 1 callersFunctiondownsample2d
r"""Downsample a batch of 2D images using the given 2D FIR filter. By default, the result is padded so that its shape is a fraction of the input.
lama_cleaner/model/utils.py:396
↓ 1 callersMethodenable_attention_slicing
r""" Enable sliced attention computation. When this option is enabled, the attention module will split the input tensor in slices, to
lama_cleaner/model/sd_pipeline.py:91
↓ 1 callersFunctionfma
(a, b, c)
lama_cleaner/model/fcf.py:278
↓ 1 callersMethodforward
Input images and output images have same size images: [H, W, C] RGB masks: [H, W, 1] 255 为 masks 区域 return: BGR IMAGE
lama_cleaner/model/base.py:36
↓ 1 callersMethodinit_model
(self, device, **kwargs)
lama_cleaner/model/base.py:27
↓ 1 callersFunctionload_image
Args: img: [H, W, C] RGB mask: [H, W] 255 为 masks 区域 sigma256: Returns:
lama_cleaner/model/zits.py:135
↓ 1 callersFunctionload_masked_position_encoding
(mask)
lama_cleaner/model/zits.py:72
↓ 1 callersFunctionmake_beta_schedule
(device, schedule, n_timestep, linear_start=1e-4, linear_end=2e-2, cosine_s=8e-3)
lama_cleaner/model/utils.py:12
↓ 1 callersMethodmake_cond_schedule
( self, )
lama_cleaner/model/ldm.py:190
↓ 1 callersMethodmake_schedule
( self, ddim_num_steps, ddim_discretize="uniform", ddim_eta=0.0, verbose=True )
lama_cleaner/model/ddim_sampler.py:20
↓ 1 callersMethodmake_schedule
(self, ddim_num_steps, ddim_discretize="uniform", ddim_eta=0., verbose=True)
lama_cleaner/model/plms_sampler.py:18
↓ 1 callersMethodp_sample_ddim
( self, x, c, t, index, repeat_noise=False, use_origin
lama_cleaner/model/ddim_sampler.py:144
↓ 1 callersMethodp_sample_plms
(self, x, c, t, index, repeat_noise=False, use_original_steps=False, quantize_denoised=False,
lama_cleaner/model/plms_sampler.py:162
↓ 1 callersMethodplms_sampling
(self, cond, shape, x_T=None, ddim_use_original_steps=False, callb
lama_cleaner/model/plms_sampler.py:109
↓ 1 callersFunctionpreprocess_image
(image)
lama_cleaner/model/sd_pipeline.py:17
↓ 1 callersFunctionpreprocess_mask
(mask)
lama_cleaner/model/sd_pipeline.py:27
↓ 1 callersMethodprocess_batch
(self, input_dir, output_dir, max_workers=4)
remwm.py:95
↓ 1 callersFunctionprocess_image
(image, mask, strategy, sampler, fx=1, fy=1)
gradio.py:33
↓ 1 callersMethodprocess_image
(self, image, mask, strategy=HDStrategy.RESIZE, sampler=LDMSampler.ddim, fx=1, fy=1)
remwm.py:26
↓ 1 callersMethodprocess_images_florence_lama
(self, input_image_path, output_image_path)
remwm.py:59
↓ 1 callersMethodsample
(self, steps, conditioning, batch_size, shape)
lama_cleaner/model/ddim_sampler.py:82
↓ 1 callersMethodsample
(self, steps, batch_size, shape, conditioning=None
lama_cleaner/model/plms_sampler.py:52
↓ 1 callersMethodsample_edge_line_logits
( self, context, mask=None, iterations=1, add_v=0, mul_v=4 )
lama_cleaner/model/zits.py:381
↓ 1 callersFunctiontimestep_embedding
Create sinusoidal timestep embeddings. :param timesteps: a 1-D Tensor of N indices, one per batch element. These may be
lama_cleaner/model/utils.py:72
↓ 1 callersFunctionto_device
(data, device)
lama_cleaner/model/zits.py:192
↓ 1 callersMethodwireframe_edge_and_line
(self, items, enable: bool)
lama_cleaner/model/zits.py:237
↓ 1 callersMethodwireframe_forward
(self, images, h, w, masks, mask_th=0.925)
lama_cleaner/model/zits.py:340
Method__call__
(self, image, mask, config: Config)
lama_cleaner/model_manager.py:33
Method__call__
r""" Function invoked when calling the pipeline for generation. Args: prompt (`str` or `List[str]`): The
lama_cleaner/model/sd_pipeline.py:119
Method__call__
images: [H, W, C] RGB, not normalized masks: [H, W] return: BGR IMAGE
lama_cleaner/model/fcf.py:1158
Method__call__
images: [H, W, C] RGB, not normalized masks: [H, W] return: BGR IMAGE
lama_cleaner/model/base.py:63
Method__call__
(self, *args, **kwargs)
lama_cleaner/model/sd.py:54
Method__call__
(self, clip_input, images)
lama_cleaner/model/sd.py:62
Method__call__
images: [H, W, C] RGB, not normalized masks: [H, W] return: BGR IMAGE
lama_cleaner/model/sd.py:167
Method__delattr__
(self, name: str)
lama_cleaner/model/utils.py:113
Method__getattr__
(self, name: str)
lama_cleaner/model/utils.py:104
Method__init__
(self, model_id='microsoft/Florence-2-large')
remwm.py:16
Method__init__
(self, name: str, device, **kwargs)
lama_cleaner/model_manager.py:14
Method__init__
( self, vae: AutoencoderKL, text_encoder: CLIPTextModel, tokenizer: CLIPTokeni
lama_cleaner/model/sd_pipeline.py:68
Method__init__
(self, model, schedule="linear")
lama_cleaner/model/ddim_sampler.py:11
Method__init__
(self, model, schedule="linear", **kwargs)
lama_cleaner/model/plms_sampler.py:9
Method__init__
(self, in_channels, # Number of input channels. out_channels, # Number of
lama_cleaner/model/mat.py:19
Method__init__
(self, in_channels, # Number of input channels. out_channels, # Number of
lama_cleaner/model/mat.py:64
Method__init__
(self, in_channels, out_channels, style_dim,
lama_cleaner/model/mat.py:121
next →1–100 of 235, ranked by callers