From a65e0fd60241216dd5248a4cfb17596f6d526e53 Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Sat, 16 Dec 2023 22:49:29 -0600 Subject: [PATCH] update schemas for archive converter --- api/onnx_web/convert/archive.py | 2 ++ api/schemas/extras.yaml | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/api/onnx_web/convert/archive.py b/api/onnx_web/convert/archive.py index 1f08d1f84..09c869944 100644 --- a/api/onnx_web/convert/archive.py +++ b/api/onnx_web/convert/archive.py @@ -23,6 +23,7 @@ def convert_extract_archive( if path.exists(dest_path): logger.info("destination path already exists, skipping extraction") + return False, dest_path cache_path = fetch_model(conversion, name, model["source"], format=format) @@ -33,6 +34,7 @@ def convert_extract_archive( logger.debug("archive is valid, extracting all files: %s", names) zip.extractall(path=dest_path) + return True, dest_path SAFE_NAME = r"^[-_a-zA-Z/\\\.]+$" diff --git a/api/schemas/extras.yaml b/api/schemas/extras.yaml index 518023e06..06f4f1ca7 100644 --- a/api/schemas/extras.yaml +++ b/api/schemas/extras.yaml @@ -12,7 +12,7 @@ $defs: tensor_format: type: string - enum: [bin, ckpt, onnx, pt, pth, safetensors] + enum: [bin, ckpt, onnx, pt, pth, safetensors, zip] embedding_network: type: object @@ -111,6 +111,7 @@ $defs: pipeline: type: string enum: [ + archive, controlnet, img2img, inpaint,