Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import numpy as np

from einops import rearrange
from annotator.util import annotator_ckpts_path
from control_net.annotator.util import annotator_ckpts_path


class DoubleConvBlock(torch.nn.Module):
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .midas.midas_net import MidasNet
from .midas.midas_net_custom import MidasNet_small
from .midas.transforms import Resize, NormalizeImage, PrepareForNet
from annotator.util import annotator_ckpts_path
from control_net.annotator.util import annotator_ckpts_path


ISL_PATHS = {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from .models.mbv2_mlsd_large import MobileV2_MLSD_Large
from .utils import pred_lines

from annotator.util import annotator_ckpts_path
from control_net.annotator.util import annotator_ckpts_path


remote_model_path = "https://huggingface.co/lllyasviel/ControlNet/resolve/main/annotator/ckpts/mlsd_large_512_fp32.pth"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from . import util
from .body import Body
from .hand import Hand
from annotator.util import annotator_ckpts_path
from control_net.annotator.util import annotator_ckpts_path


body_model_path = "https://huggingface.co/lllyasviel/ControlNet/resolve/main/annotator/ckpts/body_pose_model.pth"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

import os

from annotator.uniformer.mmseg.apis import init_segmentor, inference_segmentor, show_result_pyplot
from annotator.uniformer.mmseg.core.evaluation import get_palette
from annotator.util import annotator_ckpts_path
from control_net.annotator.uniformer.mmseg.apis import init_segmentor, inference_segmentor, show_result_pyplot
from control_net.annotator.uniformer.mmseg.core.evaluation import get_palette
from control_net.annotator.util import annotator_ckpts_path


checkpoint_file = "https://huggingface.co/lllyasviel/ControlNet/resolve/main/annotator/ckpts/upernet_global_small.pth"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import torch.nn as nn
import torch.nn.functional as F

from annotator.uniformer.mmcv.utils import TORCH_VERSION, build_from_cfg, digit_version
from control_net.annotator.uniformer.mmcv.utils import TORCH_VERSION, build_from_cfg, digit_version
from .registry import ACTIVATION_LAYERS

for module in [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import torch.nn as nn

from annotator.uniformer.mmcv.utils import _BatchNorm, _InstanceNorm
from control_net.annotator.uniformer.mmcv.utils import _BatchNorm, _InstanceNorm
from ..utils import constant_init, kaiming_init
from .activation import build_activation_layer
from .conv import build_conv_layer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch
import torch.nn as nn

from annotator.uniformer.mmcv import build_from_cfg
from control_net.annotator.uniformer.mmcv import build_from_cfg
from .registry import DROPOUT_LAYERS


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import torch.nn as nn

from annotator.uniformer.mmcv.utils import is_tuple_of
from annotator.uniformer.mmcv.utils.parrots_wrapper import SyncBatchNorm, _BatchNorm, _InstanceNorm
from control_net.annotator.uniformer.mmcv.utils import is_tuple_of
from control_net.annotator.uniformer.mmcv.utils.parrots_wrapper import SyncBatchNorm, _BatchNorm, _InstanceNorm
from .registry import NORM_LAYERS

NORM_LAYERS.register_module('BN', module=nn.BatchNorm2d)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (c) OpenMMLab. All rights reserved.
from annotator.uniformer.mmcv.utils import Registry
from control_net.annotator.uniformer.mmcv.utils import Registry

CONV_LAYERS = Registry('conv layer')
NORM_LAYERS = Registry('norm layer')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import torch
import torch.nn as nn

from annotator.uniformer.mmcv import ConfigDict, deprecated_api_warning
from annotator.uniformer.mmcv.cnn import Linear, build_activation_layer, build_norm_layer
from annotator.uniformer.mmcv.runner.base_module import BaseModule, ModuleList, Sequential
from annotator.uniformer.mmcv.utils import build_from_cfg
from control_net.annotator.uniformer.mmcv import ConfigDict, deprecated_api_warning
from control_net.annotator.uniformer.mmcv.cnn import Linear, build_activation_layer, build_norm_layer
from control_net.annotator.uniformer.mmcv.runner.base_module import BaseModule, ModuleList, Sequential
from control_net.annotator.uniformer.mmcv.utils import build_from_cfg
from .drop import build_dropout
from .registry import (ATTENTION, FEEDFORWARD_NETWORK, POSITIONAL_ENCODING,
TRANSFORMER_LAYER, TRANSFORMER_LAYER_SEQUENCE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import torch.nn as nn
from torch import Tensor

from annotator.uniformer.mmcv.utils import Registry, build_from_cfg, get_logger, print_log
from control_net.annotator.uniformer.mmcv.utils import Registry, build_from_cfg, get_logger, print_log

INITIALIZERS = Registry('initializer')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import torch.distributed as dist

import annotator.uniformer.mmcv as mmcv
from annotator.uniformer.mmcv.runner import get_dist_info
from control_net.annotator.uniformer.mmcv.runner import get_dist_info


def single_gpu_test(model, data_loader):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from urllib.request import urlopen

import annotator.uniformer.mmcv as mmcv
from annotator.uniformer.mmcv.utils.misc import has_method
from annotator.uniformer.mmcv.utils.path import is_filepath
from control_net.annotator.uniformer.mmcv.utils.misc import has_method
from control_net.annotator.uniformer.mmcv.utils.path import is_filepath


class BaseStorageBackend(metaclass=ABCMeta):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from cv2 import (IMREAD_COLOR, IMREAD_GRAYSCALE, IMREAD_IGNORE_ORIENTATION,
IMREAD_UNCHANGED)

from annotator.uniformer.mmcv.utils import check_file_exist, is_str, mkdir_or_exist
from control_net.annotator.uniformer.mmcv.utils import check_file_exist, is_str, mkdir_or_exist

try:
from turbojpeg import TJCS_RGB, TJPF_BGR, TJPF_GRAY, TurboJPEG
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import torch.nn as nn
import torch.nn.functional as F

from annotator.uniformer.mmcv.cnn import PLUGIN_LAYERS, Scale
from control_net.annotator.uniformer.mmcv.cnn import PLUGIN_LAYERS, Scale


def NEG_INF_DIAG(n, device):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from torch.autograd.function import once_differentiable
from torch.nn.modules.utils import _pair, _single

from annotator.uniformer.mmcv.utils import deprecated_api_warning
from control_net.annotator.uniformer.mmcv.utils import deprecated_api_warning
from ..cnn import CONV_LAYERS
from ..utils import ext_loader, print_log

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from torch.autograd.function import once_differentiable
from torch.nn.modules.utils import _pair, _single

from annotator.uniformer.mmcv.utils import deprecated_api_warning
from control_net.annotator.uniformer.mmcv.utils import deprecated_api_warning
from ..cnn import CONV_LAYERS
from ..utils import ext_loader, print_log

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import torch.nn.functional as F
from torch.autograd.function import Function, once_differentiable

from annotator.uniformer.mmcv import deprecated_api_warning
from annotator.uniformer.mmcv.cnn import constant_init, xavier_init
from annotator.uniformer.mmcv.cnn.bricks.registry import ATTENTION
from annotator.uniformer.mmcv.runner import BaseModule
from control_net.annotator.uniformer.mmcv import deprecated_api_warning
from control_net.annotator.uniformer.mmcv.cnn import constant_init, xavier_init
from control_net.annotator.uniformer.mmcv.cnn.bricks.registry import ATTENTION
from control_net.annotator.uniformer.mmcv.runner import BaseModule
from ..utils import ext_loader

ext_module = ext_loader.load_ext(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np
import torch

from annotator.uniformer.mmcv.utils import deprecated_api_warning
from control_net.annotator.uniformer.mmcv.utils import deprecated_api_warning
from ..utils import ext_loader

ext_module = ext_loader.load_ext(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import torch
from torch import nn as nn

from annotator.uniformer.mmcv.runner import force_fp32
from control_net.annotator.uniformer.mmcv.runner import force_fp32
from .furthest_point_sample import (furthest_point_sample,
furthest_point_sample_with_dist)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import torch.nn as nn
import torch.nn.functional as F

from annotator.uniformer.mmcv.cnn import CONV_LAYERS, ConvAWS2d, constant_init
from annotator.uniformer.mmcv.ops.deform_conv import deform_conv2d
from annotator.uniformer.mmcv.utils import TORCH_VERSION, digit_version
from control_net.annotator.uniformer.mmcv.cnn import CONV_LAYERS, ConvAWS2d, constant_init
from control_net.annotator.uniformer.mmcv.ops.deform_conv import deform_conv2d
from control_net.annotator.uniformer.mmcv.utils import TORCH_VERSION, digit_version


@CONV_LAYERS.register_module(name='SAC')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from torch.nn.modules.module import Module
from torch.nn.parameter import Parameter

from annotator.uniformer.mmcv.cnn import NORM_LAYERS
from control_net.annotator.uniformer.mmcv.cnn import NORM_LAYERS
from ..utils import ext_loader

ext_module = ext_loader.load_ext('_ext', [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
from torch.autograd import Function
from torch.nn import functional as F

from annotator.uniformer.mmcv.utils import to_2tuple
from control_net.annotator.uniformer.mmcv.utils import to_2tuple
from ..utils import ext_loader

upfirdn2d_ext = ext_loader.load_ext('_ext', ['upfirdn2d'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from torch.nn.parallel.distributed import (DistributedDataParallel,
_find_tensors)

from annotator.uniformer.mmcv import print_log
from annotator.uniformer.mmcv.utils import TORCH_VERSION, digit_version
from control_net.annotator.uniformer.mmcv import print_log
from control_net.annotator.uniformer.mmcv.utils import TORCH_VERSION, digit_version
from .scatter_gather import scatter_kwargs


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from torch._utils import (_flatten_dense_tensors, _take_tensors,
_unflatten_dense_tensors)

from annotator.uniformer.mmcv.utils import TORCH_VERSION, digit_version
from control_net.annotator.uniformer.mmcv.utils import TORCH_VERSION, digit_version
from .registry import MODULE_WRAPPERS
from .scatter_gather import scatter_kwargs

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) OpenMMLab. All rights reserved.
from torch.nn.parallel import DataParallel, DistributedDataParallel

from annotator.uniformer.mmcv.utils import Registry
from control_net.annotator.uniformer.mmcv.utils import Registry

MODULE_WRAPPERS = Registry('module wrapper')
MODULE_WRAPPERS.register_module(module=DataParallel)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

import torch.nn as nn

from annotator.uniformer.mmcv.runner.dist_utils import master_only
from annotator.uniformer.mmcv.utils.logging import get_logger, logger_initialized, print_log
from control_net.annotator.uniformer.mmcv.runner.dist_utils import master_only
from control_net.annotator.uniformer.mmcv.utils.logging import get_logger, logger_initialized, print_log


class BaseModule(nn.Module, metaclass=ABCMeta):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import torch
import torch.nn as nn

from annotator.uniformer.mmcv.utils import TORCH_VERSION, digit_version
from control_net.annotator.uniformer.mmcv.utils import TORCH_VERSION, digit_version
from .dist_utils import allreduce_grads as _allreduce_grads

try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os.path as osp
import warnings

from annotator.uniformer.mmcv.fileio import FileClient
from control_net.annotator.uniformer.mmcv.fileio import FileClient
from ..dist_utils import allreduce_params, master_only
from .hook import HOOKS, Hook

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from torch.nn.modules.batchnorm import _BatchNorm
from torch.utils.data import DataLoader

from annotator.uniformer.mmcv.fileio import FileClient
from annotator.uniformer.mmcv.utils import is_seq_of
from control_net.annotator.uniformer.mmcv.fileio import FileClient
from control_net.annotator.uniformer.mmcv.utils import is_seq_of
from .hook import Hook
from .logger import LoggerHook

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (c) OpenMMLab. All rights reserved.
from annotator.uniformer.mmcv.utils import Registry, is_method_overridden
from control_net.annotator.uniformer.mmcv.utils import Registry, is_method_overridden

HOOKS = Registry('hook')

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp

from annotator.uniformer.mmcv.utils import TORCH_VERSION, digit_version
from control_net.annotator.uniformer.mmcv.utils import TORCH_VERSION, digit_version
from ...dist_utils import master_only
from ..hook import HOOKS
from .base import LoggerHook
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import torch.distributed as dist

import annotator.uniformer.mmcv as mmcv
from annotator.uniformer.mmcv.fileio.file_client import FileClient
from annotator.uniformer.mmcv.utils import is_tuple_of, scandir
from control_net.annotator.uniformer.mmcv.fileio.file_client import FileClient
from control_net.annotator.uniformer.mmcv.utils import is_tuple_of, scandir
from ..hook import HOOKS
from .base import LoggerHook

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from torch.nn.utils import clip_grad

from annotator.uniformer.mmcv.utils import TORCH_VERSION, _BatchNorm, digit_version
from control_net.annotator.uniformer.mmcv.utils import TORCH_VERSION, _BatchNorm, digit_version
from ..dist_utils import allreduce_grads
from ..fp16_utils import LossScaler, wrap_fp16_model
from .hook import HOOKS, Hook
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import torch
from torch.nn import GroupNorm, LayerNorm

from annotator.uniformer.mmcv.utils import _BatchNorm, _InstanceNorm, build_from_cfg, is_list_of
from annotator.uniformer.mmcv.utils.ext_loader import check_ops_exist
from control_net.annotator.uniformer.mmcv.utils import _BatchNorm, _InstanceNorm, build_from_cfg, is_list_of
from control_net.annotator.uniformer.mmcv.utils.ext_loader import check_ops_exist
from .builder import OPTIMIZER_BUILDERS, OPTIMIZERS


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import torch

from annotator.uniformer.mmcv.utils import digit_version
from control_net.annotator.uniformer.mmcv.utils import digit_version


def is_jit_tracing() -> bool:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
CAP_PROP_FRAME_HEIGHT, CAP_PROP_FRAME_WIDTH,
CAP_PROP_POS_FRAMES, VideoWriter_fourcc)

from annotator.uniformer.mmcv.utils import (check_file_exist, mkdir_or_exist, scandir,
from control_net.annotator.uniformer.mmcv.utils import (check_file_exist, mkdir_or_exist, scandir,
track_progress)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import cv2
import numpy as np

from annotator.uniformer.mmcv.arraymisc import dequantize, quantize
from annotator.uniformer.mmcv.image import imread, imwrite
from annotator.uniformer.mmcv.utils import is_str
from control_net.annotator.uniformer.mmcv.arraymisc import dequantize, quantize
from control_net.annotator.uniformer.mmcv.image import imread, imwrite
from control_net.annotator.uniformer.mmcv.utils import is_str


def flowread(flow_or_path, quantize=False, concat_axis=0, *args, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import subprocess
import tempfile

from annotator.uniformer.mmcv.utils import requires_executable
from control_net.annotator.uniformer.mmcv.utils import requires_executable


@requires_executable('ffmpeg')
Expand Down
Loading