From 9e9feb2ea08485b43e8d0e2e58c6a361ec04a965 Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Sat, 22 Apr 2023 00:28:29 -0500 Subject: [PATCH] lint(api): consistently use server dtype --- api/onnx_web/diffusers/load.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/api/onnx_web/diffusers/load.py b/api/onnx_web/diffusers/load.py index e751a6468..b3879213e 100644 --- a/api/onnx_web/diffusers/load.py +++ b/api/onnx_web/diffusers/load.py @@ -133,9 +133,7 @@ def load_pipeline( loras = loras or [] control_key = control.name if control is not None else None - torch_dtype = ( - torch.float16 if "torch-fp16" in server.optimizations else torch.float32 - ) + torch_dtype = server.torch_dtype() logger.debug("using Torch dtype %s for pipeline", torch_dtype) pipe_key = ( pipeline,