File size: 631 Bytes
cb92d2b
 
 
 
 
3207814
cb92d2b
 
 
55e36ea
 
 
 
 
592470d
8a96a46
 
55e36ea
 
cb92d2b
 
 
 
3207814
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
from fastapi import FastAPI

from config import args
from device import device, torch_dtype
from app_init import init_app
from user_queue import user_data
from util import get_pipeline_class


print("DEVICE:", device)
print("TORCH_DTYPE:", torch_dtype)
print("PIPELINE:", args.pipeline)
print("SAFETY_CHECKER:", args.safety_checker)
print("TORCH_COMPILE:", args.torch_compile)
print("USE_TAESD:", args.taesd)
print("COMPEL:", args.compel)
print("DEBUG:", args.debug)


app = FastAPI()

pipeline_class = get_pipeline_class(args.pipeline)
pipeline = pipeline_class(args, device, torch_dtype)
init_app(app, user_data, args, pipeline)