Upload 2 files
Browse files- handler.py +3 -7
handler.py
CHANGED
@@ -88,15 +88,11 @@ def load_pipeline_turbo_compile(repo_id: str, dtype: torch.dtype) -> Any:
|
|
88 |
|
89 |
class EndpointHandler:
|
90 |
def __init__(self, path=""):
|
91 |
-
repo_id = "
|
92 |
#dtype = torch.bfloat16
|
93 |
dtype = torch.float16 # for older nVidia GPUs
|
94 |
-
if IS_COMPILE:
|
95 |
-
|
96 |
-
else: self.pipeline = load_pipeline_compile(repo_id, dtype)
|
97 |
-
else:
|
98 |
-
if IS_TURBO: self.pipeline = load_pipeline_turbo(repo_id, dtype)
|
99 |
-
else: self.pipeline = load_pipeline_stable(repo_id, dtype)
|
100 |
|
101 |
def __call__(self, data: Dict[str, Any]) -> Image.Image:
|
102 |
logger.info(f"Received incoming request with {data=}")
|
|
|
88 |
|
89 |
class EndpointHandler:
|
90 |
def __init__(self, path=""):
|
91 |
+
repo_id = "NoMoreCopyrightOrg/flux-dev-8step" if IS_TURBO else "NoMoreCopyrightOrg/flux-dev"
|
92 |
#dtype = torch.bfloat16
|
93 |
dtype = torch.float16 # for older nVidia GPUs
|
94 |
+
if IS_COMPILE: load_pipeline_compile(repo_id, dtype)
|
95 |
+
else: self.pipeline = load_pipeline_stable(repo_id, dtype)
|
|
|
|
|
|
|
|
|
96 |
|
97 |
def __call__(self, data: Dict[str, Any]) -> Image.Image:
|
98 |
logger.info(f"Received incoming request with {data=}")
|