fix: replace CNHijackRestore with nullcontext for forge

This commit is contained in:
Dowon
2024-03-12 01:15:03 +09:00
parent ce4ea25f43
commit a9feea2662
2 changed files with 11 additions and 4 deletions

View File

@@ -13,8 +13,17 @@ except ImportError:
get_cn_models,
)
from .restore import cn_allow_script_control
if controlnet_type == "forge":
from contextlib import nullcontext as CNHijackRestore # noqa: N812
else:
from .restore import CNHijackRestore
__all__ = [
"ControlNetExt",
"CNHijackRestore",
"cn_allow_script_control",
"controlnet_exists",
"controlnet_type",
"get_cn_models",