fix autoswap

This commit is contained in:
Concedo 2026-08-06 22:01:45 +08:00
parent 9fdd21de1b
commit 348f7bf7f4

View file

@ -4985,7 +4985,7 @@ class KcppProxyHandler(http.server.BaseHTTPRequestHandler):
whitelist = get_current_admindir_list() # see if its an allowed swap
if was_auto_unloaded and not model_name:
model_name = "initial_model"
if is_different_model and (model_name in whitelist):
if model_name and model_name != global_memory["current_model"] and (model_name in whitelist):
model_switch_pass = True # only claim the request if we really are swapping
global_memory["last_active_timestamp"] = datetime.now()
global_memory["triggered_sleeping"] = False