From 5bbd5597fda29ef248d4898b2ca3a1d02a3659b1 Mon Sep 17 00:00:00 2001 From: Rattus Date: Tue, 27 Jan 2026 14:11:42 +1000 Subject: [PATCH] ops: dont discard pins Its more likely that the user will rerun their workflow and want whatever pins are inplace so remove this. pins still have to respect RAM pressure per model anyway. --- comfy/ops.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/comfy/ops.py b/comfy/ops.py index 107d59cd0..e71c7c56d 100644 --- a/comfy/ops.py +++ b/comfy/ops.py @@ -131,11 +131,7 @@ def cast_bias_weight_with_vbar(s, dtype, device, bias_dtype, non_blocking, compu xfer_dest = cast_dest pin = None - if signature is not None: - #If we are able to increase our load level (e.g. user reduces resolution or batch number) - #reclaim the pin previously used for offload. - comfy.pinned_memory.unpin_memory(s) - elif not resident: + if signature is None and not resident: #prepare a new pin assert comfy.pinned_memory.get_pin(s) is None comfy.pinned_memory.pin_memory(s)