Skip to content

Commit

Permalink
lint(api): consistently use server dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Apr 22, 2023
1 parent 9bb612f commit 9e9feb2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions api/onnx_web/diffusers/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9e9feb2

Please sign in to comment.