mirror of
https://github.com/Bing-su/adetailer.git
synced 2026-04-28 10:11:24 +00:00
Forge webui support (#517)
* Forge support * Separate Forge implementation * Remove debug print
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import importlib
|
||||
import re
|
||||
import sys
|
||||
from functools import lru_cache
|
||||
from pathlib import Path
|
||||
@@ -9,6 +8,8 @@ from textwrap import dedent
|
||||
|
||||
from modules import extensions, sd_models, shared
|
||||
|
||||
from .common import cn_model_regex
|
||||
|
||||
try:
|
||||
from modules.paths import extensions_builtin_dir, extensions_dir, models_path
|
||||
except ImportError as e:
|
||||
@@ -22,6 +23,7 @@ except ImportError as e:
|
||||
ext_path = Path(extensions_dir)
|
||||
ext_builtin_path = Path(extensions_builtin_dir)
|
||||
controlnet_exists = False
|
||||
controlnet_forge = False
|
||||
controlnet_path = None
|
||||
cn_base_path = ""
|
||||
|
||||
@@ -42,16 +44,6 @@ if controlnet_path is not None:
|
||||
if target_path not in sys.path:
|
||||
sys.path.append(target_path)
|
||||
|
||||
cn_model_module = {
|
||||
"inpaint": "inpaint_global_harmonious",
|
||||
"scribble": "t2ia_sketch_pidi",
|
||||
"lineart": "lineart_coarse",
|
||||
"openpose": "openpose_full",
|
||||
"tile": "tile_resample",
|
||||
"depth": "depth_midas",
|
||||
}
|
||||
cn_model_regex = re.compile("|".join(cn_model_module.keys()))
|
||||
|
||||
|
||||
class ControlNetExt:
|
||||
def __init__(self):
|
||||
|
||||
Reference in New Issue
Block a user