Skip to content

Commit

Permalink
fix(api): make argument for skipping base models work correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Dec 23, 2023
1 parent c85b608 commit 50d51a3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions api/onnx_web/convert/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,9 @@ def main(args=None) -> int:
)

# model groups
parser.add_argument("--base", action="store_true", default=True)
parser.add_argument("--networks", action="store_true", default=True)
parser.add_argument("--sources", action="store_true", default=True)
parser.add_argument("--no-base", action="store_true", default=False)
parser.add_argument("--networks", action="store_true", default=False)
parser.add_argument("--sources", action="store_true", default=False)
parser.add_argument("--correction", action="store_true", default=False)
parser.add_argument("--diffusion", action="store_true", default=False)
parser.add_argument("--upscaling", action="store_true", default=False)
Expand Down Expand Up @@ -568,7 +568,7 @@ def main(args=None) -> int:
logger.info("model path does not existing, creating: %s", server.model_path)
makedirs(server.model_path)

if args.base:
if not args.no_base:
logger.info("converting base models")
convert_models(server, args, base_models)

Expand Down
2 changes: 1 addition & 1 deletion exe/onnx-web-full.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ set ONNX_WEB_EXTRA_MODELS=%ONNX_WEB_MODEL_PATH%\preconverted-fp32.json,%ONNX_WEB

REM convert models and launch the server
@echo Launching onnx-web in fp32 mode...
server\onnx-web.exe --base=false --diffusion --correction --upscaling
server\onnx-web.exe --no-base --diffusion --correction --upscaling
2 changes: 1 addition & 1 deletion exe/onnx-web-half.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ set ONNX_WEB_EXTRA_MODELS=%ONNX_WEB_MODEL_PATH%\preconverted-fp16.json,%ONNX_WEB

REM convert models and launch the server
@echo Launching onnx-web in fp16 mode...
server\onnx-web.exe --base=false --diffusion --correction --upscaling --half
server\onnx-web.exe --no-base --diffusion --correction --upscaling --half

0 comments on commit 50d51a3

Please sign in to comment.