MCPcopy Create free account

hub / github.com/GraftingRayman/Comfyui-reactor-node / functions

Functions1,050 in github.com/GraftingRayman/Comfyui-reactor-node

↓ 130 callersMethodget
(self, name, suffix='basicsr')
r_basicsr/utils/registry.py:65
↓ 36 callersFunctionget_root_logger
Get the root logger. The logger will be initialized if it has not been initialized. By default a StreamHandler will be added. If `log_file
r_basicsr/utils/logger.py:146
↓ 31 callersMethodrepeat
(x, k=2)
r_basicsr/utils/diffjpeg.py:366
↓ 22 callersMethodkeys
(self)
r_basicsr/utils/registry.py:80
↓ 19 callersMethodbackward
(ctx, grad_output)
r_basicsr/archs/dfdnet_util.py:32
↓ 17 callersFunctionimfrombytes
Read an image from bytes. Args: content (bytes): Image bytes got from files or other streams. flag (str): Flags specifying th
r_basicsr/utils/img_util.py:114
↓ 14 callersMethod__init__
(self)
r_basicsr/utils/diffjpeg.py:125
↓ 14 callersFunctionbuild_loss
Build loss from options. Args: opt (dict): Configuration. It must contain: type (str): Model type.
r_basicsr/losses/__init__.py:19
↓ 14 callersFunctionnormalize
(in_channels)
scripts/r_archs/vqgan_arch.py:15
↓ 13 callersMethod__init__
(self, in_channels, num_style_feat, upsample=True, resample_kernel=(1, 3, 3, 1))
r_basicsr/archs/stylegan2_arch.py:347
↓ 13 callersFunctionanalyze_faces
(img_data: np.ndarray, det_size=(640, 640))
scripts/reactor_swapper.py:179
↓ 13 callersFunctionconv_dw
(inp, oup, stride, leaky=0.1)
r_facelib/detection/retinaface/retinaface_net.py:25
↓ 12 callersMethodclose
(self)
r_basicsr/utils/lmdb_util.py:193
↓ 12 callersFunctionimg2tensor
Numpy array to tensor. Args: imgs (list[ndarray] | ndarray): Input images. bgr2rgb (bool): Whether to change bgr to rgb.
r_basicsr/utils/img_util.py:9
↓ 12 callersMethodsave_network
Save networks. Args: net (nn.Module | list[nn.Module]): Network(s) to be saved. net_label (str): Network label.
r_basicsr/models/base_model.py:196
↓ 12 callersFunctionscandir
Scan a directory to find the interested files. Args: dir_path (str): Path of the directory. suffix (str | tuple(str), optiona
r_basicsr/utils/misc.py:52
↓ 12 callersMethodupsample
Compute the output image given the features. Args: lqs (tensor): Input low quality (LQ) sequence with shape (n,
r_basicsr/archs/basicvsrpp_arch.py:232
↓ 11 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
r_basicsr/archs/swinir_arch.py:45
↓ 11 callersMethodget_optimizer
(self, optim_type, params, lr, **kwargs)
r_basicsr/models/base_model.py:103
↓ 10 callersMethod__init__
(self, c1, c2, n=1, shortcut=True, g=1, e=0.5)
r_facelib/detection/yolov5face/models/common.py:108
↓ 10 callersFunctionbuild_network
(opt)
r_basicsr/archs/__init__.py:19
↓ 10 callersMethoderode
(self, image, distance)
nodes.py:1033
↓ 10 callersFunctionfilter2D
PyTorch version of cv2.filter2D Args: img (Tensor): (b, c, h, w) kernel (Tensor): (b, k, k)
r_basicsr/utils/img_process_util.py:7
↓ 10 callersFunctionflow_warp
Warp an image or feature map with optical flow. Args: x (Tensor): Tensor with size (n, c, h, w). flow (Tensor): Tensor with s
r_basicsr/archs/arch_util.py:121
↓ 10 callersFunctionmake_layer
Make layers by stacking the same blocks. Args: basic_block (nn.module): nn.module class for basic block. num_basic_block (int
r_basicsr/archs/arch_util.py:52
↓ 10 callersMethodmodel_ema
(self, decay=0.999)
r_basicsr/models/base_model.py:75
↓ 10 callersFunctiontensor2img
Convert torch Tensors into image numpy arrays. After clamping to [min, max], values will be normalized to [0, 1]. Args: tensor
r_basicsr/utils/img_util.py:38
↓ 9 callersMethod__init__
(self, in_channels, nf, emb_dim, ch_mult, num_res_blocks, resolution, attn_resolutions)
scripts/r_archs/vqgan_arch.py:232
↓ 9 callersFunctionaugment
Augment: horizontal flips OR rotate (0, 90, 180, 270 degrees). We use vertical flip and transpose for rotation implementation. All the ima
r_basicsr/data/transforms.py:94
↓ 9 callersMethodload_network
Load network. Args: load_path (str): The path of networks to be loaded. net (nn.Module): Network. st
r_basicsr/models/base_model.py:277
↓ 9 callersFunctionread_img_seq
Read a sequence of images from a given folder path. Args: path (list[str] | str): List of image paths or image folder path. r
r_basicsr/data/data_util.py:11
↓ 8 callersMethodact
(self, x)
r_basicsr/archs/hifacegan_util.py:109
↓ 8 callersFunctionpaired_random_crop
Paired random crop. Support Numpy array and Tensor inputs. It crops lists of lq and gt images with corresponding locations. Args:
r_basicsr/data/transforms.py:26
↓ 7 callersMethodflops
(self)
r_basicsr/archs/swinir_arch.py:560
↓ 7 callersMethodreduce_loss_dict
reduce loss dict. In distributed training, it averages the losses among different GPUs . Args: loss_dict (OrderedDi
r_basicsr/models/base_model.py:355
↓ 6 callersMethoddilate
(self, image, distance)
nodes.py:1036
↓ 6 callersFunctionget_dist_info
()
r_basicsr/utils/dist_util.py:60
↓ 6 callersFunctionget_face_single
(img_data: np.ndarray, face, face_index=0, det_size=(640, 640), gender_source=0, gender_target=0, order="large
scripts/reactor_swapper.py:190
↓ 6 callersFunctionhalf_det_size
(det_size)
scripts/reactor_swapper.py:175
↓ 6 callersMethodmodel_to_device
Model to device. It also warps models with DistributedDataParallel or DataParallel. Args: net (nn.Module)
r_basicsr/models/base_model.py:87
↓ 6 callersMethodprint_network
Print the str and parameter number of a network. Args: net (nn.Module)
r_basicsr/models/base_model.py:132
↓ 5 callersMethod__init__
(self, in_channel, out_channel)
r_facelib/detection/retinaface/retinaface_net.py:38
↓ 5 callersMethod__init__
(self, num_class)
r_facelib/parsing/bisenet.py:112
↓ 5 callersMethod__init__
(self, in_channels, mid_channels, out_channels)
r_basicsr/archs/ridnet_arch.py:123
↓ 5 callersMethodbegin
(self)
modules/shared.py:8
↓ 5 callersFunctionconv_bn
(inp, oup, stride=1, leaky=0)
r_facelib/detection/retinaface/retinaface_net.py:6
↓ 5 callersMethodfeed_data
(self, data)
r_basicsr/models/sr_model.py:87
↓ 5 callersMethodformat
(self, record)
scripts/reactor_logger.py:20
↓ 5 callersMethodget_bare_model
Get bare model, especially under wrapping with DistributedDataParallel or DataParallel.
r_basicsr/models/base_model.py:123
↓ 5 callersFunctionget_model_names
(get_models)
nodes.py:114
↓ 5 callersFunctionimwrite
Write image to file. Args: img (ndarray): Image array to be written. file_path (str): Image file path. params (None
r_basicsr/utils/img_util.py:135
↓ 5 callersFunctionreorder_image
Reorder images to 'HWC' order. If the input_order is (h, w), return (h, w, 1); If the input_order is (c, h, w), return (h, w, c); If
r_basicsr/metrics/metric_util.py:6
↓ 5 callersMethodsave_training_state
Save training states during training, which will be used for resuming. Args: epoch (int): Current epoch.
r_basicsr/models/base_model.py:306
↓ 5 callersMethodsetup_schedulers
Set up schedulers.
r_basicsr/models/base_model.py:110
↓ 5 callersFunctiontformfwd
Function: ---------- apply affine transform 'trans' to uv Parameters: ---------- @trans: 3x3 np.array
r_facelib/detection/matlab_cp2tform.py:13
↓ 5 callersFunctionto_y_channel
Change to Y channel of YCbCr. Args: img (ndarray): Images with range [0, 255]. Returns: (ndarray): Images with range [
r_basicsr/metrics/metric_util.py:32
↓ 4 callersMethod__init__
(self, in_size=128, out_size=128, min_feat_size=32,
r_facelib/parsing/parsenet.py:142
↓ 4 callersMethod__init__
(self, in_channels, num_style_feat, upsample=True)
r_chainner/archs/face/stylegan2_clean_arch.py:201
↓ 4 callersMethod__init__
Build pretrained InceptionV3. Args: output_blocks (list[int]): Indices of blocks to return features of. Possi
r_basicsr/archs/inception.py:32
↓ 4 callersMethod__init__
(self, loss_weight=1.0, reduction='mean')
r_basicsr/losses/basic_loss.py:37
↓ 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 p
r_basicsr/utils/color_util.py:129
↓ 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,
r_basicsr/utils/color_util.py:156
↓ 4 callersMethod_gram_mat
Calculate Gram matrix. Args: x (torch.Tensor): Tensor with shape of (n, c, h, w). Returns: torch.Tenso
r_basicsr/losses/basic_loss.py:240
↓ 4 callersFunction_ntuple
(n)
r_basicsr/archs/arch_util.py:308
↓ 4 callersFunctionadd_folder_path_and_extensions
(folder_name, full_folder_paths, extensions)
reactor_utils.py:212
↓ 4 callersFunctioncalculate_metric
Calculate metric from data and options. Args: opt (dict): Configuration. It must contain: type (str): Model type.
r_basicsr/metrics/__init__.py:10
↓ 4 callersFunctioncreate_layer_basic
(in_chan, out_chan, bnum, stride=1)
r_facelib/parsing/resnet.py:41
↓ 4 callersFunctiondefault_init_weights
Initialize network weights. Args: module_list (list[nn.Module] | nn.Module): Modules to be initialized. scale (float): Scale
r_basicsr/archs/arch_util.py:22
↓ 4 callersMethodencode
(self, input_tensor)
r_basicsr/archs/hifacegan_arch.py:163
↓ 4 callersMethodforward_features
(self, x)
r_basicsr/archs/swinir_arch.py:876
↓ 4 callersMethodget_current_visuals
(self)
r_basicsr/models/sr_model.py:218
↓ 4 callersFunctionget_image_md5hash
(image: Image.Image)
reactor_utils.py:150
↓ 4 callersFunctionget_location
(val, length)
r_facelib/utils/face_restoration_helper.py:14
↓ 4 callersFunctionis_installed
( package: str, version: str = None, strict: bool = True )
install.py:31
↓ 4 callersFunctionrandom_add_gaussian_noise_pt
(img, sigma_range=(0, 1.0), gray_prob=0, clip=True, rounds=False)
r_basicsr/data/degradations.py:548
↓ 4 callersFunctionrandom_add_poisson_noise_pt
(img, scale_range=(0, 1.0), gray_prob=0, clip=True, rounds=False)
r_basicsr/data/degradations.py:718
↓ 4 callersFunctionrgb2ycbcr_pt
Convert RGB images to YCbCr images (PyTorch version). It implements the ITU-R BT.601 conversion for standard-definition television. See more de
r_basicsr/utils/color_util.py:186
↓ 4 callersFunctionrun_pip
(*args)
install.py:28
↓ 4 callersMethodsave
(self, epoch, current_iter)
r_basicsr/models/sr_model.py:226
↓ 4 callersMethodstart
(self)
r_basicsr/utils/logger.py:20
↓ 4 callersFunctiontensor2img
(tensor, rgb2bgr=True, out_type=np.uint8, min_max=(0, 1))
reactor_utils.py:65
↓ 4 callersFunctiontensor_to_pil
(img_tensor, batch_index=0)
reactor_utils.py:20
↓ 4 callersMethodtolist
(self)
r_facelib/detection/yolov5face/models/common.py:293
↓ 4 callersFunctionunload_model
(model)
scripts/reactor_swapper.py:86
↓ 3 callersMethod__init__
(self, dim_embd=512, n_head=8, n_layers=9, codebook_size=1024, latent_size=256,
scripts/r_archs/codeformer_arch.py:163
↓ 3 callersMethod__init__
(self, in_channels, out_channels, kernel_size,
r_basicsr/ops/dcn/deform_conv.py:193
↓ 3 callersMethod__init__
(self, num_feat=64, num_block=15, keyframe_stride=5,
r_basicsr/archs/basicvsr_arch.py:133
↓ 3 callersMethod__init__
(self, config_text, norm_nc, label_nc)
r_basicsr/archs/hifacegan_util.py:14
↓ 3 callersMethod__init__
(self, num_in_ch=3, num_out_ch=3, num_feat=64,
r_basicsr/archs/edvr_arch.py:272
↓ 3 callersMethod__init__
(self, scale=4, num_layer=52, adapt_official_weights=False)
r_basicsr/archs/duf_arch.py:205
↓ 3 callersMethod__init__
(self, num_in_ch=3, num_feat=64, use_vae=False,
r_basicsr/archs/hifacegan_arch.py:151
↓ 3 callersMethod__init__
(self, num_feat, squeeze_factor=16, res_scale=1)
r_basicsr/archs/rcan_arch.py:36
↓ 3 callersMethod_initialize_best_metric_results
Initialize the best metric results dict for recording the best metric value and iteration.
r_basicsr/models/base_model.py:50
↓ 3 callersMethod_log_validation_metric_values
(self, current_iter, dataset_name, tb_logger)
r_basicsr/models/sr_model.py:203
↓ 3 callersFunctionapply_patch
(console_log_level)
reactor_patcher.py:126
↓ 3 callersFunctionbgr2ycbcr
Convert a BGR image to YCbCr image. The bgr version of rgb2ycbcr. It implements the ITU-R BT.601 conversion for standard-definition t
r_basicsr/utils/color_util.py:38
↓ 3 callersFunctionbuild_dataloader
Build dataloader. Args: dataset (torch.utils.data.Dataset): Dataset. dataset_opt (dict): Dataset options. It contains the fol
r_basicsr/data/__init__.py:40
↓ 3 callersFunctionbuild_dataset
Build dataset from options. Args: dataset_opt (dict): Configuration for dataset. It must contain: name (str): Dataset nam
r_basicsr/data/__init__.py:25
↓ 3 callersFunctioncenter_of_bbox
(bbox)
scripts/r_masking/core.py:325
↓ 3 callersFunctioncircular_lowpass_kernel
2D sinc filter, ref: https://dsp.stackexchange.com/questions/58301/2-d-circularly-symmetric-low-pass-filter Args: cutoff (float): cuto
r_basicsr/data/degradations.py:395
next →1–100 of 1,050, ranked by callers