MCPcopy Create free account

hub / github.com/ShihaoZhaoZSH/Uni-ControlNet / functions

Functions2,265 in github.com/ShihaoZhaoZSH/Uni-ControlNet

↓ 6 callersFunctiondefault
(val, d)
ldm/modules/attention.py:31
↓ 6 callersFunctionformat_param
(name, optim, param)
annotator/uniformer/mmcv/runner/hooks/lr_updater.py:659
↓ 6 callersMethodforward
(self, x)
annotator/uniformer/mmcv/cnn/bricks/wrappers.py:44
↓ 6 callersMethodforward_plugin
Forward function for plugins.
annotator/uniformer/mmseg/models/backbones/resnet.py:242
↓ 6 callersMethodget_loggable_tags
(self, runner, allow_scalar=True,
annotator/uniformer/mmcv/runner/hooks/logger/base.py:112
↓ 6 callersFunctionhas_method
Check whether the object has a method. Args: method (str): The method name to check. obj (object): The object to check. Retu
annotator/uniformer/mmcv/utils/misc.py:367
↓ 6 callersFunctionis_supported_instance
(module)
annotator/uniformer/mmcv/cnn/utils/flops_counter.py:540
↓ 6 callersFunctionlinear
Create a linear module.
ldm/modules/diffusionmodules/util.py:234
↓ 6 callersMethodload_checkpoint
(self, filename, map_location='cpu', s
annotator/uniformer/mmcv/runner/base_runner.py:332
↓ 6 callersMethodmeshgrid
(self, h, w)
ldm/models/diffusion/ddpm.py:677
↓ 6 callersFunctionpoint_sample
A wrapper around :func:`grid_sample` to support 3D point_coords tensors Unlike :func:`torch.nn.functional.grid_sample` it assumes point_coords to
annotator/uniformer/mmcv/ops/point_sample.py:242
↓ 6 callersMethodsample
(self, batch_size=16, return_intermediates=False)
ldm/models/diffusion/ddpm.py:350
↓ 5 callersMethod__init__
(self, embed_dim, n_classes=1000, key='class', ucg_rate=0.1)
ldm/modules/encoders/modules.py:26
↓ 5 callersFunction_make_scratch
(in_shape, out_shape, groups=1, expand=False)
annotator/midas/midas/blocks.py:49
↓ 5 callersMethod_set_lr
(self, runner, lr_groups)
annotator/uniformer/mmcv/runner/hooks/lr_updater.py:58
↓ 5 callersMethod_set_momentum
(self, runner, momentum_groups)
annotator/uniformer/mmcv/runner/hooks/momentum_updater.py:35
↓ 5 callersFunctionannealing_cos
Calculate annealing cos learning rate. Cosine anneal from `weight * start + (1 - weight) * end` to `end` as percentage goes from 0.0 to 1.0.
annotator/uniformer/mmcv/runner/hooks/lr_updater.py:627
↓ 5 callersMethodapply_model
(self, x_noisy, t, cond, global_strength=1, *args, **kwargs)
models/uni_controlnet.py:47
↓ 5 callersFunctionbuild_activation_layer
Build activation layer. Args: cfg (dict): The activation layer config, which should contain: - type (str): Layer type.
annotator/uniformer/mmcv/cnn/bricks/activation.py:81
↓ 5 callersFunctioncheckpoint
Evaluate a function without caching intermediate activations, allowing for reduced memory at the expense of extra compute in the backward pas
ldm/modules/diffusionmodules/util.py:102
↓ 5 callersMethodchildren
(self)
annotator/uniformer/mmcv/utils/registry.py:183
↓ 5 callersMethoddecode
(self, x_latent, cond, t_start, unconditional_guidance_scale=1.0, unconditional_conditioning=None,
ldm/models/diffusion/ddim.py:321
↓ 5 callersFunctiondefault
(val, d)
ldm/util.py:51
↓ 5 callersMethodforward
(self, x)
ldm/modules/diffusionmodules/util.py:213
↓ 5 callersMethodforward_test
Args: imgs (List[Tensor]): the outer list indicates test-time augmentations and inner Tensor should have a shape
annotator/uniformer/mmseg/models/segmentors/base.py:76
↓ 5 callersMethodget
Read data from a given ``filepath`` with 'rb' mode. Note: There are two types of return values for ``get``, one is ``bytes``
annotator/uniformer/mmcv/fileio/file_client.py:976
↓ 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 support
ldm/models/diffusion/dpm_solver/dpm_solver.py:376
↓ 5 callersMethodinit
(m)
annotator/uniformer/mmcv/cnn/utils/weight_init.py:224
↓ 5 callersMethodinverse_lambda
Compute the continuous-time label t in [0, T] of a given half-logSNR lambda_t.
ldm/models/diffusion/dpm_solver/dpm_solver.py:140
↓ 5 callersFunctionis_seq_of
Check whether it is a sequence of some type. Args: seq (Sequence): The sequence to be checked. expected_type (type): Expected typ
annotator/uniformer/mmcv/utils/misc.py:128
↓ 5 callersFunctionis_tuple_of
Check whether it is a tuple of some type. A partial method of :func:`is_seq_of`.
annotator/uniformer/mmcv/utils/misc.py:160
↓ 5 callersFunctionload_url_dist
In distributed setting, this function only download checkpoint at local rank 0.
annotator/uniformer/mmcv_custom/checkpoint.py:109
↓ 5 callersFunctionnoise_like
(shape, device, repeat=False)
ldm/modules/diffusionmodules/util.py:267
↓ 5 callersFunctionnormalization
Make a standard normalization layer. :param channels: number of input channels. :return: an nn.Module for normalization.
ldm/modules/diffusionmodules/util.py:202
↓ 5 callersMethodscatter
(self, inputs, kwargs, device_ids)
annotator/uniformer/mmcv/parallel/data_parallel.py:44
↓ 5 callersMethodsize
(self, *args, **kwargs)
annotator/uniformer/mmcv/parallel/data_container.py:84
↓ 5 callersFunctionweight_reduce_loss
Apply element-wise weight and reduce loss. Args: loss (Tensor): Element-wise loss. weight (Tensor): Element-wise weights.
annotator/uniformer/mmseg/models/losses/utils.py:46
↓ 4 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None
annotator/uniformer/mmseg/models/backbones/vit.py:36
↓ 4 callersMethod__init__
(self, depth, in_channels=3, stem_channels=64,
annotator/uniformer/mmseg/models/backbones/resnet.py:373
↓ 4 callersMethod__init__
(self, low_in_channels, high_in_channels, channels, out_channels, query_scales, key_pool_scal
annotator/uniformer/mmseg/models/decode_heads/ann_head.py:99
↓ 4 callersMethod__init__
Initialize BaseModule, inherited from `torch.nn.Module`
annotator/uniformer/mmcv/runner/base_module.py:33
↓ 4 callersMethod__init__
(self, by_epoch=True, warmup=None, warmup_iters=0,
annotator/uniformer/mmcv/runner/hooks/momentum_updater.py:9
↓ 4 callersMethod__init__
Init. Args: scale_factor (float): scaling mode (str): interpolation mode
annotator/midas/midas/blocks.py:124
↓ 4 callersFunction_convert_input_type_range
Convert the type and range of the input image. It converts the input image to np.float32 type and range of [0, 1]. It is mainly used for pre-
annotator/uniformer/mmcv/image/colorspace.py:84
↓ 4 callersFunction_convert_output_type_range
Convert the type and range of the image according to dst_type. It converts the image to desired type and range. If `dst_type` is np.uint8, im
annotator/uniformer/mmcv/image/colorspace.py:112
↓ 4 callersFunction_make_fusion_block
(features, use_bn)
annotator/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=
annotator/midas/midas/vit.py:183
↓ 4 callersFunction_ntuple
(n)
annotator/uniformer/mmcv/utils/misc.py:14
↓ 4 callersMethod_set_real_position
(self, frame_id)
annotator/uniformer/mmcv/video/io.py:127
↓ 4 callersFunctionadd_Gaussian_noise
(img, noise_level1=2, noise_level2=25)
ldm/modules/image_degradation/bsrgan.py:369
↓ 4 callersFunctionadd_JPEG_noise
(img)
ldm/modules/image_degradation/bsrgan_light.py:421
↓ 4 callersMethodaverage
Average latest n values or all values.
annotator/uniformer/mmcv/runner/log_buffer.py:33
↓ 4 callersMethodbuild_project
Build projection layer for key/query/value/out.
annotator/uniformer/mmseg/models/utils/self_attention_block.py:99
↓ 4 callersFunctioncalculate_weights_indices
(in_length, out_length, scale, kernel, kernel_width, antialiasing)
ldm/modules/image_degradation/utils_image.py:708
↓ 4 callersFunctioncheck_file_exist
(filename, msg_tmpl='file "{}" does not exist')
annotator/uniformer/mmcv/utils/path.py:21
↓ 4 callersMethodclear_output
(self)
annotator/uniformer/mmcv/runner/log_buffer.py:20
↓ 4 callersFunctioncreate_model
(config_path)
models/util.py:24
↓ 4 callersMethoddump_to_fileobj
(self, obj, file, **kwargs)
annotator/uniformer/mmcv/fileio/handlers/base.py:17
↓ 4 callersFunctioneval_metrics
Calculate evaluation metrics Args: results (list[ndarray] | list[str]): List of prediction segmentation maps or list of predic
annotator/uniformer/mmseg/core/evaluation/metrics.py:257
↓ 4 callersMethodevaluate
Evaluate the results. Args: runner (:obj:`mmcv.Runner`): The underlined training runner. results (list): Output resul
annotator/uniformer/mmcv/runner/hooks/evaluation.py:354
↓ 4 callersFunctionexists
(val)
ldm/modules/attention.py:23
↓ 4 callersMethodget
Get the registry record. Args: key (str): The class name in string format. Returns: class: The corresponding
annotator/uniformer/mmcv/utils/registry.py:186
↓ 4 callersMethodget_last_layer
(self)
ldm/models/autoencoder.py:163
↓ 4 callersFunctionget_logger
Initialize and get a logger by name. If the logger has not been initialized, this method will initialize the logger by adding one or two hand
annotator/uniformer/mmcv/utils/logging.py:9
↓ 4 callersMethodget_mode
(self, runner)
annotator/uniformer/mmcv/runner/hooks/logger/base.py:59
↓ 4 callersFunctionimread
Read an image. Args: img_or_path (ndarray or str or Path): Either a numpy array or str or pathlib.Path. If it is a numpy arra
annotator/uniformer/mmcv/image/io.py:140
↓ 4 callersMethodis_last_iter
(self, runner)
annotator/uniformer/mmcv/runner/hooks/hook.py:70
↓ 4 callersMethodload_from_fileobj
(self, file, **kwargs)
annotator/uniformer/mmcv/fileio/handlers/base.py:13
↓ 4 callersFunctionmake_divisible
Make divisible function. This function rounds the channel number to the nearest value that can be divisible by the divisor. It is taken from
annotator/uniformer/mmseg/models/utils/make_divisible.py:1
↓ 4 callersMethodmake_zero_conv
(self, channels)
models/local_adapter.py:395
↓ 4 callersFunctionmkdir_or_exist
(dir_name, mode=0o777)
annotator/uniformer/mmcv/utils/path.py:26
↓ 4 callersFunctionnoise_pred_fn
(x, t_continuous, cond=None)
ldm/models/diffusion/dpm_solver/dpm_solver.py:257
↓ 4 callersMethodnorm3
nn.Module: normalization layer after the third convolution layer
annotator/uniformer/mmseg/models/backbones/resnet.py:260
↓ 4 callersFunctionnp2tmp
Save ndarray to local numpy file. Args: array (ndarray): Ndarray to save. temp_file_name (str): Numpy file name. If 'temp_file_na
annotator/uniformer/mmseg/apis/test.py:14
↓ 4 callersMethodquantize
(self, x, *args, **kwargs)
ldm/models/autoencoder.py:212
↓ 4 callersFunctionscatter_kwargs
Scatter with support for kwargs dictionary.
annotator/uniformer/mmcv/parallel/scatter_gather.py:49
↓ 4 callersFunctionto_tensor
Convert objects of various python types to :obj:`torch.Tensor`. Supported types are: :class:`numpy.ndarray`, :class:`torch.Tensor`, :class:`S
annotator/uniformer/mmseg/datasets/pipelines/formating.py:11
↓ 4 callersFunctiontrunc_normal_
r"""Fills the input Tensor with values drawn from a truncated normal distribution. The values are effectively drawn from the normal distributi
annotator/uniformer/mmseg/models/utils/weight_init.py:48
↓ 3 callersMethod__init__
(self, groups=1, base_width=4, radix=2, re
annotator/uniformer/mmseg/models/backbones/resnest.py:291
↓ 3 callersMethod__init__
(self, in_channels=3, base_channels=64, num_stages=5,
annotator/uniformer/mmseg/models/backbones/unet.py:277
↓ 3 callersMethod__init__
(self, in_channels=3, num_channels=(32, 64, 128), num_block
annotator/uniformer/mmseg/models/backbones/cgnet.py:215
↓ 3 callersMethod__init__
(self, in_channels=3, downsample_dw_channels=(32, 48), glob
annotator/uniformer/mmseg/models/backbones/fast_scnn.py:296
↓ 3 callersMethod__init__
(self)
annotator/uniformer/mmcv/ops/points_sampler.py:165
↓ 3 callersMethod__init__
(self, *args, **kwargs)
annotator/uniformer/mmcv/ops/deprecated_wrappers.py:11
↓ 3 callersMethod__init__
(self, in_channels, out_channels, **kwargs)
annotator/uniformer/mmcv/ops/merge_cells.py:123
↓ 3 callersMethod__init__
(self, grad_clip=None)
annotator/uniformer/mmcv/runner/hooks/optimizer.py:24
↓ 3 callersMethod__init__
(self, in_channels, sub_sample=False, conv_cfg=dict(type='C
annotator/uniformer/mmcv/cnn/bricks/non_local.py:226
↓ 3 callersMethod__init__
(self, embed_dims=256, feedforward_channels=1024, num_fcs=2
annotator/uniformer/mmcv/cnn/bricks/transformer.py:234
↓ 3 callersMethod__init__
(self, start_index=1)
annotator/midas/midas/vit.py:10
↓ 3 callersMethod__init__
(self, norm_nc, label_nc)
models/local_adapter.py:32
↓ 3 callersFunction_auto_contrast_channel
(im, c, cutoff)
annotator/uniformer/mmcv/image/photometric.py:257
↓ 3 callersMethod_init
(self, runner)
annotator/uniformer/mmcv/runner/hooks/optimizer.py:84
↓ 3 callersFunction_load_checkpoint
Load checkpoint from somewhere (modelzoo, file, url). Args: filename (str): Accept local filepath, URL, ``torchvision://xxx``,
annotator/uniformer/mmcv/runner/checkpoint.py:450
↓ 3 callersFunction_make_divisible
This function is taken from the original tf repo. It ensures that all layers have a channel number that is divisible by 8 It can be seen
annotator/mlsd/models/mbv2_mlsd_tiny.py:71
↓ 3 callersFunction_make_divisible
This function is taken from the original tf repo. It ensures that all layers have a channel number that is divisible by 8 It can be seen
annotator/mlsd/models/mbv2_mlsd_large.py:72
↓ 3 callersFunction_make_encoder
(backbone, features, use_pretrained, groups=1, expand=False, exportable=True, hooks=None, use_vit_only=False,
annotator/midas/midas/blocks.py:11
↓ 3 callersMethod_make_layer
(self, in_channels, out_channels, blocks,
annotator/uniformer/mmseg/models/backbones/fast_scnn.py:148
↓ 3 callersMethod_make_stage
Make each stage.
annotator/uniformer/mmseg/models/backbones/hrnet.py:454
↓ 3 callersMethod_make_transition_layer
Make transition layer.
annotator/uniformer/mmseg/models/backbones/hrnet.py:371
↓ 3 callersMethod_register_module
(self, module_class, module_name=None, force=False)
annotator/uniformer/mmcv/utils/registry.py:235
← previousnext →101–200 of 2,265, ranked by callers