File size: 831 Bytes
7139ce5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79e946f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from typing import Any, Dict

from core.pipelines.controlnet_preprocessor import ControlNetPreprocessorPipeline

controlnet_preprocessor_pipeline = ControlNetPreprocessorPipeline()

def build_reverse_map():
    from nodes import NODE_DISPLAY_NAME_MAPPINGS
    import core.pipelines.controlnet_preprocessor as cn_module
    
    if cn_module.REVERSE_DISPLAY_NAME_MAP is None:
        cn_module.REVERSE_DISPLAY_NAME_MAP = {v: k for k, v in NODE_DISPLAY_NAME_MAPPINGS.items()}
        if "Semantic Segmentor (legacy, alias for UniFormer)" not in cn_module.REVERSE_DISPLAY_NAME_MAP:
             cn_module.REVERSE_DISPLAY_NAME_MAP["Semantic Segmentor (legacy, alias for UniFormer)"] = "SemSegPreprocessor"

def run_cn_preprocessor_entry(*args, **kwargs):
    return controlnet_preprocessor_pipeline.run(*args, **kwargs)