mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-01 01:00:20 +08:00
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:
parent
ec5a81cfa4
commit
d4f895042d
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user