forked from Haidra-Org/AI-Horde-Worker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bridge_alchemy.py
29 lines (26 loc) · 1.05 KB
/
bridge_alchemy.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""This is the bridge, It connects the horde with the ML processing"""
# This needs to load first as it sets the disable_voodoo switches
from worker.argparser.interrogation import args # isort: skip
from nataili.model_manager.super import ModelManager
from nataili.util.logger import logger, quiesce_logger, set_logger_verbosity
from worker.bridge_data.interrogation import InterrogationBridgeData
from worker.workers.interrogation import InterrogationWorker
if __name__ == "__main__":
set_logger_verbosity(args.verbosity)
quiesce_logger(args.quiet)
bridge_data = InterrogationBridgeData()
model_manager = ModelManager(
blip=True,
clip=True,
safety_checker=True,
esrgan=True,
gfpgan=True,
codeformer=True,
controlnet=True,
)
try:
worker = InterrogationWorker(model_manager, bridge_data)
worker.start()
except KeyboardInterrupt:
logger.info("Keyboard Interrupt Received. Ending Process")
logger.init(f"{bridge_data.worker_name} Instance", status="Stopped")