Skip to content

Commit

Permalink
fix(api): defer first model load until first request
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jan 8, 2023
1 parent 4894e0d commit 0232c71
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions api/onnx_web/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ def check_paths():
def load_models():
global available_models
available_models = [f.name for f in scandir(model_path) if f.is_dir()]
load_pipeline(OnnxStableDiffusionPipeline, get_model_path(available_models[0]), platform_providers.get(
default_platform), pipeline_schedulers.get(default_scheduler))


check_paths()
Expand Down

0 comments on commit 0232c71

Please sign in to comment.