From b6d8805d000fd508a49fa3c18c72fb11f5c5977e Mon Sep 17 00:00:00 2001 From: lspindler Date: Tue, 12 Aug 2025 14:57:47 +0200 Subject: [PATCH] Enable Convolution AutoTuning --- comfy/ops.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/comfy/ops.py b/comfy/ops.py index 18e7db705..30c3fdf44 100644 --- a/comfy/ops.py +++ b/comfy/ops.py @@ -52,6 +52,9 @@ except (ModuleNotFoundError, TypeError): cast_to = comfy.model_management.cast_to #TODO: remove once no more references +if torch.cuda.is_available() and torch.backends.cudnn.is_available(): + torch.backends.cudnn.benchmark = True + def cast_to_input(weight, input, non_blocking=False, copy=True): return comfy.model_management.cast_to(weight, input.dtype, input.device, non_blocking=non_blocking, copy=copy)