From 36d164a281e07d9978c7e4a4457d299ddd6f90e3 Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Thu, 9 Feb 2023 00:01:48 -0600 Subject: [PATCH] add safetensors dep --- api/onnx_web/convert/diffusion_original.py | 2 +- api/requirements.txt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/onnx_web/convert/diffusion_original.py b/api/onnx_web/convert/diffusion_original.py index 221a1195..c39715f5 100644 --- a/api/onnx_web/convert/diffusion_original.py +++ b/api/onnx_web/convert/diffusion_original.py @@ -1607,7 +1607,7 @@ def extract_checkpoint(ctx: ConversionContext, new_model_name: str, checkpoint_f def convert_diffusion_original(ctx: ConversionContext, model_name: str, tensor_file: str, opset: int, half: bool): model_path = os.path.join(ctx.model_path, model_name) - torch_name = model_name.replace("-onnx-", "-torch-") + torch_name = model_name.replace("onnx", "torch") torch_path = os.path.join(ctx.model_path, torch_name) working_name = os.path.join(ctx.model_path, torch_name, "working") logger.info("Converting original Diffusers checkpoint %s: %s -> %s", model_name, tensor_file, model_path) diff --git a/api/requirements.txt b/api/requirements.txt index cfa4228e..d380bcd0 100644 --- a/api/requirements.txt +++ b/api/requirements.txt @@ -25,4 +25,5 @@ pyyaml # TODO: get rid of these omegaconf -pydantic \ No newline at end of file +pydantic +safetensors \ No newline at end of file