Add object detection, tracking, mobile notifications, and search to any security camera.
fix qwen toggle on off on
roryclear897f9f0f0035
diff --git a/clearcam.py b/clearcam.pyindex f42469c..8d343fc 100644--- a/clearcam.py+++ b/clearcam.py@@ -1265,14 +1265,14 @@ def set_settings(x): # todo, save to db, do logic in GlobalSettings class, sanitx.userID = Nonex.use_qwen = False- if global_settings.use_qwen != x.use_qwen or global_settings.qwen_size != x.qwen_size:- if x.use_qwen:- qwen = Qwen3VL(size=f"{x.qwen_size}B", res=(544, 960)) # h, w. they need to be multiples of 32- qwen_prompt = "What has been detected on my CCTV camera? Write in one short sentence"- print("prewarming Qwen")- qwen.prewarm()- print("DONE")- else: qwen = None+ # todo change size mid run doesn't work+ if (x.use_qwen and qwen is None) or (x.use_qwen and global_settings.qwen_size != x.qwen_size):+ qwen = None+ qwen = Qwen3VL(size=f"{x.qwen_size}B", res=(544, 960)) # h, w. they need to be multiples of 32+ qwen_prompt = "What has been detected on my CCTV camera? Write in one short sentence"+ print("prewarming Qwen")+ qwen.prewarm()+ print("DONE")global_settings = xdef clip_latest_img(img):@@ -1419,6 +1419,7 @@ if __name__ == "__main__":jit_cache = {}yolo_jit_cache = {}alerts_on = {}+ qwen = Nonemultiprocessing.set_start_method("spawn", force=True)database = db()cams = database.run_get("links", None)