Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- comfyui_controlnet_aux/.github/workflows/publish.ymlAdded+25
- comfyui_controlnet_aux/.gitignoreAdded+183
- comfyui_controlnet_aux/.trackingAdded+746
- comfyui_controlnet_aux/LICENSE.txtAdded+201
- comfyui_controlnet_aux/README.mdAdded+252
- comfyui_controlnet_aux/UPDATES.mdAdded+45
- comfyui_controlnet_aux/__init__.pyAdded+224
- comfyui_controlnet_aux/__pycache__/__init__.cpython-310.pycAdded
- comfyui_controlnet_aux/__pycache__/hint_image_enchance.cpython-310.pycAdded
- comfyui_controlnet_aux/__pycache__/log.cpython-310.pycAdded
- comfyui_controlnet_aux/__pycache__/lvminthin.cpython-310.pycAdded
- comfyui_controlnet_aux/__pycache__/utils.cpython-310.pycAdded
- comfyui_controlnet_aux/config.example.yamlAdded+20
- comfyui_controlnet_aux/dev_interface.pyAdded+6
- comfyui_controlnet_aux/examples/example_onnx.pngAdded
- comfyui_controlnet_aux/hint_image_enchance.pyAdded+233
- comfyui_controlnet_aux/install.batAdded+20
- comfyui_controlnet_aux/log.pyAdded+80
- comfyui_controlnet_aux/lvminthin.pyAdded+87
- comfyui_controlnet_aux/node_wrappers/__pycache__/anime_face_segment.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/anyline.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/binary.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/canny.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/color.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/densepose.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/depth_anything.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/depth_anything_v2.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/diffusion_edge.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/dsine.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/dwpose.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/hed.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/inpaint.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/leres.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/lineart.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/lineart_anime.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/lineart_standard.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/manga_line.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/mediapipe_face.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/mesh_graphormer.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/metric3d.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/midas.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/mlsd.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/normalbae.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/oneformer.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/openpose.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/pidinet.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/pose_keypoint_postprocess.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/pyracanny.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/recolor.cpython-310.pycAdded
- comfyui_controlnet_aux/node_wrappers/__pycache__/scribble.cpython-310.pycAdded
12345678910111213141516171819202122232425name: Publish to Comfy registryon: workflow_dispatch: push: branches: - main paths: - "pyproject.toml"
permissions: issues: write
jobs: publish-node: name: Publish Custom Node to registry runs-on: ubuntu-latest if: ${{ github.repository_owner == 'Fannovel16' }} steps: - name: Check out code uses: actions/checkout@v4 - name: Publish Custom Node uses: Comfy-Org/publish-node-action@v1 with: ## Add your own personal access token to your Github Repository secrets and reference it here. personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183# Initially taken from Github's Python gitignore file
# Byte-compiled / optimized / DLL files__pycache__/*.py[cod]*$py.class
# C extensions*.so
# tests and logstests/fixtures/cached_*_text.txtlogs/lightning_logs/lang_code_data/tests/outputs
# Distribution / packaging.Pythonbuild/develop-eggs/dist/downloads/eggs/.eggs/lib/lib64/parts/sdist/var/wheels/*.egg-info/.installed.cfg*.eggMANIFEST
# PyInstaller# Usually these files are written by a python script from a template# before PyInstaller builds the exe, so as to inject date/other infos into it.*.manifest*.spec
# Installer logspip-log.txtpip-delete-this-directory.txt
# Unit test / coverage reportshtmlcov/.tox/.nox/.coverage.coverage.*.cachenosetests.xmlcoverage.xml*.cover.hypothesis/.pytest_cache/
# Translations*.mo*.pot
# Django stuff:*.loglocal_settings.pydb.sqlite3
# Flask stuff:instance/.webassets-cache
# Scrapy stuff:.scrapy
# Sphinx documentationdocs/_build/
# PyBuildertarget/
# Jupyter Notebook.ipynb_checkpoints
# IPythonprofile_default/ipython_config.py
# pyenv.python-version
# celery beat schedule filecelerybeat-schedule
# SageMath parsed files*.sage.py
# Environments.env.venvenv/venv/ENV/env.bak/venv.bak/
# Spyder project settings.spyderproject.spyproject
# Rope project settings.ropeproject
# mkdocs documentation/site
# mypy.mypy_cache/.dmypy.jsondmypy.json
# Pyre type checker.pyre/
# vscode.vs.vscode
# Pycharm.idea
# TF codetensorflow_code
# Modelsproc_data
# examplesruns/runs_old/wandb/examples/runs/examples/**/*.args/examples/rag/sweep
# data/dataserialization_dir
# emacs*.*~debug.env
# vim.*.swp
#ctagstags
# pre-commit.pre-commit*
# .lock*.lock
# DS_Store (MacOS).DS_Store# RL pipelines may produce mp4 outputs*.mp4
# dependencies/transformers
# ruff.ruff_cache
wandb
ckpts/
test.ipynbconfig.yamltest.ipynb123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746.github/workflows/publish.yml
.gitignore
LICENSE.txt
NotoSans-Regular.ttf
README.md
UPDATES.md
__init__.py
config.example.yaml
dev_interface.py
examples/CNAuxBanner.jpg
examples/ExecuteAll.png
examples/ExecuteAll1.jpg
examples/ExecuteAll2.jpg
examples/comfyui-controlnet-aux-logo.png
examples/example_animal_pose.png
examples/example_anime_face_segmentor.png
examples/example_anyline.png
examples/example_densepose.png
examples/example_depth_anything.png
examples/example_depth_anything_v2.png
examples/example_dsine.png
examples/example_marigold.png
examples/example_marigold_flat.jpg
examples/example_mesh_graphormer.png
examples/example_metric3d.png
examples/example_onnx.png
examples/example_recolor.png
examples/example_save_kps.png
examples/example_teed.png
examples/example_torchscript.png
examples/example_unimatch.png
hint_image_enchance.py
install.bat
log.py
lvminthin.py
node_wrappers/anime_face_segment.py
node_wrappers/anyline.py
node_wrappers/binary.py
node_wrappers/canny.py
node_wrappers/color.py
node_wrappers/densepose.py
node_wrappers/depth_anything.py
node_wrappers/depth_anything_v2.py
node_wrappers/diffusion_edge.py
node_wrappers/dsine.py
node_wrappers/dwpose.py
node_wrappers/hed.py
node_wrappers/inpaint.py
node_wrappers/leres.py
node_wrappers/lineart.py
node_wrappers/lineart_anime.py
node_wrappers/lineart_standard.py
node_wrappers/manga_line.py
node_wrappers/mediapipe_face.py
node_wrappers/mesh_graphormer.py
node_wrappers/metric3d.py
node_wrappers/midas.py
node_wrappers/mlsd.py
node_wrappers/normalbae.py
node_wrappers/oneformer.py
node_wrappers/openpose.py
node_wrappers/pidinet.py
node_wrappers/pose_keypoint_postprocess.py
node_wrappers/pyracanny.py
node_wrappers/recolor.py
node_wrappers/scribble.py
node_wrappers/segment_anything.py
node_wrappers/shuffle.py
node_wrappers/teed.py
node_wrappers/tile.py
node_wrappers/uniformer.py
node_wrappers/unimatch.py
node_wrappers/zoe.py
pyproject.toml
requirements.txt
search_hf_assets.py
src/__init__.py
src/custom_controlnet_aux/__init__.py
src/custom_controlnet_aux/anime_face_segment/__init__.py
src/custom_controlnet_aux/anime_face_segment/anime_segmentation.py
src/custom_controlnet_aux/anime_face_segment/isnet.py
src/custom_controlnet_aux/anime_face_segment/network.py
src/custom_controlnet_aux/anime_face_segment/util.py
src/custom_controlnet_aux/binary/__init__.py
src/custom_controlnet_aux/canny/__init__.py
src/custom_controlnet_aux/color/__init__.py
src/custom_controlnet_aux/densepose/__init__.py
src/custom_controlnet_aux/densepose/densepose.py
src/custom_controlnet_aux/depth_anything/__init__.py
src/custom_controlnet_aux/depth_anything/transformers.py
src/custom_controlnet_aux/depth_anything_v2/__init__.py
src/custom_controlnet_aux/depth_anything_v2/dinov2.py
src/custom_controlnet_aux/depth_anything_v2/dinov2_layers/__init__.py
src/custom_controlnet_aux/depth_anything_v2/dinov2_layers/attention.py
src/custom_controlnet_aux/depth_anything_v2/dinov2_layers/block.py
src/custom_controlnet_aux/depth_anything_v2/dinov2_layers/drop_path.py
src/custom_controlnet_aux/depth_anything_v2/dinov2_layers/layer_scale.py
src/custom_controlnet_aux/depth_anything_v2/dinov2_layers/mlp.py
src/custom_controlnet_aux/depth_anything_v2/dinov2_layers/patch_embed.py
src/custom_controlnet_aux/depth_anything_v2/dinov2_layers/swiglu_ffn.py
src/custom_controlnet_aux/depth_anything_v2/dpt.py
src/custom_controlnet_aux/depth_anything_v2/util/blocks.py
src/custom_controlnet_aux/depth_anything_v2/util/transform.py
src/custom_controlnet_aux/diffusion_edge/__init__.py
src/custom_controlnet_aux/diffusion_edge/default.yaml
src/custom_controlnet_aux/diffusion_edge/denoising_diffusion_pytorch/__init__.py
src/custom_controlnet_aux/diffusion_edge/denoising_diffusion_pytorch/data.py
src/custom_controlnet_aux/diffusion_edge/denoising_diffusion_pytorch/ddm_const_sde.py
src/custom_controlnet_aux/diffusion_edge/denoising_diffusion_pytorch/efficientnet.py
src/custom_controlnet_aux/diffusion_edge/denoising_diffusion_pytorch/ema.py
src/custom_controlnet_aux/diffusion_edge/denoising_diffusion_pytorch/encoder_decoder.py
src/custom_controlnet_aux/diffusion_edge/denoising_diffusion_pytorch/imagenet.py
src/custom_controlnet_aux/diffusion_edge/denoising_diffusion_pytorch/loss.py
src/custom_controlnet_aux/diffusion_edge/denoising_diffusion_pytorch/mask_cond_unet.py
src/custom_controlnet_aux/diffusion_edge/denoising_diffusion_pytorch/quantization.py
src/custom_controlnet_aux/diffusion_edge/denoising_diffusion_pytorch/resnet.py
src/custom_controlnet_aux/diffusion_edge/denoising_diffusion_pytorch/swin_transformer.py
src/custom_controlnet_aux/diffusion_edge/denoising_diffusion_pytorch/uncond_unet.py
src/custom_controlnet_aux/diffusion_edge/denoising_diffusion_pytorch/utils.py
src/custom_controlnet_aux/diffusion_edge/denoising_diffusion_pytorch/vgg.py
src/custom_controlnet_aux/diffusion_edge/denoising_diffusion_pytorch/wavelet.py
src/custom_controlnet_aux/diffusion_edge/denoising_diffusion_pytorch/wcc.py
src/custom_controlnet_aux/diffusion_edge/model.py
src/custom_controlnet_aux/diffusion_edge/requirement.txt
src/custom_controlnet_aux/diffusion_edge/taming/__init__.py
src/custom_controlnet_aux/diffusion_edge/taming/data/ade20k.py
src/custom_controlnet_aux/diffusion_edge/taming/data/annotated_objects_coco.py
src/custom_controlnet_aux/diffusion_edge/taming/data/annotated_objects_dataset.py
src/custom_controlnet_aux/diffusion_edge/taming/data/annotated_objects_open_images.py
src/custom_controlnet_aux/diffusion_edge/taming/data/base.py
src/custom_controlnet_aux/diffusion_edge/taming/data/coco.py
src/custom_controlnet_aux/diffusion_edge/taming/data/conditional_builder/objects_bbox.py
src/custom_controlnet_aux/diffusion_edge/taming/data/conditional_builder/objects_center_points.py
src/custom_controlnet_aux/diffusion_edge/taming/data/conditional_builder/utils.py
src/custom_controlnet_aux/diffusion_edge/taming/data/custom.py
src/custom_controlnet_aux/diffusion_edge/taming/data/faceshq.py
src/custom_controlnet_aux/diffusion_edge/taming/data/helper_types.py
src/custom_controlnet_aux/diffusion_edge/taming/data/image_transforms.py
src/custom_controlnet_aux/diffusion_edge/taming/data/imagenet.py
src/custom_controlnet_aux/diffusion_edge/taming/data/open_images_helper.py
src/custom_controlnet_aux/diffusion_edge/taming/data/sflckr.py
src/custom_controlnet_aux/diffusion_edge/taming/data/utils.py
src/custom_controlnet_aux/diffusion_edge/taming/modules/autoencoder/lpips/vgg.pth
src/custom_controlnet_aux/diffusion_edge/taming/modules/diffusionmodules/model.py
src/custom_controlnet_aux/diffusion_edge/taming/modules/discriminator/model.py
src/custom_controlnet_aux/diffusion_edge/taming/modules/losses/__init__.py
src/custom_controlnet_aux/diffusion_edge/taming/modules/losses/lpips.py
src/custom_controlnet_aux/diffusion_edge/taming/modules/losses/segmentation.py
src/custom_controlnet_aux/diffusion_edge/taming/modules/losses/util.py
src/custom_controlnet_aux/diffusion_edge/taming/modules/losses/vqperceptual.py
src/custom_controlnet_aux/diffusion_edge/taming/modules/misc/coord.py
src/custom_controlnet_aux/diffusion_edge/taming/modules/util.py
src/custom_controlnet_aux/diffusion_edge/taming/modules/vqvae/quantize.py
src/custom_controlnet_aux/diffusion_edge/taming/util.py
src/custom_controlnet_aux/dsine/LICENSE
src/custom_controlnet_aux/dsine/__init__.py
src/custom_controlnet_aux/dsine/models/dsine_arch.py
src/custom_controlnet_aux/dsine/models/submodules/__init__.py
src/custom_controlnet_aux/dsine/models/submodules/standalone_encoder.py
src/custom_controlnet_aux/dsine/utils/rotation.py
src/custom_controlnet_aux/dsine/utils/utils.py
src/custom_controlnet_aux/dwpose/LICENSE
src/custom_controlnet_aux/dwpose/__init__.py
src/custom_controlnet_aux/dwpose/animalpose.py
src/custom_controlnet_aux/dwpose/body.py
src/custom_controlnet_aux/dwpose/dw_onnx/__init__.py
src/custom_controlnet_aux/dwpose/dw_onnx/cv_ox_det.py
src/custom_controlnet_aux/dwpose/dw_onnx/cv_ox_pose.py
src/custom_controlnet_aux/dwpose/dw_onnx/cv_ox_yolo_nas.py
src/custom_controlnet_aux/dwpose/dw_torchscript/__init__.py
src/custom_controlnet_aux/dwpose/dw_torchscript/jit_det.py
src/custom_controlnet_aux/dwpose/dw_torchscript/jit_pose.py
src/custom_controlnet_aux/dwpose/face.py
src/custom_controlnet_aux/dwpose/hand.py
src/custom_controlnet_aux/dwpose/model.py
src/custom_controlnet_aux/dwpose/types.py
src/custom_controlnet_aux/dwpose/util.py
src/custom_controlnet_aux/dwpose/wholebody.py
src/custom_controlnet_aux/hed/__init__.py
src/custom_controlnet_aux/leres/__init__.py
src/custom_controlnet_aux/leres/leres/LICENSE
src/custom_controlnet_aux/leres/leres/Resnet.py
src/custom_controlnet_aux/leres/leres/Resnext_torch.py
src/custom_controlnet_aux/leres/leres/__init__.py
src/custom_controlnet_aux/leres/leres/depthmap.py
src/custom_controlnet_aux/leres/leres/multi_depth_model_woauxi.py
src/custom_controlnet_aux/leres/leres/net_tools.py
src/custom_controlnet_aux/leres/leres/network_auxi.py
src/custom_controlnet_aux/leres/pix2pix/LICENSE
src/custom_controlnet_aux/leres/pix2pix/__init__.py
src/custom_controlnet_aux/leres/pix2pix/models/__init__.py
src/custom_controlnet_aux/leres/pix2pix/models/base_model.py
src/custom_controlnet_aux/leres/pix2pix/models/base_model_hg.py
src/custom_controlnet_aux/leres/pix2pix/models/networks.py
src/custom_controlnet_aux/leres/pix2pix/models/pix2pix4depth_model.py
src/custom_controlnet_aux/leres/pix2pix/options/__init__.py
src/custom_controlnet_aux/leres/pix2pix/options/base_options.py
src/custom_controlnet_aux/leres/pix2pix/options/test_options.py
src/custom_controlnet_aux/leres/pix2pix/util/__init__.py
src/custom_controlnet_aux/leres/pix2pix/util/util.py
src/custom_controlnet_aux/lineart/LICENSE
src/custom_controlnet_aux/lineart/__init__.py
src/custom_controlnet_aux/lineart_anime/LICENSE
src/custom_controlnet_aux/lineart_anime/__init__.py
src/custom_controlnet_aux/lineart_standard/__init__.py
src/custom_controlnet_aux/manga_line/LICENSE
src/custom_controlnet_aux/manga_line/__init__.py
src/custom_controlnet_aux/manga_line/model_torch.py
src/custom_controlnet_aux/mediapipe_face/__init__.py
src/custom_controlnet_aux/mediapipe_face/mediapipe_face_common.py
src/custom_controlnet_aux/mesh_graphormer/__init__.py
src/custom_controlnet_aux/mesh_graphormer/cls_hrnet_w64_sgd_lr5e-2_wd1e-4_bs32_x100.yaml
src/custom_controlnet_aux/mesh_graphormer/depth_preprocessor.py
src/custom_controlnet_aux/mesh_graphormer/hand_landmarker.task
src/custom_controlnet_aux/mesh_graphormer/pipeline.py
src/custom_controlnet_aux/metric3d/__init__.py
src/custom_controlnet_aux/metric3d/mono/configs/HourglassDecoder/convlarge.0.3_150.py
src/custom_controlnet_aux/metric3d/mono/configs/HourglassDecoder/test_kitti_convlarge.0.3_150.py
src/custom_controlnet_aux/metric3d/mono/configs/HourglassDecoder/test_nyu_convlarge.0.3_150.py
src/custom_controlnet_aux/metric3d/mono/configs/HourglassDecoder/vit.raft5.giant2.py
src/custom_controlnet_aux/metric3d/mono/configs/HourglassDecoder/vit.raft5.large.py
src/custom_controlnet_aux/metric3d/mono/configs/HourglassDecoder/vit.raft5.small.py
src/custom_controlnet_aux/metric3d/mono/configs/__init__.py
src/custom_controlnet_aux/metric3d/mono/configs/_base_/_data_base_.py
src/custom_controlnet_aux/metric3d/mono/configs/_base_/datasets/_data_base_.py
src/custom_controlnet_aux/metric3d/mono/configs/_base_/default_runtime.py
src/custom_controlnet_aux/metric3d/mono/configs/_base_/models/backbones/convnext_large.py
src/custom_controlnet_aux/metric3d/mono/configs/_base_/models/backbones/dino_vit_giant2_reg.py
src/custom_controlnet_aux/metric3d/mono/configs/_base_/models/backbones/dino_vit_large.py
src/custom_controlnet_aux/metric3d/mono/configs/_base_/models/backbones/dino_vit_large_reg.py
src/custom_controlnet_aux/metric3d/mono/configs/_base_/models/backbones/dino_vit_small_reg.py
src/custom_controlnet_aux/metric3d/mono/configs/_base_/models/encoder_decoder/convnext_large.hourglassdecoder.py
src/custom_controlnet_aux/metric3d/mono/configs/_base_/models/encoder_decoder/dino_vit_giant2_reg.dpt_raft.py
src/custom_controlnet_aux/metric3d/mono/configs/_base_/models/encoder_decoder/dino_vit_large.dpt_raft.py
src/custom_controlnet_aux/metric3d/mono/configs/_base_/models/encoder_decoder/dino_vit_large_reg.dpt_raft.py
src/custom_controlnet_aux/metric3d/mono/configs/_base_/models/encoder_decoder/dino_vit_small_reg.dpt_raft.py
src/custom_controlnet_aux/metric3d/mono/model/__init__.py
src/custom_controlnet_aux/metric3d/mono/model/backbones/ConvNeXt.py
src/custom_controlnet_aux/metric3d/mono/model/backbones/ViT_DINO.py
src/custom_controlnet_aux/metric3d/mono/model/backbones/ViT_DINO_reg.py
src/custom_controlnet_aux/metric3d/mono/model/backbones/__init__.py
src/custom_controlnet_aux/metric3d/mono/model/decode_heads/HourGlassDecoder.py
src/custom_controlnet_aux/metric3d/mono/model/decode_heads/RAFTDepthNormalDPTDecoder5.py
src/custom_controlnet_aux/metric3d/mono/model/decode_heads/__init__.py
src/custom_controlnet_aux/metric3d/mono/model/model_pipelines/__base_model__.py
src/custom_controlnet_aux/metric3d/mono/model/model_pipelines/__init__.py
src/custom_controlnet_aux/metric3d/mono/model/model_pipelines/dense_pipeline.py
src/custom_controlnet_aux/metric3d/mono/model/monodepth_model.py
src/custom_controlnet_aux/metric3d/mono/tools/test_scale_cano.py
src/custom_controlnet_aux/metric3d/mono/utils/__init__.py
src/custom_controlnet_aux/metric3d/mono/utils/avg_meter.py
src/custom_controlnet_aux/metric3d/mono/utils/comm.py
src/custom_controlnet_aux/metric3d/mono/utils/custom_data.py
src/custom_controlnet_aux/metric3d/mono/utils/do_test.py
src/custom_controlnet_aux/metric3d/mono/utils/logger.py
src/custom_controlnet_aux/metric3d/mono/utils/mldb.py
src/custom_controlnet_aux/metric3d/mono/utils/pcd_filter.py
src/custom_controlnet_aux/metric3d/mono/utils/running.py
src/custom_controlnet_aux/metric3d/mono/utils/transform.py
src/custom_controlnet_aux/metric3d/mono/utils/unproj_pcd.py
src/custom_controlnet_aux/metric3d/mono/utils/visualization.py
src/custom_controlnet_aux/midas/LICENSE
src/custom_controlnet_aux/midas/__init__.py
src/custom_controlnet_aux/midas/transformers.py
src/custom_controlnet_aux/midas/utils.py
src/custom_controlnet_aux/mlsd/LICENSE
src/custom_controlnet_aux/mlsd/__init__.py
src/custom_controlnet_aux/mlsd/models/__init__.py
src/custom_controlnet_aux/mlsd/models/mbv2_mlsd_large.py
src/custom_controlnet_aux/mlsd/models/mbv2_mlsd_tiny.py
src/custom_controlnet_aux/mlsd/utils.py
src/custom_controlnet_aux/normalbae/LICENSE
src/custom_controlnet_aux/normalbae/__init__.py
src/custom_controlnet_aux/normalbae/nets/NNET.py
src/custom_controlnet_aux/normalbae/nets/__init__.py
src/custom_controlnet_aux/normalbae/nets/submodules/__init__.py
src/custom_controlnet_aux/normalbae/nets/submodules/decoder.py
src/custom_controlnet_aux/normalbae/nets/submodules/encoder.py
src/custom_controlnet_aux/normalbae/nets/submodules/submodules.py
src/custom_controlnet_aux/oneformer/__init__.py
src/custom_controlnet_aux/oneformer/configs/ade20k/Base-ADE20K-UnifiedSegmentation.yaml
src/custom_controlnet_aux/oneformer/configs/ade20k/oneformer_R50_bs16_160k.yaml
src/custom_controlnet_aux/oneformer/configs/ade20k/oneformer_swin_large_IN21k_384_bs16_160k.yaml
src/custom_controlnet_aux/oneformer/configs/coco/Base-COCO-UnifiedSegmentation.yaml
src/custom_controlnet_aux/oneformer/configs/coco/oneformer_R50_bs16_50ep.yaml
src/custom_controlnet_aux/oneformer/configs/coco/oneformer_swin_large_IN21k_384_bs16_100ep.yaml
src/custom_controlnet_aux/oneformer/transformers.py
src/custom_controlnet_aux/open_pose/LICENSE
src/custom_controlnet_aux/open_pose/__init__.py
src/custom_controlnet_aux/open_pose/body.py
src/custom_controlnet_aux/open_pose/face.py
src/custom_controlnet_aux/open_pose/hand.py
src/custom_controlnet_aux/open_pose/model.py
src/custom_controlnet_aux/open_pose/util.py
src/custom_controlnet_aux/pidi/LICENSE
src/custom_controlnet_aux/pidi/__init__.py
src/custom_controlnet_aux/pidi/model.py
src/custom_controlnet_aux/processor.py
src/custom_controlnet_aux/pyracanny/__init__.py
src/custom_controlnet_aux/recolor/__init__.py
src/custom_controlnet_aux/sam/__init__.py
src/custom_controlnet_aux/sam/automatic_mask_generator.py
src/custom_controlnet_aux/sam/modeling/__init__.py
src/custom_controlnet_aux/sam/modeling/common.py
src/custom_controlnet_aux/sam/modeling/image_encoder.py
src/custom_controlnet_aux/sam/modeling/mask_decoder.py
src/custom_controlnet_aux/sam/modeling/prompt_encoder.py
src/custom_controlnet_aux/sam/modeling/sam.py
src/custom_controlnet_aux/sam/modeling/transformer.py
src/custom_controlnet_aux/sam/predictor.py
src/custom_controlnet_aux/sam/sam.py
src/custom_controlnet_aux/sam/utils/__init__.py
src/custom_controlnet_aux/sam/utils/amg.py
src/custom_controlnet_aux/sam/utils/onnx.py
src/custom_controlnet_aux/sam/utils/transforms.py
src/custom_controlnet_aux/scribble/__init__.py
src/custom_controlnet_aux/shuffle/__init__.py
src/custom_controlnet_aux/teed/Fmish.py
src/custom_controlnet_aux/teed/Fsmish.py
src/custom_controlnet_aux/teed/LICENSE.txt
src/custom_controlnet_aux/teed/Xmish.py
src/custom_controlnet_aux/teed/Xsmish.py
src/custom_controlnet_aux/teed/__init__.py
src/custom_controlnet_aux/teed/ted.py
src/custom_controlnet_aux/tile/__init__.py
src/custom_controlnet_aux/tile/guided_filter.py
src/custom_controlnet_aux/uniformer/__init__.py
src/custom_controlnet_aux/uniformer/configs/_base_/datasets/ade20k.py
src/custom_controlnet_aux/uniformer/configs/_base_/datasets/chase_db1.py
src/custom_controlnet_aux/uniformer/configs/_base_/datasets/cityscapes.py
src/custom_controlnet_aux/uniformer/configs/_base_/datasets/cityscapes_769x769.py
src/custom_controlnet_aux/uniformer/configs/_base_/datasets/drive.py
src/custom_controlnet_aux/uniformer/configs/_base_/datasets/hrf.py
src/custom_controlnet_aux/uniformer/configs/_base_/datasets/pascal_context.py
src/custom_controlnet_aux/uniformer/configs/_base_/datasets/pascal_context_59.py
src/custom_controlnet_aux/uniformer/configs/_base_/datasets/pascal_voc12.py
src/custom_controlnet_aux/uniformer/configs/_base_/datasets/pascal_voc12_aug.py
src/custom_controlnet_aux/uniformer/configs/_base_/datasets/stare.py
src/custom_controlnet_aux/uniformer/configs/_base_/default_runtime.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/ann_r50-d8.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/apcnet_r50-d8.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/ccnet_r50-d8.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/cgnet.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/danet_r50-d8.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/deeplabv3_r50-d8.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/deeplabv3_unet_s5-d16.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/deeplabv3plus_r50-d8.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/dmnet_r50-d8.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/dnl_r50-d8.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/emanet_r50-d8.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/encnet_r50-d8.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/fast_scnn.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/fcn_hr18.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/fcn_r50-d8.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/fcn_unet_s5-d16.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/fpn_r50.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/fpn_uniformer.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/gcnet_r50-d8.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/lraspp_m-v3-d8.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/nonlocal_r50-d8.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/ocrnet_hr18.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/ocrnet_r50-d8.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/pointrend_r50.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/psanet_r50-d8.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/pspnet_r50-d8.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/pspnet_unet_s5-d16.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/upernet_r50.py
src/custom_controlnet_aux/uniformer/configs/_base_/models/upernet_uniformer.py
src/custom_controlnet_aux/uniformer/configs/_base_/schedules/schedule_160k.py
src/custom_controlnet_aux/uniformer/configs/_base_/schedules/schedule_20k.py
src/custom_controlnet_aux/uniformer/configs/_base_/schedules/schedule_40k.py
src/custom_controlnet_aux/uniformer/configs/_base_/schedules/schedule_80k.py
src/custom_controlnet_aux/uniformer/inference.py
src/custom_controlnet_aux/uniformer/mmcv_custom/__init__.py
src/custom_controlnet_aux/uniformer/mmcv_custom/checkpoint.py
src/custom_controlnet_aux/uniformer/uniformer.py
src/custom_controlnet_aux/uniformer/upernet_global_small.py
src/custom_controlnet_aux/unimatch/__init__.py
src/custom_controlnet_aux/unimatch/unimatch/__init__.py
src/custom_controlnet_aux/unimatch/unimatch/attention.py
src/custom_controlnet_aux/unimatch/unimatch/backbone.py
src/custom_controlnet_aux/unimatch/unimatch/geometry.py
src/custom_controlnet_aux/unimatch/unimatch/matching.py
src/custom_controlnet_aux/unimatch/unimatch/position.py
src/custom_controlnet_aux/unimatch/unimatch/reg_refine.py
src/custom_controlnet_aux/unimatch/unimatch/transformer.py
src/custom_controlnet_aux/unimatch/unimatch/trident_conv.py
src/custom_controlnet_aux/unimatch/unimatch/unimatch.py
src/custom_controlnet_aux/unimatch/unimatch/utils.py
src/custom_controlnet_aux/unimatch/utils/dist_utils.py
src/custom_controlnet_aux/unimatch/utils/file_io.py
src/custom_controlnet_aux/unimatch/utils/flow_viz.py
src/custom_controlnet_aux/unimatch/utils/frame_utils.py
src/custom_controlnet_aux/unimatch/utils/logger.py
src/custom_controlnet_aux/unimatch/utils/misc.py
src/custom_controlnet_aux/unimatch/utils/utils.py
src/custom_controlnet_aux/unimatch/utils/visualization.py
src/custom_controlnet_aux/util.py
src/custom_controlnet_aux/zoe/LICENSE
src/custom_controlnet_aux/zoe/__init__.py
src/custom_controlnet_aux/zoe/transformers.py
src/custom_manopth/CHANGES.md
src/custom_manopth/LICENSE
src/custom_manopth/__init__.py
src/custom_manopth/argutils.py
src/custom_manopth/demo.py
src/custom_manopth/manolayer.py
src/custom_manopth/posemapper.py
src/custom_manopth/rodrigues_layer.py
src/custom_manopth/rot6d.py
src/custom_manopth/rotproj.py
src/custom_manopth/smpl_handpca_wrapper_HAND_only.py
src/custom_manopth/tensutils.py
src/custom_manopth/verts.py
src/custom_mesh_graphormer/__init__.py
src/custom_mesh_graphormer/datasets/__init__.py
src/custom_mesh_graphormer/datasets/build.py
src/custom_mesh_graphormer/datasets/hand_mesh_tsv.py
src/custom_mesh_graphormer/datasets/human_mesh_tsv.py
src/custom_mesh_graphormer/modeling/__init__.py
src/custom_mesh_graphormer/modeling/_gcnn.py
src/custom_mesh_graphormer/modeling/_mano.py
src/custom_mesh_graphormer/modeling/_smpl.py
src/custom_mesh_graphormer/modeling/bert/__init__.py
src/custom_mesh_graphormer/modeling/bert/bert-base-uncased/config.json
src/custom_mesh_graphormer/modeling/bert/e2e_body_network.py
src/custom_mesh_graphormer/modeling/bert/e2e_hand_network.py
src/custom_mesh_graphormer/modeling/bert/file_utils.py
src/custom_mesh_graphormer/modeling/bert/modeling_bert.py
src/custom_mesh_graphormer/modeling/bert/modeling_graphormer.py
src/custom_mesh_graphormer/modeling/bert/modeling_utils.py
src/custom_mesh_graphormer/modeling/data/J_regressor_extra.npy
src/custom_mesh_graphormer/modeling/data/J_regressor_h36m_correct.npy
src/custom_mesh_graphormer/modeling/data/MANO_LEFT.pkl
src/custom_mesh_graphormer/modeling/data/MANO_RIGHT.pkl
src/custom_mesh_graphormer/modeling/data/README.md
src/custom_mesh_graphormer/modeling/data/config.py
src/custom_mesh_graphormer/modeling/data/mano_195_adjmat_indices.pt
src/custom_mesh_graphormer/modeling/data/mano_195_adjmat_size.pt
src/custom_mesh_graphormer/modeling/data/mano_195_adjmat_values.pt
src/custom_mesh_graphormer/modeling/data/mano_downsampling.npz
src/custom_mesh_graphormer/modeling/data/mesh_downsampling.npz
src/custom_mesh_graphormer/modeling/data/smpl_431_adjmat_indices.pt
src/custom_mesh_graphormer/modeling/data/smpl_431_adjmat_size.pt
src/custom_mesh_graphormer/modeling/data/smpl_431_adjmat_values.pt
src/custom_mesh_graphormer/modeling/data/smpl_431_faces.npy
src/custom_mesh_graphormer/modeling/hrnet/config/__init__.py
src/custom_mesh_graphormer/modeling/hrnet/config/default.py
src/custom_mesh_graphormer/modeling/hrnet/config/models.py
src/custom_mesh_graphormer/modeling/hrnet/hrnet_cls_net.py
src/custom_mesh_graphormer/modeling/hrnet/hrnet_cls_net_gridfeat.py
src/custom_mesh_graphormer/tools/run_gphmer_bodymesh.py
src/custom_mesh_graphormer/tools/run_gphmer_bodymesh_inference.py
src/custom_mesh_graphormer/tools/run_gphmer_handmesh.py
src/custom_mesh_graphormer/tools/run_gphmer_handmesh_inference.py
src/custom_mesh_graphormer/tools/run_hand_multiscale.py
src/custom_mesh_graphormer/utils/__init__.py
src/custom_mesh_graphormer/utils/comm.py
src/custom_mesh_graphormer/utils/dataset_utils.py
src/custom_mesh_graphormer/utils/geometric_layers.py
src/custom_mesh_graphormer/utils/image_ops.py
src/custom_mesh_graphormer/utils/logger.py
src/custom_mesh_graphormer/utils/metric_logger.py
src/custom_mesh_graphormer/utils/metric_pampjpe.py
src/custom_mesh_graphormer/utils/miscellaneous.py
src/custom_mesh_graphormer/utils/renderer.py
src/custom_mesh_graphormer/utils/tsv_file.py
src/custom_mesh_graphormer/utils/tsv_file_ops.py
src/custom_mmpkg/__init__.py
src/custom_mmpkg/custom_mmcv/__init__.py
src/custom_mmpkg/custom_mmcv/arraymisc/__init__.py
src/custom_mmpkg/custom_mmcv/arraymisc/quantization.py
src/custom_mmpkg/custom_mmcv/cnn/__init__.py
src/custom_mmpkg/custom_mmcv/cnn/alexnet.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/__init__.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/activation.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/context_block.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/conv.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/conv2d_adaptive_padding.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/conv_module.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/conv_ws.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/depthwise_separable_conv_module.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/drop.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/generalized_attention.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/hsigmoid.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/hswish.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/non_local.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/norm.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/padding.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/plugin.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/registry.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/scale.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/swish.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/transformer.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/upsample.py
src/custom_mmpkg/custom_mmcv/cnn/bricks/wrappers.py
src/custom_mmpkg/custom_mmcv/cnn/builder.py
src/custom_mmpkg/custom_mmcv/cnn/resnet.py
src/custom_mmpkg/custom_mmcv/cnn/utils/__init__.py
src/custom_mmpkg/custom_mmcv/cnn/utils/flops_counter.py
src/custom_mmpkg/custom_mmcv/cnn/utils/fuse_conv_bn.py
src/custom_mmpkg/custom_mmcv/cnn/utils/sync_bn.py
src/custom_mmpkg/custom_mmcv/cnn/utils/weight_init.py
src/custom_mmpkg/custom_mmcv/cnn/vgg.py
src/custom_mmpkg/custom_mmcv/engine/__init__.py
src/custom_mmpkg/custom_mmcv/engine/test.py
src/custom_mmpkg/custom_mmcv/fileio/__init__.py
src/custom_mmpkg/custom_mmcv/fileio/file_client.py
src/custom_mmpkg/custom_mmcv/fileio/handlers/__init__.py
src/custom_mmpkg/custom_mmcv/fileio/handlers/base.py
src/custom_mmpkg/custom_mmcv/fileio/handlers/json_handler.py
src/custom_mmpkg/custom_mmcv/fileio/handlers/pickle_handler.py
src/custom_mmpkg/custom_mmcv/fileio/handlers/yaml_handler.py
src/custom_mmpkg/custom_mmcv/fileio/io.py
src/custom_mmpkg/custom_mmcv/fileio/parse.py
src/custom_mmpkg/custom_mmcv/image/__init__.py
src/custom_mmpkg/custom_mmcv/image/colorspace.py
src/custom_mmpkg/custom_mmcv/image/geometric.py
src/custom_mmpkg/custom_mmcv/image/io.py
src/custom_mmpkg/custom_mmcv/image/misc.py
src/custom_mmpkg/custom_mmcv/image/photometric.py
src/custom_mmpkg/custom_mmcv/model_zoo/deprecated.json
src/custom_mmpkg/custom_mmcv/model_zoo/mmcls.json
src/custom_mmpkg/custom_mmcv/model_zoo/open_mmlab.json
src/custom_mmpkg/custom_mmcv/ops/__init__.py
src/custom_mmpkg/custom_mmcv/ops/assign_score_withk.py
src/custom_mmpkg/custom_mmcv/ops/ball_query.py
src/custom_mmpkg/custom_mmcv/ops/bbox.py
src/custom_mmpkg/custom_mmcv/ops/border_align.py
src/custom_mmpkg/custom_mmcv/ops/box_iou_rotated.py
src/custom_mmpkg/custom_mmcv/ops/carafe.py
src/custom_mmpkg/custom_mmcv/ops/cc_attention.py
src/custom_mmpkg/custom_mmcv/ops/contour_expand.py
src/custom_mmpkg/custom_mmcv/ops/corner_pool.py
src/custom_mmpkg/custom_mmcv/ops/correlation.py
src/custom_mmpkg/custom_mmcv/ops/deform_conv.py
src/custom_mmpkg/custom_mmcv/ops/deform_roi_pool.py
src/custom_mmpkg/custom_mmcv/ops/deprecated_wrappers.py
src/custom_mmpkg/custom_mmcv/ops/focal_loss.py
src/custom_mmpkg/custom_mmcv/ops/furthest_point_sample.py
src/custom_mmpkg/custom_mmcv/ops/fused_bias_leakyrelu.py
src/custom_mmpkg/custom_mmcv/ops/gather_points.py
src/custom_mmpkg/custom_mmcv/ops/group_points.py
src/custom_mmpkg/custom_mmcv/ops/info.py
src/custom_mmpkg/custom_mmcv/ops/iou3d.py
src/custom_mmpkg/custom_mmcv/ops/knn.py
src/custom_mmpkg/custom_mmcv/ops/masked_conv.py
src/custom_mmpkg/custom_mmcv/ops/merge_cells.py
src/custom_mmpkg/custom_mmcv/ops/modulated_deform_conv.py
src/custom_mmpkg/custom_mmcv/ops/multi_scale_deform_attn.py
src/custom_mmpkg/custom_mmcv/ops/nms.py
src/custom_mmpkg/custom_mmcv/ops/pixel_group.py
src/custom_mmpkg/custom_mmcv/ops/point_sample.py
src/custom_mmpkg/custom_mmcv/ops/points_in_boxes.py
src/custom_mmpkg/custom_mmcv/ops/points_sampler.py
src/custom_mmpkg/custom_mmcv/ops/psa_mask.py
src/custom_mmpkg/custom_mmcv/ops/roi_align.py
src/custom_mmpkg/custom_mmcv/ops/roi_align_rotated.py
src/custom_mmpkg/custom_mmcv/ops/roi_pool.py
src/custom_mmpkg/custom_mmcv/ops/roiaware_pool3d.py
src/custom_mmpkg/custom_mmcv/ops/roipoint_pool3d.py
src/custom_mmpkg/custom_mmcv/ops/saconv.py
src/custom_mmpkg/custom_mmcv/ops/scatter_points.py
src/custom_mmpkg/custom_mmcv/ops/sync_bn.py
src/custom_mmpkg/custom_mmcv/ops/three_interpolate.py
src/custom_mmpkg/custom_mmcv/ops/three_nn.py
src/custom_mmpkg/custom_mmcv/ops/tin_shift.py
src/custom_mmpkg/custom_mmcv/ops/upfirdn2d.py
src/custom_mmpkg/custom_mmcv/ops/voxelize.py
src/custom_mmpkg/custom_mmcv/parallel/__init__.py
src/custom_mmpkg/custom_mmcv/parallel/_functions.py
src/custom_mmpkg/custom_mmcv/parallel/collate.py
src/custom_mmpkg/custom_mmcv/parallel/data_container.py
src/custom_mmpkg/custom_mmcv/parallel/data_parallel.py
src/custom_mmpkg/custom_mmcv/parallel/distributed.py
src/custom_mmpkg/custom_mmcv/parallel/distributed_deprecated.py
src/custom_mmpkg/custom_mmcv/parallel/registry.py
src/custom_mmpkg/custom_mmcv/parallel/scatter_gather.py
src/custom_mmpkg/custom_mmcv/parallel/utils.py
src/custom_mmpkg/custom_mmcv/runner/__init__.py
src/custom_mmpkg/custom_mmcv/runner/base_module.py
src/custom_mmpkg/custom_mmcv/runner/base_runner.py
src/custom_mmpkg/custom_mmcv/runner/builder.py
src/custom_mmpkg/custom_mmcv/runner/checkpoint.py
src/custom_mmpkg/custom_mmcv/runner/default_constructor.py
src/custom_mmpkg/custom_mmcv/runner/dist_utils.py
src/custom_mmpkg/custom_mmcv/runner/epoch_based_runner.py
src/custom_mmpkg/custom_mmcv/runner/fp16_utils.py
src/custom_mmpkg/custom_mmcv/runner/hooks/__init__.py
src/custom_mmpkg/custom_mmcv/runner/hooks/checkpoint.py
src/custom_mmpkg/custom_mmcv/runner/hooks/closure.py
src/custom_mmpkg/custom_mmcv/runner/hooks/ema.py
src/custom_mmpkg/custom_mmcv/runner/hooks/evaluation.py
src/custom_mmpkg/custom_mmcv/runner/hooks/hook.py
src/custom_mmpkg/custom_mmcv/runner/hooks/iter_timer.py
src/custom_mmpkg/custom_mmcv/runner/hooks/logger/__init__.py
src/custom_mmpkg/custom_mmcv/runner/hooks/logger/base.py
src/custom_mmpkg/custom_mmcv/runner/hooks/logger/dvclive.py
src/custom_mmpkg/custom_mmcv/runner/hooks/logger/mlflow.py
src/custom_mmpkg/custom_mmcv/runner/hooks/logger/neptune.py
src/custom_mmpkg/custom_mmcv/runner/hooks/logger/pavi.py
src/custom_mmpkg/custom_mmcv/runner/hooks/logger/tensorboard.py
src/custom_mmpkg/custom_mmcv/runner/hooks/logger/text.py
src/custom_mmpkg/custom_mmcv/runner/hooks/logger/wandb.py
src/custom_mmpkg/custom_mmcv/runner/hooks/lr_updater.py
src/custom_mmpkg/custom_mmcv/runner/hooks/memory.py
src/custom_mmpkg/custom_mmcv/runner/hooks/momentum_updater.py
src/custom_mmpkg/custom_mmcv/runner/hooks/optimizer.py
src/custom_mmpkg/custom_mmcv/runner/hooks/profiler.py
src/custom_mmpkg/custom_mmcv/runner/hooks/sampler_seed.py
src/custom_mmpkg/custom_mmcv/runner/hooks/sync_buffer.py
src/custom_mmpkg/custom_mmcv/runner/iter_based_runner.py
src/custom_mmpkg/custom_mmcv/runner/log_buffer.py
src/custom_mmpkg/custom_mmcv/runner/optimizer/__init__.py
src/custom_mmpkg/custom_mmcv/runner/optimizer/builder.py
src/custom_mmpkg/custom_mmcv/runner/optimizer/default_constructor.py
src/custom_mmpkg/custom_mmcv/runner/priority.py
src/custom_mmpkg/custom_mmcv/runner/utils.py
src/custom_mmpkg/custom_mmcv/utils/__init__.py
src/custom_mmpkg/custom_mmcv/utils/config.py
src/custom_mmpkg/custom_mmcv/utils/env.py
src/custom_mmpkg/custom_mmcv/utils/ext_loader.py
src/custom_mmpkg/custom_mmcv/utils/logging.py
src/custom_mmpkg/custom_mmcv/utils/misc.py
src/custom_mmpkg/custom_mmcv/utils/parrots_jit.py
src/custom_mmpkg/custom_mmcv/utils/parrots_wrapper.py
src/custom_mmpkg/custom_mmcv/utils/path.py
src/custom_mmpkg/custom_mmcv/utils/progressbar.py
src/custom_mmpkg/custom_mmcv/utils/registry.py
src/custom_mmpkg/custom_mmcv/utils/testing.py
src/custom_mmpkg/custom_mmcv/utils/timer.py
src/custom_mmpkg/custom_mmcv/utils/trace.py
src/custom_mmpkg/custom_mmcv/utils/version_utils.py
src/custom_mmpkg/custom_mmcv/version.py
src/custom_mmpkg/custom_mmcv/video/__init__.py
src/custom_mmpkg/custom_mmcv/video/io.py
src/custom_mmpkg/custom_mmcv/video/optflow.py
src/custom_mmpkg/custom_mmcv/video/processing.py
src/custom_mmpkg/custom_mmcv/visualization/__init__.py
src/custom_mmpkg/custom_mmcv/visualization/color.py
src/custom_mmpkg/custom_mmcv/visualization/image.py
src/custom_mmpkg/custom_mmcv/visualization/optflow.py
src/custom_mmpkg/custom_mmseg/apis/__init__.py
src/custom_mmpkg/custom_mmseg/apis/inference.py
src/custom_mmpkg/custom_mmseg/apis/test.py
src/custom_mmpkg/custom_mmseg/apis/train.py
src/custom_mmpkg/custom_mmseg/core/__init__.py
src/custom_mmpkg/custom_mmseg/core/evaluation/__init__.py
src/custom_mmpkg/custom_mmseg/core/evaluation/class_names.py
src/custom_mmpkg/custom_mmseg/core/evaluation/eval_hooks.py
src/custom_mmpkg/custom_mmseg/core/evaluation/metrics.py
src/custom_mmpkg/custom_mmseg/core/seg/__init__.py
src/custom_mmpkg/custom_mmseg/core/seg/builder.py
src/custom_mmpkg/custom_mmseg/core/seg/sampler/__init__.py
src/custom_mmpkg/custom_mmseg/core/seg/sampler/base_pixel_sampler.py
src/custom_mmpkg/custom_mmseg/core/seg/sampler/ohem_pixel_sampler.py
src/custom_mmpkg/custom_mmseg/core/utils/__init__.py
src/custom_mmpkg/custom_mmseg/core/utils/misc.py
src/custom_mmpkg/custom_mmseg/datasets/__init__.py
src/custom_mmpkg/custom_mmseg/datasets/ade.py
src/custom_mmpkg/custom_mmseg/datasets/builder.py
src/custom_mmpkg/custom_mmseg/datasets/chase_db1.py
src/custom_mmpkg/custom_mmseg/datasets/cityscapes.py
src/custom_mmpkg/custom_mmseg/datasets/custom.py
src/custom_mmpkg/custom_mmseg/datasets/dataset_wrappers.py
src/custom_mmpkg/custom_mmseg/datasets/drive.py
src/custom_mmpkg/custom_mmseg/datasets/hrf.py
src/custom_mmpkg/custom_mmseg/datasets/pascal_context.py
src/custom_mmpkg/custom_mmseg/datasets/pipelines/__init__.py
src/custom_mmpkg/custom_mmseg/datasets/pipelines/compose.py
src/custom_mmpkg/custom_mmseg/datasets/pipelines/formating.py
src/custom_mmpkg/custom_mmseg/datasets/pipelines/loading.py
src/custom_mmpkg/custom_mmseg/datasets/pipelines/test_time_aug.py
src/custom_mmpkg/custom_mmseg/datasets/pipelines/transforms.py
src/custom_mmpkg/custom_mmseg/datasets/stare.py
src/custom_mmpkg/custom_mmseg/datasets/voc.py
src/custom_mmpkg/custom_mmseg/models/__init__.py
src/custom_mmpkg/custom_mmseg/models/backbones/__init__.py
src/custom_mmpkg/custom_mmseg/models/backbones/cgnet.py
src/custom_mmpkg/custom_mmseg/models/backbones/fast_scnn.py
src/custom_mmpkg/custom_mmseg/models/backbones/hrnet.py
src/custom_mmpkg/custom_mmseg/models/backbones/mobilenet_v2.py
src/custom_mmpkg/custom_mmseg/models/backbones/mobilenet_v3.py
src/custom_mmpkg/custom_mmseg/models/backbones/resnest.py
src/custom_mmpkg/custom_mmseg/models/backbones/resnet.py
src/custom_mmpkg/custom_mmseg/models/backbones/resnext.py
src/custom_mmpkg/custom_mmseg/models/backbones/unet.py
src/custom_mmpkg/custom_mmseg/models/backbones/vit.py
src/custom_mmpkg/custom_mmseg/models/builder.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/__init__.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/ann_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/apc_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/aspp_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/cascade_decode_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/cc_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/da_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/decode_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/dm_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/dnl_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/ema_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/enc_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/fcn_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/fpn_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/gc_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/lraspp_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/nl_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/ocr_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/point_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/psa_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/psp_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/sep_aspp_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/sep_fcn_head.py
src/custom_mmpkg/custom_mmseg/models/decode_heads/uper_head.py
src/custom_mmpkg/custom_mmseg/models/losses/__init__.py
src/custom_mmpkg/custom_mmseg/models/losses/accuracy.py
src/custom_mmpkg/custom_mmseg/models/losses/cross_entropy_loss.py
src/custom_mmpkg/custom_mmseg/models/losses/dice_loss.py
src/custom_mmpkg/custom_mmseg/models/losses/lovasz_loss.py
src/custom_mmpkg/custom_mmseg/models/losses/utils.py
src/custom_mmpkg/custom_mmseg/models/necks/__init__.py
src/custom_mmpkg/custom_mmseg/models/necks/fpn.py
src/custom_mmpkg/custom_mmseg/models/necks/multilevel_neck.py
src/custom_mmpkg/custom_mmseg/models/segmentors/__init__.py
src/custom_mmpkg/custom_mmseg/models/segmentors/base.py
src/custom_mmpkg/custom_mmseg/models/segmentors/cascade_encoder_decoder.py
src/custom_mmpkg/custom_mmseg/models/segmentors/encoder_decoder.py
src/custom_mmpkg/custom_mmseg/models/utils/__init__.py
src/custom_mmpkg/custom_mmseg/models/utils/drop.py
src/custom_mmpkg/custom_mmseg/models/utils/inverted_residual.py
src/custom_mmpkg/custom_mmseg/models/utils/make_divisible.py
src/custom_mmpkg/custom_mmseg/models/utils/res_layer.py
src/custom_mmpkg/custom_mmseg/models/utils/se_layer.py
src/custom_mmpkg/custom_mmseg/models/utils/self_attention_block.py
src/custom_mmpkg/custom_mmseg/models/utils/up_conv_block.py
src/custom_mmpkg/custom_mmseg/models/utils/weight_init.py
src/custom_mmpkg/custom_mmseg/ops/__init__.py
src/custom_mmpkg/custom_mmseg/ops/encoding.py
src/custom_mmpkg/custom_mmseg/ops/wrappers.py
src/custom_mmpkg/custom_mmseg/utils/__init__.py
src/custom_mmpkg/custom_mmseg/utils/collect_env.py
src/custom_mmpkg/custom_mmseg/utils/logger.py
src/wrapper_for_mps/__init__.py
tests/pose.png
tests/test_cn_aux_full.json
tests/test_controlnet_aux.py
utils.py123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252# ComfyUI's ControlNet Auxiliary PreprocessorsPlug-and-play [ComfyUI](https://github.com/comfyanonymous/ComfyUI) node sets for making [ControlNet](https://github.com/lllyasviel/ControlNet/) hint images
"anime style, a protest in the street, cyberpunk city, a woman with pink hair and golden eyes (looking at the viewer) is holding a sign with the text "ComfyUI ControlNet Aux" in bold, neon pink" on Flux.1 Dev

