From 089a0022ae9dd53c7b9b540e251fb0231459e297 Mon Sep 17 00:00:00 2001 From: tangjicheng Date: Mon, 10 Jul 2023 23:10:14 +0900 Subject: [PATCH] add queue lock for refresh-checkpoints --- modules/api/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/api/api.py b/modules/api/api.py index 2e49526e3..7f7e3a9b1 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -593,7 +593,8 @@ class Api: } def refresh_checkpoints(self): - shared.refresh_checkpoints() + with self.queue_lock: + shared.refresh_checkpoints() def create_embedding(self, args: dict): try: