mm: dont reset cast buffers in cleanup_models_gc() (#14372)

cleanup_models_gc can be called once per load_models_gpu via
free_memory, which in turn can de-activate an active model via
this reset_cast_buffers.

cleanup_models_gc() could also come via obscure garbage collector
paths so limit reset_cast_buffers to the post-node callsite instead.
This commit is contained in:
rattus 2026-06-10 03:57:04 +10:00 committed by GitHub
parent 9fc6f5f6dd
commit 6f01b244a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -958,8 +958,6 @@ def loaded_models(only_currently_used=False):
def cleanup_models_gc():
do_gc = False
reset_cast_buffers()
for i in range(len(current_loaded_models)):
cur = current_loaded_models[i]
if cur.is_dead():