Skip to content

Commit 3f1fea3

Browse files
attempt to avoid modal segfault in enter
1 parent fd79c9f commit 3f1fea3

File tree

1 file changed

+3
-2
lines changed
  • inference/core/interfaces/webrtc_worker

1 file changed

+3
-2
lines changed

inference/core/interfaces/webrtc_worker/modal.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,14 @@ def start(self):
249249
import inference.models.owlv2.owlv2
250250
if PRELOAD_MODELS:
251251
model_registry = RoboflowModelRegistry(ROBOFLOW_MODEL_TYPES)
252-
self._model_manager = ModelManager(model_registry=model_registry)
252+
model_manager = ModelManager(model_registry=model_registry)
253253
for model_id in PRELOAD_MODELS:
254254
try:
255255
de_aliased_model_id = resolve_roboflow_model_alias(
256256
model_id=model_id
257257
)
258258
logger.info(f"Preloading model: {de_aliased_model_id}")
259-
self._model_manager.add_model(
259+
model_manager.add_model(
260260
model_id=de_aliased_model_id,
261261
api_key=None,
262262
countinference=False,
@@ -268,6 +268,7 @@ def start(self):
268268
model_id,
269269
exc,
270270
)
271+
self._model_manager = model_manager
271272

272273
@modal.exit()
273274
def stop(self):

0 commit comments

Comments
 (0)