The code is copy-pasted from the respective folders in https://github.com/lllyasviel/ControlNet/tree/main/annotator and connected to [the 🤗 Hub](https://huggingface.co/lllyasviel/Annotators).
All credit & copyright goes to https://github.com/lllyasviel.
# UpdatesGo to [Update page](./UPDATES.md) to follow updates
# Installation:## Using ComfyUI Manager (recommended):Install [ComfyUI Manager](https://github.com/ltdrdata/ComfyUI-Manager) and do steps introduced there to install this repo.
## Alternative:If you're running on Linux, or non-admin account on windows you'll want to ensure `/ComfyUI/custom_nodes` and `comfyui_controlnet_aux` has write permissions.
There is now a **install.bat** you can run to install to portable if detected. Otherwise it will default to system and assume you followed ConfyUI's manual installation steps.
If you can't run **install.bat** (e.g. you are a Linux user). Open the CMD/Shell and do the following: - Navigate to your `/ComfyUI/custom_nodes/` folder - Run `git clone https://github.com/Fannovel16/comfyui_controlnet_aux/` - Navigate to your `comfyui_controlnet_aux` folder - Portable/venv: - Run `path/to/ComfUI/python_embeded/python.exe -s -m pip install -r requirements.txt` - With system python - Run `pip install -r requirements.txt` - Start ComfyUI
# NodesPlease note that this repo only supports preprocessors making hint images (e.g. stickman, canny edge, etc).All preprocessors except Inpaint are intergrated into `AIO Aux Preprocessor` node. This node allow you to quickly get the preprocessor but a preprocessor's own threshold parameters won't be able to set.You need to use its node directly to set thresholds.
# Nodes (sections are categories in Comfy menu)## Line Extractors| Preprocessor Node | sd-webui-controlnet/other | ControlNet/T2I-Adapter ||-----------------------------|---------------------------|-------------------------------------------|| Binary Lines | binary | control_scribble || Canny Edge | canny | control_v11p_sd15_canny <br> control_canny <br> t2iadapter_canny || HED Soft-Edge Lines | hed | control_v11p_sd15_softedge <br> control_hed || Standard Lineart | standard_lineart | control_v11p_sd15_lineart || Realistic Lineart | lineart (or `lineart_coarse` if `coarse` is enabled) | control_v11p_sd15_lineart || Anime Lineart | lineart_anime | control_v11p_sd15s2_lineart_anime || Manga Lineart | lineart_anime_denoise | control_v11p_sd15s2_lineart_anime || M-LSD Lines | mlsd | control_v11p_sd15_mlsd <br> control_mlsd || PiDiNet Soft-Edge Lines | pidinet | control_v11p_sd15_softedge <br> control_scribble || Scribble Lines | scribble | control_v11p_sd15_scribble <br> control_scribble || Scribble XDoG Lines | scribble_xdog | control_v11p_sd15_scribble <br> control_scribble || Fake Scribble Lines | scribble_hed | control_v11p_sd15_scribble <br> control_scribble || TEED Soft-Edge Lines | teed | [controlnet-sd-xl-1.0-softedge-dexined](https://huggingface.co/SargeZT/controlnet-sd-xl-1.0-softedge-dexined/blob/main/controlnet-sd-xl-1.0-softedge-dexined.safetensors) <br> control_v11p_sd15_softedge (Theoretically)| Scribble PiDiNet Lines | scribble_pidinet | control_v11p_sd15_scribble <br> control_scribble || AnyLine Lineart | | mistoLine_fp16.safetensors <br> mistoLine_rank256 <br> control_v11p_sd15s2_lineart_anime <br> control_v11p_sd15_lineart |
## Normal and Depth Estimators| Preprocessor Node | sd-webui-controlnet/other | ControlNet/T2I-Adapter ||-----------------------------|---------------------------|-------------------------------------------|| MiDaS Depth Map | (normal) depth | control_v11f1p_sd15_depth <br> control_depth <br> t2iadapter_depth || LeReS Depth Map | depth_leres | control_v11f1p_sd15_depth <br> control_depth <br> t2iadapter_depth || Zoe Depth Map | depth_zoe | control_v11f1p_sd15_depth <br> control_depth <br> t2iadapter_depth || MiDaS Normal Map | normal_map | control_normal || BAE Normal Map | normal_bae | control_v11p_sd15_normalbae || MeshGraphormer Hand Refiner ([HandRefinder](https://github.com/wenquanlu/HandRefiner)) | depth_hand_refiner | [control_sd15_inpaint_depth_hand_fp16](https://huggingface.co/hr16/ControlNet-HandRefiner-pruned/blob/main/control_sd15_inpaint_depth_hand_fp16.safetensors) || Depth Anything | depth_anything | [Depth-Anything](https://huggingface.co/spaces/LiheYoung/Depth-Anything/blob/main/checkpoints_controlnet/diffusion_pytorch_model.safetensors) || Zoe Depth Anything <br> (Basically Zoe but the encoder is replaced with DepthAnything) | depth_anything | [Depth-Anything](https://huggingface.co/spaces/LiheYoung/Depth-Anything/blob/main/checkpoints_controlnet/diffusion_pytorch_model.safetensors) || Normal DSINE | | control_normal/control_v11p_sd15_normalbae || Metric3D Depth | | control_v11f1p_sd15_depth <br> control_depth <br> t2iadapter_depth || Metric3D Normal | | control_v11p_sd15_normalbae || Depth Anything V2 | | [Depth-Anything](https://huggingface.co/spaces/LiheYoung/Depth-Anything/blob/main/checkpoints_controlnet/diffusion_pytorch_model.safetensors) |
## Faces and Poses Estimators| Preprocessor Node | sd-webui-controlnet/other | ControlNet/T2I-Adapter ||-----------------------------|---------------------------|-------------------------------------------|| DWPose Estimator | dw_openpose_full | control_v11p_sd15_openpose <br> control_openpose <br> t2iadapter_openpose || OpenPose Estimator | openpose (detect_body) <br> openpose_hand (detect_body + detect_hand) <br> openpose_faceonly (detect_face) <br> openpose_full (detect_hand + detect_body + detect_face) | control_v11p_sd15_openpose <br> control_openpose <br> t2iadapter_openpose || MediaPipe Face Mesh | mediapipe_face | controlnet_sd21_laion_face_v2 | | Animal Estimator | animal_openpose | [control_sd15_animal_openpose_fp16](https://huggingface.co/huchenlei/animal_openpose/blob/main/control_sd15_animal_openpose_fp16.pth) |
## Optical Flow Estimators| Preprocessor Node | sd-webui-controlnet/other | ControlNet/T2I-Adapter ||-----------------------------|---------------------------|-------------------------------------------|| Unimatch Optical Flow | | [DragNUWA](https://github.com/ProjectNUWA/DragNUWA) |
### How to get OpenPose-format JSON?#### User-sideThis workflow will save images to ComfyUI's output folder (the same location as output images). If you haven't found `Save Pose Keypoints` node, update this extension
#### Dev-sideAn array of [OpenPose-format JSON](https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/02_output.md#json-output-format) corresponsding to each frame in an IMAGE batch can be gotten from DWPose and OpenPose using `app.nodeOutputs` on the UI or `/history` API endpoint. JSON output from AnimalPose uses a kinda similar format to OpenPose JSON:```[ { "version": "ap10k", "animals": [ [[x1, y1, 1], [x2, y2, 1],..., [x17, y17, 1]], [[x1, y1, 1], [x2, y2, 1],..., [x17, y17, 1]], ... ], "canvas_height": 512, "canvas_width": 768 }, ...]```
For extension developers (e.g. Openpose editor):```jsconst poseNodes = app.graph._nodes.filter(node => ["OpenposePreprocessor", "DWPreprocessor", "AnimalPosePreprocessor"].includes(node.type))for (const poseNode of poseNodes) { const openposeResults = JSON.parse(app.nodeOutputs[poseNode.id].openpose_json[0]) console.log(openposeResults) //An array containing Openpose JSON for each frame}```
For API users:Javascript```jsimport fetch from "node-fetch" //Remember to add "type": "module" to "package.json"async function main() { const promptId = '792c1905-ecfe-41f4-8114-83e6a4a09a9f' //Too lazy to POST /queue let history = await fetch(`http://127.0.0.1:8188/history/${promptId}`).then(re => re.json()) history = history[promptId] const nodeOutputs = Object.values(history.outputs).filter(output => output.openpose_json) for (const nodeOutput of nodeOutputs) { const openposeResults = JSON.parse(nodeOutput.openpose_json[0]) console.log(openposeResults) //An array containing Openpose JSON for each frame }}main()```
Python```pyimport json, urllib.request
server_address = "127.0.0.1:8188"prompt_id = '' #Too lazy to POST /queue
def get_history(prompt_id): with urllib.request.urlopen("http://{}/history/{}".format(server_address, prompt_id)) as response: return json.loads(response.read())
history = get_history(prompt_id)[prompt_id]for o in history['outputs']: for node_id in history['outputs']: node_output = history['outputs'][node_id] if 'openpose_json' in node_output: print(json.loads(node_output['openpose_json'][0])) #An list containing Openpose JSON for each frame```## Semantic Segmentation| Preprocessor Node | sd-webui-controlnet/other | ControlNet/T2I-Adapter ||-----------------------------|---------------------------|-------------------------------------------|| OneFormer ADE20K Segmentor | oneformer_ade20k | control_v11p_sd15_seg || OneFormer COCO Segmentor | oneformer_coco | control_v11p_sd15_seg || UniFormer Segmentor | segmentation |control_sd15_seg <br> control_v11p_sd15_seg|
## T2IAdapter-only| Preprocessor Node | sd-webui-controlnet/other | ControlNet/T2I-Adapter ||-----------------------------|---------------------------|-------------------------------------------|| Color Pallete | color | t2iadapter_color || Content Shuffle | shuffle | t2iadapter_style |
## Recolor| Preprocessor Node | sd-webui-controlnet/other | ControlNet/T2I-Adapter ||-----------------------------|---------------------------|-------------------------------------------|| Image Luminance | recolor_luminance | [ioclab_sd15_recolor](https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/ioclab_sd15_recolor.safetensors) <br> [sai_xl_recolor_256lora](https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/sai_xl_recolor_256lora.safetensors) <br> [bdsqlsz_controlllite_xl_recolor_luminance](https://huggingface.co/bdsqlsz/qinglong_controlnet-lllite/resolve/main/bdsqlsz_controlllite_xl_recolor_luminance.safetensors) || Image Intensity | recolor_intensity | Idk. Maybe same as above? |
# Examples> A picture is worth a thousand words

# Testing workflowhttps://github.com/Fannovel16/comfyui_controlnet_aux/blob/main/examples/ExecuteAll.pngInput image: https://github.com/Fannovel16/comfyui_controlnet_aux/blob/main/examples/comfyui-controlnet-aux-logo.png
# Q&A:## Why some nodes doesn't appear after I installed this repo?
This repo has a new mechanism which will skip any custom node can't be imported. If you meet this case, please create a issue on [Issues tab](https://github.com/Fannovel16/comfyui_controlnet_aux/issues) with the log from the command line.
## DWPose/AnimalPose only uses CPU so it's so slow. How can I make it use GPU?There are two ways to speed-up DWPose: using TorchScript checkpoints (.torchscript.pt) checkpoints or ONNXRuntime (.onnx). TorchScript way is little bit slower than ONNXRuntime but doesn't require any additional library and still way way faster than CPU.
A torchscript bbox detector is compatiable with an onnx pose estimator and vice versa.### TorchScriptSet `bbox_detector` and `pose_estimator` according to this picture. You can try other bbox detector endings with `.torchscript.pt` to reduce bbox detection time if input images are ideal.### ONNXRuntimeIf onnxruntime is installed successfully and the checkpoint used endings with `.onnx`, it will replace default cv2 backend to take advantage of GPU. Note that if you are using NVidia card, this method currently can only works on CUDA 11.8 (ComfyUI_windows_portable_nvidia_cu118_or_cpu.7z) unless you compile onnxruntime yourself.
1. Know your onnxruntime build:* * NVidia CUDA 11.x or bellow/AMD GPU: `onnxruntime-gpu`* * NVidia CUDA 12.x: `onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/`* * DirectML: `onnxruntime-directml`* * OpenVINO: `onnxruntime-openvino`
Note that if this is your first time using ComfyUI, please test if it can run on your device before doing next steps.
2. Add it into `requirements.txt`
3. Run `install.bat` or pip command mentioned in Installation

# Assets files of preprocessors* anime_face_segment: [bdsqlsz/qinglong_controlnet-lllite/Annotators/UNet.pth](https://huggingface.co/bdsqlsz/qinglong_controlnet-lllite/blob/main/Annotators/UNet.pth), [anime-seg/isnetis.ckpt](https://huggingface.co/skytnt/anime-seg/blob/main/isnetis.ckpt)* densepose: [LayerNorm/DensePose-TorchScript-with-hint-image/densepose_r50_fpn_dl.torchscript](https://huggingface.co/LayerNorm/DensePose-TorchScript-with-hint-image/blob/main/densepose_r50_fpn_dl.torchscript)* dwpose: * * bbox_detector: Either [yzd-v/DWPose/yolox_l.onnx](https://huggingface.co/yzd-v/DWPose/blob/main/yolox_l.onnx), [hr16/yolox-onnx/yolox_l.torchscript.pt](https://huggingface.co/hr16/yolox-onnx/blob/main/yolox_l.torchscript.pt), [hr16/yolo-nas-fp16/yolo_nas_l_fp16.onnx](https://huggingface.co/hr16/yolo-nas-fp16/blob/main/yolo_nas_l_fp16.onnx), [hr16/yolo-nas-fp16/yolo_nas_m_fp16.onnx](https://huggingface.co/hr16/yolo-nas-fp16/blob/main/yolo_nas_m_fp16.onnx), [hr16/yolo-nas-fp16/yolo_nas_s_fp16.onnx](https://huggingface.co/hr16/yolo-nas-fp16/blob/main/yolo_nas_s_fp16.onnx)* * pose_estimator: Either [hr16/DWPose-TorchScript-BatchSize5/dw-ll_ucoco_384_bs5.torchscript.pt](https://huggingface.co/hr16/DWPose-TorchScript-BatchSize5/blob/main/dw-ll_ucoco_384_bs5.torchscript.pt), [yzd-v/DWPose/dw-ll_ucoco_384.onnx](https://huggingface.co/yzd-v/DWPose/blob/main/dw-ll_ucoco_384.onnx)* animal_pose (ap10k):* * bbox_detector: Either [yzd-v/DWPose/yolox_l.onnx](https://huggingface.co/yzd-v/DWPose/blob/main/yolox_l.onnx), [hr16/yolox-onnx/yolox_l.torchscript.pt](https://huggingface.co/hr16/yolox-onnx/blob/main/yolox_l.torchscript.pt), [hr16/yolo-nas-fp16/yolo_nas_l_fp16.onnx](https://huggingface.co/hr16/yolo-nas-fp16/blob/main/yolo_nas_l_fp16.onnx), [hr16/yolo-nas-fp16/yolo_nas_m_fp16.onnx](https://huggingface.co/hr16/yolo-nas-fp16/blob/main/yolo_nas_m_fp16.onnx), [hr16/yolo-nas-fp16/yolo_nas_s_fp16.onnx](https://huggingface.co/hr16/yolo-nas-fp16/blob/main/yolo_nas_s_fp16.onnx)* * pose_estimator: Either [hr16/DWPose-TorchScript-BatchSize5/rtmpose-m_ap10k_256_bs5.torchscript.pt](https://huggingface.co/hr16/DWPose-TorchScript-BatchSize5/blob/main/rtmpose-m_ap10k_256_bs5.torchscript.pt), [hr16/UnJIT-DWPose/rtmpose-m_ap10k_256.onnx](https://huggingface.co/hr16/UnJIT-DWPose/blob/main/rtmpose-m_ap10k_256.onnx)* hed: [lllyasviel/Annotators/ControlNetHED.pth](https://huggingface.co/lllyasviel/Annotators/blob/main/ControlNetHED.pth)* leres: [lllyasviel/Annotators/res101.pth](https://huggingface.co/lllyasviel/Annotators/blob/main/res101.pth), [lllyasviel/Annotators/latest_net_G.pth](https://huggingface.co/lllyasviel/Annotators/blob/main/latest_net_G.pth)* lineart: [lllyasviel/Annotators/sk_model.pth](https://huggingface.co/lllyasviel/Annotators/blob/main/sk_model.pth), [lllyasviel/Annotators/sk_model2.pth](https://huggingface.co/lllyasviel/Annotators/blob/main/sk_model2.pth)* lineart_anime: [lllyasviel/Annotators/netG.pth](https://huggingface.co/lllyasviel/Annotators/blob/main/netG.pth)* manga_line: [lllyasviel/Annotators/erika.pth](https://huggingface.co/lllyasviel/Annotators/blob/main/erika.pth)* mesh_graphormer: [hr16/ControlNet-HandRefiner-pruned/graphormer_hand_state_dict.bin](https://huggingface.co/hr16/ControlNet-HandRefiner-pruned/blob/main/graphormer_hand_state_dict.bin), [hr16/ControlNet-HandRefiner-pruned/hrnetv2_w64_imagenet_pretrained.pth](https://huggingface.co/hr16/ControlNet-HandRefiner-pruned/blob/main/hrnetv2_w64_imagenet_pretrained.pth)* midas: [lllyasviel/Annotators/dpt_hybrid-midas-501f0c75.pt](https://huggingface.co/lllyasviel/Annotators/blob/main/dpt_hybrid-midas-501f0c75.pt)* mlsd: [lllyasviel/Annotators/mlsd_large_512_fp32.pth](https://huggingface.co/lllyasviel/Annotators/blob/main/mlsd_large_512_fp32.pth)* normalbae: [lllyasviel/Annotators/scannet.pt](https://huggingface.co/lllyasviel/Annotators/blob/main/scannet.pt)* oneformer: [lllyasviel/Annotators/250_16_swin_l_oneformer_ade20k_160k.pth](https://huggingface.co/lllyasviel/Annotators/blob/main/250_16_swin_l_oneformer_ade20k_160k.pth)* open_pose: [lllyasviel/Annotators/body_pose_model.pth](https://huggingface.co/lllyasviel/Annotators/blob/main/body_pose_model.pth), [lllyasviel/Annotators/hand_pose_model.pth](https://huggingface.co/lllyasviel/Annotators/blob/main/hand_pose_model.pth), [lllyasviel/Annotators/facenet.pth](https://huggingface.co/lllyasviel/Annotators/blob/main/facenet.pth)* pidi: [lllyasviel/Annotators/table5_pidinet.pth](https://huggingface.co/lllyasviel/Annotators/blob/main/table5_pidinet.pth)* sam: [dhkim2810/MobileSAM/mobile_sam.pt](https://huggingface.co/dhkim2810/MobileSAM/blob/main/mobile_sam.pt)* uniformer: [lllyasviel/Annotators/upernet_global_small.pth](https://huggingface.co/lllyasviel/Annotators/blob/main/upernet_global_small.pth)* zoe: [lllyasviel/Annotators/ZoeD_M12_N.pt](https://huggingface.co/lllyasviel/Annotators/blob/main/ZoeD_M12_N.pt)* teed: [bdsqlsz/qinglong_controlnet-lllite/7_model.pth](https://huggingface.co/bdsqlsz/qinglong_controlnet-lllite/blob/main/Annotators/7_model.pth)* depth_anything: Either [LiheYoung/Depth-Anything/checkpoints/depth_anything_vitl14.pth](https://huggingface.co/spaces/LiheYoung/Depth-Anything/blob/main/checkpoints/depth_anything_vitl14.pth), [LiheYoung/Depth-Anything/checkpoints/depth_anything_vitb14.pth](https://huggingface.co/spaces/LiheYoung/Depth-Anything/blob/main/checkpoints/depth_anything_vitb14.pth) or [LiheYoung/Depth-Anything/checkpoints/depth_anything_vits14.pth](https://huggingface.co/spaces/LiheYoung/Depth-Anything/blob/main/checkpoints/depth_anything_vits14.pth)* diffusion_edge: Either [hr16/Diffusion-Edge/diffusion_edge_indoor.pt](https://huggingface.co/hr16/Diffusion-Edge/blob/main/diffusion_edge_indoor.pt), [hr16/Diffusion-Edge/diffusion_edge_urban.pt](https://huggingface.co/hr16/Diffusion-Edge/blob/main/diffusion_edge_urban.pt) or [hr16/Diffusion-Edge/diffusion_edge_natrual.pt](https://huggingface.co/hr16/Diffusion-Edge/blob/main/diffusion_edge_natrual.pt)* unimatch: Either [hr16/Unimatch/gmflow-scale2-regrefine6-mixdata.pth](https://huggingface.co/hr16/Unimatch/blob/main/gmflow-scale2-regrefine6-mixdata.pth), [hr16/Unimatch/gmflow-scale2-mixdata.pth](https://huggingface.co/hr16/Unimatch/blob/main/gmflow-scale2-mixdata.pth) or [hr16/Unimatch/gmflow-scale1-mixdata.pth](https://huggingface.co/hr16/Unimatch/blob/main/gmflow-scale1-mixdata.pth)* zoe_depth_anything: Either [LiheYoung/Depth-Anything/checkpoints_metric_depth/depth_anything_metric_depth_indoor.pt](https://huggingface.co/spaces/LiheYoung/Depth-Anything/blob/main/checkpoints_metric_depth/depth_anything_metric_depth_indoor.pt) or [LiheYoung/Depth-Anything/checkpoints_metric_depth/depth_anything_metric_depth_outdoor.pt](https://huggingface.co/spaces/LiheYoung/Depth-Anything/blob/main/checkpoints_metric_depth/depth_anything_metric_depth_outdoor.pt)# 2000 Stars 😄<a href="https://star-history.com/#Fannovel16/comfyui_controlnet_aux&Date"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=Fannovel16/comfyui_controlnet_aux&type=Date&theme=dark" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=Fannovel16/comfyui_controlnet_aux&type=Date" /> <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=Fannovel16/comfyui_controlnet_aux&type=Date" /> </picture></a>
Thanks for yalls supports. I never thought the graph for stars would be linear lol.123456789101112131415161718192021222324252627282930313233343536373839404142434445* `AIO Aux Preprocessor` intergrating all loadable aux preprocessors as dropdown options. Easy to copy, paste and get the preprocessor faster.* Added OpenPose-format JSON output from OpenPose Preprocessor and DWPose Preprocessor. Checks [here](#faces-and-poses).* Fixed wrong model path when downloading DWPose.* Make hint images less blurry.* Added `resolution` option, `PixelPerfectResolution` and `HintImageEnchance` nodes (TODO: Documentation).* Added `RAFT Optical Flow Embedder` for TemporalNet2 (TODO: Workflow example).* Fixed opencv's conflicts between this extension, [ReActor](https://github.com/Gourieff/comfyui-reactor-node) and Roop. Thanks `Gourieff` for [the solution](https://github.com/Fannovel16/comfyui_controlnet_aux/issues/7#issuecomment-1734319075)!* RAFT is removed as the code behind it doesn't match what what the original code does* Changed `lineart`'s display name from `Normal Lineart` to `Realistic Lineart`. This change won't affect old workflows* Added support for `onnxruntime` to speed-up DWPose (see the Q&A)* Fixed TypeError: expected size to be one of int or Tuple[int] or Tuple[int, int] or Tuple[int, int, int], but got size with types [<class 'numpy.int64'>, <class 'numpy.int64'>]: [Issue](https://github.com/Fannovel16/comfyui_controlnet_aux/issues/2), [PR](https://github.com/Fannovel16/comfyui_controlnet_aux/pull/71))* Fixed ImageGenResolutionFromImage mishape (https://github.com/Fannovel16/comfyui_controlnet_aux/pull/74)* Fixed LeRes and MiDaS's incomatipility with MPS device* Fixed checking DWPose onnxruntime session multiple times: https://github.com/Fannovel16/comfyui_controlnet_aux/issues/89)* Added `Anime Face Segmentor` (in `ControlNet Preprocessors/Semantic Segmentation`) for [ControlNet AnimeFaceSegmentV2](https://huggingface.co/bdsqlsz/qinglong_controlnet-lllite#animefacesegmentv2). Checks [here](#anime-face-segmentor)* Change download functions and fix [download error](https://github.com/Fannovel16/comfyui_controlnet_aux/issues/39): [PR](https://github.com/Fannovel16/comfyui_controlnet_aux/pull/96)* Caching DWPose Onnxruntime during the first use of DWPose node instead of ComfyUI startup* Added alternative YOLOX models for faster speed when using DWPose* Added alternative DWPose models* Implemented the preprocessor for [AnimalPose ControlNet](https://github.com/abehonest/ControlNet_AnimalPose/tree/main). Check [Animal Pose AP-10K](#animal-pose-ap-10k) * Added YOLO-NAS models which are drop-in replacements of YOLOX* Fixed Openpose Face/Hands no longer detecting: https://github.com/Fannovel16/comfyui_controlnet_aux/issues/54* Added TorchScript implementation of DWPose and AnimalPose* Added TorchScript implementation of DensePose from [Colab notebook](https://colab.research.google.com/drive/16hcaaKs210ivpxjoyGNuvEXZD4eqOOSQ) which doesn't require detectron2. [Example](#densepose). Thanks [@LayerNome](https://github.com/Layer-norm) for fixing bugs related.* Added Standard Lineart Preprocessor* Fixed OpenPose misplacements in some cases * Added Mesh Graphormer - Hand Depth Map & Mask* Misaligned hands bug from MeshGraphormer was fixed* Added more mask options for MeshGraphormer* Added Save Pose Keypoint node for editing* Added Unimatch Optical Flow* Added Depth Anything & Zoe Depth Anything* Removed resolution field from Unimatch Optical Flow as that interpolating optical flow seems unstable* Added TEED Soft-Edge Preprocessor* Added DiffusionEdge* Added Image Luminance and Image Intensity* Added Normal DSINE* Added TTPlanet Tile (09/05/2024, DD/MM/YYYY)* Added AnyLine, Metric3D (18/05/2024)* Added Depth Anything V2 (16/06/2024)* Added Union model of ControlNet and preprocessors* Refactor INPUT_TYPES and add Execute All node during the process of learning [Execution Model Inversion](https://github.com/comfyanonymous/ComfyUI/pull/2666)* Added scale_stick_for_xinsr_cn (https://github.com/Fannovel16/comfyui_controlnet_aux/issues/447) (09/04/2024)* PyTorch 2.7 compatibility fixes - eliminated custom_timm, custom_detectron2, and custom_midas_repo dependencies causing hanging issues. Refactored 7 major preprocessors including OneFormer (now using HuggingFace transformers), ZOE, DSINE, MiDaS, BAE, Metric3D, and Uniformer. Resolved ~59 GitHub issues related to import failures, hanging, and extension conflicts. Full modernization to actively maintained packages.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224import sys, os
# Disable NPU device initialization and problematic MMCV ops to prevent RuntimeError# Must be set BEFORE any MMCV imports happen anywhere in ComfyUIos.environ['NPU_DEVICE_COUNT'] = '0'os.environ['MMCV_WITH_OPS'] = '0'from .utils import here, define_preprocessor_inputs, INPUTfrom pathlib import Pathimport tracebackimport importlibfrom .log import log, blue_text, cyan_text, get_summary, get_labelfrom .hint_image_enchance import NODE_CLASS_MAPPINGS as HIE_NODE_CLASS_MAPPINGSfrom .hint_image_enchance import NODE_DISPLAY_NAME_MAPPINGS as HIE_NODE_DISPLAY_NAME_MAPPINGS#Ref: https://github.com/comfyanonymous/ComfyUI/blob/76d53c4622fc06372975ed2a43ad345935b8a551/nodes.py#L17sys.path.insert(0, str(Path(here, "src").resolve()))for pkg_name in ["custom_controlnet_aux", "custom_mmpkg"]: sys.path.append(str(Path(here, "src", pkg_name).resolve()))
#Enable CPU fallback for ops not being supported by MPS like upsample_bicubic2d.out#https://github.com/pytorch/pytorch/issues/77764#https://github.com/Fannovel16/comfyui_controlnet_aux/issues/2#issuecomment-1763579485os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = os.getenv("PYTORCH_ENABLE_MPS_FALLBACK", '1')
def load_nodes(): shorted_errors = [] full_error_messages = [] node_class_mappings = {} node_display_name_mappings = {}
for filename in (here / "node_wrappers").iterdir(): module_name = filename.stem if module_name.startswith('.'): continue #Skip hidden files created by the OS (e.g. [.DS_Store](https://en.wikipedia.org/wiki/.DS_Store)) try: module = importlib.import_module( f".node_wrappers.{module_name}", package=__package__ ) node_class_mappings.update(getattr(module, "NODE_CLASS_MAPPINGS")) if hasattr(module, "NODE_DISPLAY_NAME_MAPPINGS"): node_display_name_mappings.update(getattr(module, "NODE_DISPLAY_NAME_MAPPINGS"))
log.debug(f"Imported {module_name} nodes")
except AttributeError: pass # wip nodes except Exception: error_message = traceback.format_exc() full_error_messages.append(error_message) error_message = error_message.splitlines()[-1] shorted_errors.append( f"Failed to import module {module_name} because {error_message}" ) if len(shorted_errors) > 0: full_err_log = '\n\n'.join(full_error_messages) print(f"\n\nFull error log from comfyui_controlnet_aux: \n{full_err_log}\n\n") log.info( f"Some nodes failed to load:\n\t" + "\n\t".join(shorted_errors) + "\n\n" + "Check that you properly installed the dependencies.\n" + "If you think this is a bug, please report it on the github page (https://github.com/Fannovel16/comfyui_controlnet_aux/issues)" ) return node_class_mappings, node_display_name_mappings
AUX_NODE_MAPPINGS, AUX_DISPLAY_NAME_MAPPINGS = load_nodes()
#For nodes not mapping image to image or has special requirementsAIO_NOT_SUPPORTED = ["InpaintPreprocessor", "MeshGraphormer+ImpactDetector-DepthMapPreprocessor", "DiffusionEdge_Preprocessor"]AIO_NOT_SUPPORTED += ["SavePoseKpsAsJsonFile", "FacialPartColoringFromPoseKps", "UpperBodyTrackingFromPoseKps", "RenderPeopleKps", "RenderAnimalKps"]AIO_NOT_SUPPORTED += ["Unimatch_OptFlowPreprocessor", "MaskOptFlow"]
def preprocessor_options(): auxs = list(AUX_NODE_MAPPINGS.keys()) auxs.insert(0, "none") for name in AIO_NOT_SUPPORTED: if name in auxs: auxs.remove(name) return auxs
PREPROCESSOR_OPTIONS = preprocessor_options()
class AIO_Preprocessor: @classmethod def INPUT_TYPES(s): return define_preprocessor_inputs( preprocessor=INPUT.COMBO(PREPROCESSOR_OPTIONS, default="none"), resolution=INPUT.RESOLUTION() )
RETURN_TYPES = ("IMAGE",) FUNCTION = "execute"
CATEGORY = "ControlNet Preprocessors"
def execute(self, preprocessor, image, resolution=512): if preprocessor == "none": return (image, ) else: aux_class = AUX_NODE_MAPPINGS[preprocessor] input_types = aux_class.INPUT_TYPES() input_types = { **input_types["required"], **(input_types["optional"] if "optional" in input_types else {}) } params = {} for name, input_type in input_types.items(): if name == "image": params[name] = image continue
if name == "resolution": params[name] = resolution continue
if len(input_type) == 2 and ("default" in input_type[1]): params[name] = input_type[1]["default"] continue
default_values = { "INT": 0, "FLOAT": 0.0 } if type(input_type[0]) is list: for input_type_value in input_type[0]: if input_type_value in default_values: params[name] = default_values[input_type[0]] else: if input_type[0] in default_values: params[name] = default_values[input_type[0]]
return getattr(aux_class(), aux_class.FUNCTION)(**params)
class ControlNetAuxSimpleAddText: @classmethod def INPUT_TYPES(s): return dict( required=dict(image=INPUT.IMAGE(), text=INPUT.STRING()) ) RETURN_TYPES = ("IMAGE",) FUNCTION = "execute" CATEGORY = "ControlNet Preprocessors" def execute(self, image, text): from PIL import Image, ImageDraw, ImageFont import numpy as np import torch
font = ImageFont.truetype(str((here / "NotoSans-Regular.ttf").resolve()), 40) img = Image.fromarray(image[0].cpu().numpy().__mul__(255.).astype(np.uint8)) ImageDraw.Draw(img).text((0,0), text, fill=(0,255,0), font=font) return (torch.from_numpy(np.array(img)).unsqueeze(0) / 255.,)
class ExecuteAllControlNetPreprocessors: @classmethod def INPUT_TYPES(s): return define_preprocessor_inputs(resolution=INPUT.RESOLUTION()) RETURN_TYPES = ("IMAGE",) FUNCTION = "execute"
CATEGORY = "ControlNet Preprocessors"
def execute(self, image, resolution=512): try: from comfy_execution.graph_utils import GraphBuilder except: raise RuntimeError("ExecuteAllControlNetPreprocessor requries [Execution Model Inversion](https://github.com/comfyanonymous/ComfyUI/commit/5cfe38). Update ComfyUI/SwarmUI to get this feature") graph = GraphBuilder() curr_outputs = [] for preprocc in PREPROCESSOR_OPTIONS: preprocc_node = graph.node("AIO_Preprocessor", preprocessor=preprocc, image=image, resolution=resolution) hint_img = preprocc_node.out(0) add_text_node = graph.node("ControlNetAuxSimpleAddText", image=hint_img, text=preprocc) curr_outputs.append(add_text_node.out(0)) while len(curr_outputs) > 1: _outputs = [] for i in range(0, len(curr_outputs), 2): if i+1 < len(curr_outputs): image_batch = graph.node("ImageBatch", image1=curr_outputs[i], image2=curr_outputs[i+1]) _outputs.append(image_batch.out(0)) else: _outputs.append(curr_outputs[i]) curr_outputs = _outputs
return { "result": (curr_outputs[0],), "expand": graph.finalize(), }
class ControlNetPreprocessorSelector: @classmethod def INPUT_TYPES(s): return { "required": { "preprocessor": (PREPROCESSOR_OPTIONS,), } }
RETURN_TYPES = (PREPROCESSOR_OPTIONS,) RETURN_NAMES = ("preprocessor",) FUNCTION = "get_preprocessor"
CATEGORY = "ControlNet Preprocessors"
def get_preprocessor(self, preprocessor: str): return (preprocessor,)
NODE_CLASS_MAPPINGS = { **AUX_NODE_MAPPINGS, "AIO_Preprocessor": AIO_Preprocessor, "ControlNetPreprocessorSelector": ControlNetPreprocessorSelector, **HIE_NODE_CLASS_MAPPINGS, "ExecuteAllControlNetPreprocessors": ExecuteAllControlNetPreprocessors, "ControlNetAuxSimpleAddText": ControlNetAuxSimpleAddText}
NODE_DISPLAY_NAME_MAPPINGS = { **AUX_DISPLAY_NAME_MAPPINGS, "AIO_Preprocessor": "AIO Aux Preprocessor", "ControlNetPreprocessorSelector": "Preprocessor Selector", **HIE_NODE_DISPLAY_NAME_MAPPINGS, "ExecuteAllControlNetPreprocessors": "Execute All ControlNet Preprocessors"}1234567891011121314151617181920# this is an example for config.yaml file, you can rename it to config.yaml if you want to use it# ################################################################################################ This path is for custom pressesor models base folder. default is "./ckpts"# you can also use absolute paths like: "/root/ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts" or "D:\\ComfyUI\\custom_nodes\\comfyui_controlnet_aux\\ckpts"annotator_ckpts_path: "./ckpts"# ################################################################################################ This path is for downloading temporary files.# You SHOULD use absolute path for this like"D:\\temp", DO NOT use relative paths. Empty for default.custom_temp_path: # ################################################################################################ if you already have downloaded ckpts via huggingface hub into default cache path like: ~/.cache/huggingface/hub, you can set this True to use symlinks to save spaceUSE_SYMLINKS: False# ################################################################################################ EP_list is a list of execution providers for onnxruntime, if one of them is not available or not working well, you can delete that provider from here(config.yaml)# you can find all available providers here: https://onnxruntime.ai/docs/execution-providers# for example, if you have CUDA installed, you can set it to: ["CUDAExecutionProvider", "CPUExecutionProvider"]# empty list or only keep ["CPUExecutionProvider"] means you use cv2.dnn.readNetFromONNX to load onnx models# if your onnx models can only run on the CPU or have other issues, we recommend using pt model instead.# default value is ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "CPUExecutionProvider"]EP_list: ["CUDAExecutionProvider", "DirectMLExecutionProvider", "OpenVINOExecutionProvider", "ROCMExecutionProvider", "CPUExecutionProvider"]123456from pathlib import Pathfrom utils import hereimport syssys.path.append(str(Path(here, "src")))
from custom_controlnet_aux import *123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233from .log import logfrom .utils import ResizeMode, safe_numpyimport numpy as npimport torchimport cv2from .utils import get_unique_axis0from .lvminthin import nake_nms, lvmin_thin
MAX_IMAGEGEN_RESOLUTION = 8192 #https://github.com/comfyanonymous/ComfyUI/blob/c910b4a01ca58b04e5d4ab4c747680b996ada02b/nodes.py#L42RESIZE_MODES = [ResizeMode.RESIZE.value, ResizeMode.INNER_FIT.value, ResizeMode.OUTER_FIT.value]
#Port from https://github.com/Mikubill/sd-webui-controlnet/blob/e67e017731aad05796b9615dc6eadce911298ea1/internal_controlnet/external_code.py#L89class PixelPerfectResolution: @classmethod def INPUT_TYPES(s): return { "required": { "original_image": ("IMAGE", ), "image_gen_width": ("INT", {"default": 512, "min": 64, "max": MAX_IMAGEGEN_RESOLUTION, "step": 8}), "image_gen_height": ("INT", {"default": 512, "min": 64, "max": MAX_IMAGEGEN_RESOLUTION, "step": 8}), #https://github.com/comfyanonymous/ComfyUI/blob/c910b4a01ca58b04e5d4ab4c747680b996ada02b/nodes.py#L854 "resize_mode": (RESIZE_MODES, {"default": ResizeMode.RESIZE.value}) } } RETURN_TYPES = ("INT",) RETURN_NAMES = ("RESOLUTION (INT)", ) FUNCTION = "execute"
CATEGORY = "ControlNet Preprocessors"
def execute(self, original_image, image_gen_width, image_gen_height, resize_mode): _, raw_H, raw_W, _ = original_image.shape
k0 = float(image_gen_height) / float(raw_H) k1 = float(image_gen_width) / float(raw_W)
if resize_mode == ResizeMode.OUTER_FIT.value: estimation = min(k0, k1) * float(min(raw_H, raw_W)) else: estimation = max(k0, k1) * float(min(raw_H, raw_W))
log.debug(f"Pixel Perfect Computation:") log.debug(f"resize_mode = {resize_mode}") log.debug(f"raw_H = {raw_H}") log.debug(f"raw_W = {raw_W}") log.debug(f"target_H = {image_gen_height}") log.debug(f"target_W = {image_gen_width}") log.debug(f"estimation = {estimation}")
return (int(np.round(estimation)), )
class HintImageEnchance: @classmethod def INPUT_TYPES(s): return { "required": { "hint_image": ("IMAGE", ), "image_gen_width": ("INT", {"default": 512, "min": 64, "max": MAX_IMAGEGEN_RESOLUTION, "step": 8}), "image_gen_height": ("INT", {"default": 512, "min": 64, "max": MAX_IMAGEGEN_RESOLUTION, "step": 8}), #https://github.com/comfyanonymous/ComfyUI/blob/c910b4a01ca58b04e5d4ab4c747680b996ada02b/nodes.py#L854 "resize_mode": (RESIZE_MODES, {"default": ResizeMode.RESIZE.value}) } } RETURN_TYPES = ("IMAGE",) FUNCTION = "execute"
CATEGORY = "ControlNet Preprocessors" def execute(self, hint_image, image_gen_width, image_gen_height, resize_mode): outs = [] for single_hint_image in hint_image: np_hint_image = np.asarray(single_hint_image * 255., dtype=np.uint8)
if resize_mode == ResizeMode.RESIZE.value: np_hint_image = self.execute_resize(np_hint_image, image_gen_width, image_gen_height) elif resize_mode == ResizeMode.OUTER_FIT.value: np_hint_image = self.execute_outer_fit(np_hint_image, image_gen_width, image_gen_height) else: np_hint_image = self.execute_inner_fit(np_hint_image, image_gen_width, image_gen_height) outs.append(torch.from_numpy(np_hint_image.astype(np.float32) / 255.0)) return (torch.stack(outs, dim=0),) def execute_resize(self, detected_map, w, h): detected_map = self.high_quality_resize(detected_map, (w, h)) detected_map = safe_numpy(detected_map) return detected_map def execute_outer_fit(self, detected_map, w, h): old_h, old_w, _ = detected_map.shape old_w = float(old_w) old_h = float(old_h) k0 = float(h) / old_h k1 = float(w) / old_w safeint = lambda x: int(np.round(x)) k = min(k0, k1) borders = np.concatenate([detected_map[0, :, :], detected_map[-1, :, :], detected_map[:, 0, :], detected_map[:, -1, :]], axis=0) high_quality_border_color = np.median(borders, axis=0).astype(detected_map.dtype) if len(high_quality_border_color) == 4: # Inpaint hijack high_quality_border_color[3] = 255 high_quality_background = np.tile(high_quality_border_color[None, None], [h, w, 1]) detected_map = self.high_quality_resize(detected_map, (safeint(old_w * k), safeint(old_h * k))) new_h, new_w, _ = detected_map.shape pad_h = max(0, (h - new_h) // 2) pad_w = max(0, (w - new_w) // 2) high_quality_background[pad_h:pad_h + new_h, pad_w:pad_w + new_w] = detected_map detected_map = high_quality_background detected_map = safe_numpy(detected_map) return detected_map def execute_inner_fit(self, detected_map, w, h): old_h, old_w, _ = detected_map.shape old_w = float(old_w) old_h = float(old_h) k0 = float(h) / old_h k1 = float(w) / old_w safeint = lambda x: int(np.round(x)) k = max(k0, k1)
detected_map = self.high_quality_resize(detected_map, (safeint(old_w * k), safeint(old_h * k))) new_h, new_w, _ = detected_map.shape pad_h = max(0, (new_h - h) // 2) pad_w = max(0, (new_w - w) // 2) detected_map = detected_map[pad_h:pad_h+h, pad_w:pad_w+w] detected_map = safe_numpy(detected_map) return detected_map
def high_quality_resize(self, x, size): # Written by lvmin # Super high-quality control map up-scaling, considering binary, seg, and one-pixel edges
inpaint_mask = None if x.ndim == 3 and x.shape[2] == 4: inpaint_mask = x[:, :, 3] x = x[:, :, 0:3]
if x.shape[0] != size[1] or x.shape[1] != size[0]: new_size_is_smaller = (size[0] * size[1]) < (x.shape[0] * x.shape[1]) new_size_is_bigger = (size[0] * size[1]) > (x.shape[0] * x.shape[1]) unique_color_count = len(get_unique_axis0(x.reshape(-1, x.shape[2]))) is_one_pixel_edge = False is_binary = False if unique_color_count == 2: is_binary = np.min(x) < 16 and np.max(x) > 240 if is_binary: xc = x xc = cv2.erode(xc, np.ones(shape=(3, 3), dtype=np.uint8), iterations=1) xc = cv2.dilate(xc, np.ones(shape=(3, 3), dtype=np.uint8), iterations=1) one_pixel_edge_count = np.where(xc < x)[0].shape[0] all_edge_count = np.where(x > 127)[0].shape[0] is_one_pixel_edge = one_pixel_edge_count * 2 > all_edge_count
if 2 < unique_color_count < 200: interpolation = cv2.INTER_NEAREST elif new_size_is_smaller: interpolation = cv2.INTER_AREA else: interpolation = cv2.INTER_CUBIC # Must be CUBIC because we now use nms. NEVER CHANGE THIS
y = cv2.resize(x, size, interpolation=interpolation) if inpaint_mask is not None: inpaint_mask = cv2.resize(inpaint_mask, size, interpolation=interpolation)
if is_binary: y = np.mean(y.astype(np.float32), axis=2).clip(0, 255).astype(np.uint8) if is_one_pixel_edge: y = nake_nms(y) _, y = cv2.threshold(y, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU) y = lvmin_thin(y, prunings=new_size_is_bigger) else: _, y = cv2.threshold(y, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU) y = np.stack([y] * 3, axis=2) else: y = x
if inpaint_mask is not None: inpaint_mask = (inpaint_mask > 127).astype(np.float32) * 255.0 inpaint_mask = inpaint_mask[:, :, None].clip(0, 255).astype(np.uint8) y = np.concatenate([y, inpaint_mask], axis=2)
return y
class ImageGenResolutionFromLatent: @classmethod def INPUT_TYPES(s): return { "required": { "latent": ("LATENT", ) } } RETURN_TYPES = ("INT", "INT") RETURN_NAMES = ("IMAGE_GEN_WIDTH (INT)", "IMAGE_GEN_HEIGHT (INT)") FUNCTION = "execute"
CATEGORY = "ControlNet Preprocessors"
def execute(self, latent): _, _, H, W = latent["samples"].shape return (W * 8, H * 8)
class ImageGenResolutionFromImage: @classmethod def INPUT_TYPES(s): return { "required": { "image": ("IMAGE", ) } } RETURN_TYPES = ("INT", "INT") RETURN_NAMES = ("IMAGE_GEN_WIDTH (INT)", "IMAGE_GEN_HEIGHT (INT)") FUNCTION = "execute"
CATEGORY = "ControlNet Preprocessors"
def execute(self, image): _, H, W, _ = image.shape return (W, H) NODE_CLASS_MAPPINGS = { "PixelPerfectResolution": PixelPerfectResolution, "ImageGenResolutionFromImage": ImageGenResolutionFromImage, "ImageGenResolutionFromLatent": ImageGenResolutionFromLatent, "HintImageEnchance": HintImageEnchance}NODE_DISPLAY_NAME_MAPPINGS = { "PixelPerfectResolution": "Pixel Perfect Resolution", "ImageGenResolutionFromImage": "Generation Resolution From Image", "ImageGenResolutionFromLatent": "Generation Resolution From Latent", "HintImageEnchance": "Enchance And Resize Hint Images"}1234567891011121314151617181920@echo off
set "requirements_txt=%~dp0\requirements.txt"set "python_exec=..\..\..\python_embeded\python.exe"
echo Installing ComfyUI's ControlNet Auxiliary Preprocessors..
if exist "%python_exec%" ( echo Installing with ComfyUI Portable for /f "delims=" %%i in (%requirements_txt%) do ( %python_exec% -s -m pip install "%%i" )) else ( echo Installing with system Python for /f "delims=" %%i in (%requirements_txt%) do ( pip install "%%i" ))
pause1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980#Cre: https://github.com/melMass/comfy_mtb/blob/main/log.pyimport loggingimport reimport os
base_log_level = logging.INFO
# Custom object that discards the outputclass NullWriter: def write(self, text): pass
class Formatter(logging.Formatter): grey = "\x1b[38;20m" cyan = "\x1b[36;20m" purple = "\x1b[35;20m" yellow = "\x1b[33;20m" red = "\x1b[31;20m" bold_red = "\x1b[31;1m" reset = "\x1b[0m" # format = "%(asctime)s - [%(name)s] - %(levelname)s - %(message)s (%(filename)s:%(lineno)d)" format = "[%(name)s] | %(levelname)s -> %(message)s"
FORMATS = { logging.DEBUG: purple + format + reset, logging.INFO: cyan + format + reset, logging.WARNING: yellow + format + reset, logging.ERROR: red + format + reset, logging.CRITICAL: bold_red + format + reset, }
def format(self, record): log_fmt = self.FORMATS.get(record.levelno) formatter = logging.Formatter(log_fmt) return formatter.format(record)
def mklog(name, level=base_log_level): logger = logging.getLogger(name) logger.setLevel(level)
for handler in logger.handlers: logger.removeHandler(handler)
ch = logging.StreamHandler() ch.setLevel(level) ch.setFormatter(Formatter()) logger.addHandler(ch)
# Disable log propagation logger.propagate = False
return logger
# - The main app loggerlog = mklog(__package__, base_log_level)
def log_user(arg): print("\033[34mComfyUI ControlNet AUX:\033[0m {arg}")
def get_summary(docstring): return docstring.strip().split("\n\n", 1)[0]
def blue_text(text): return f"\033[94m{text}\033[0m"
def cyan_text(text): return f"\033[96m{text}\033[0m"
def get_label(label): words = re.findall(r"(?:^|[A-Z])[a-z]*", label) return " ".join(words).strip()123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687# High Quality Edge Thinning using Pure Python# Written by Lvmin Zhang# 2023 April# Stanford University# If you use this, please Cite "High Quality Edge Thinning using Pure Python", Lvmin Zhang, In Mikubill/sd-webui-controlnet.
import cv2import numpy as np
lvmin_kernels_raw = [ np.array([ [-1, -1, -1], [0, 1, 0], [1, 1, 1] ], dtype=np.int32), np.array([ [0, -1, -1], [1, 1, -1], [0, 1, 0] ], dtype=np.int32)]
lvmin_kernels = []lvmin_kernels += [np.rot90(x, k=0, axes=(0, 1)) for x in lvmin_kernels_raw]lvmin_kernels += [np.rot90(x, k=1, axes=(0, 1)) for x in lvmin_kernels_raw]lvmin_kernels += [np.rot90(x, k=2, axes=(0, 1)) for x in lvmin_kernels_raw]lvmin_kernels += [np.rot90(x, k=3, axes=(0, 1)) for x in lvmin_kernels_raw]
lvmin_prunings_raw = [ np.array([ [-1, -1, -1], [-1, 1, -1], [0, 0, -1] ], dtype=np.int32), np.array([ [-1, -1, -1], [-1, 1, -1], [-1, 0, 0] ], dtype=np.int32)]
lvmin_prunings = []lvmin_prunings += [np.rot90(x, k=0, axes=(0, 1)) for x in lvmin_prunings_raw]lvmin_prunings += [np.rot90(x, k=1, axes=(0, 1)) for x in lvmin_prunings_raw]lvmin_prunings += [np.rot90(x, k=2, axes=(0, 1)) for x in lvmin_prunings_raw]lvmin_prunings += [np.rot90(x, k=3, axes=(0, 1)) for x in lvmin_prunings_raw]
def remove_pattern(x, kernel): objects = cv2.morphologyEx(x, cv2.MORPH_HITMISS, kernel) objects = np.where(objects > 127) x[objects] = 0 return x, objects[0].shape[0] > 0
def thin_one_time(x, kernels): y = x is_done = True for k in kernels: y, has_update = remove_pattern(y, k) if has_update: is_done = False return y, is_done
def lvmin_thin(x, prunings=True): y = x for i in range(32): y, is_done = thin_one_time(y, lvmin_kernels) if is_done: break if prunings: y, _ = thin_one_time(y, lvmin_prunings) return y
def nake_nms(x): f1 = np.array([[0, 0, 0], [1, 1, 1], [0, 0, 0]], dtype=np.uint8) f2 = np.array([[0, 1, 0], [0, 1, 0], [0, 1, 0]], dtype=np.uint8) f3 = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]], dtype=np.uint8) f4 = np.array([[0, 0, 1], [0, 1, 0], [1, 0, 0]], dtype=np.uint8) y = np.zeros_like(x) for f in [f1, f2, f3, f4]: np.putmask(y, cv2.dilate(x, kernel=f) == x, x) return ycomfyui_controlnet_aux/.github/workflows/publish.ymlAdded+25
comfyui_controlnet_aux/.gitignoreAdded+183
comfyui_controlnet_aux/.trackingAdded+746
comfyui_controlnet_aux/LICENSE.txtAdded+201
comfyui_controlnet_aux/README.mdAdded+252
comfyui_controlnet_aux/UPDATES.mdAdded+45
comfyui_controlnet_aux/__init__.pyAdded+224
comfyui_controlnet_aux/__pycache__/__init__.cpython-310.pycAdded
comfyui_controlnet_aux/__pycache__/hint_image_enchance.cpython-310.pycAdded
comfyui_controlnet_aux/__pycache__/log.cpython-310.pycAdded
comfyui_controlnet_aux/__pycache__/lvminthin.cpython-310.pycAdded
comfyui_controlnet_aux/__pycache__/utils.cpython-310.pycAdded
comfyui_controlnet_aux/config.example.yamlAdded+20
comfyui_controlnet_aux/dev_interface.pyAdded+6
comfyui_controlnet_aux/examples/example_onnx.pngAdded

comfyui_controlnet_aux/hint_image_enchance.pyAdded+233
comfyui_controlnet_aux/install.batAdded+20
comfyui_controlnet_aux/log.pyAdded+80
comfyui_controlnet_aux/lvminthin.pyAdded+87
comfyui_controlnet_aux/node_wrappers/__pycache__/anime_face_segment.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/anyline.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/binary.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/canny.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/color.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/densepose.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/depth_anything.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/depth_anything_v2.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/diffusion_edge.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/dsine.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/dwpose.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/hed.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/inpaint.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/leres.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/lineart.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/lineart_anime.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/lineart_standard.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/manga_line.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/mediapipe_face.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/mesh_graphormer.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/metric3d.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/midas.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/mlsd.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/normalbae.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/oneformer.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/openpose.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/pidinet.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/pose_keypoint_postprocess.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/pyracanny.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/recolor.cpython-310.pycAdded
comfyui_controlnet_aux/node_wrappers/__pycache__/scribble.cpython-310.pycAdded