execution: remove per node gc.collect()

This isn't worth it and the likelyhood of inference leaving a complex
data-structure with cyclic reference behind is now. Remove it.

We would replace it with a condition on nodes that actually touch the
GPU which might be win.
This commit is contained in:
Rattus 2026-01-20 21:57:28 +10:00
parent ec5a81cfa4
commit d4f895042d

View File

@ -530,7 +530,6 @@ async def execute(server, dynprompt, caches, current_item, extra_data, executed,
#FIXME: this is probably a little zealous
# Torch code comments says some stuff about not actually freeing tensors on mempool
#context release. Explicitly garbage collect now.
gc.collect()
torch.cuda.empty_cache()
if has_pending_tasks: