diff --git a/comfy/ops.py b/comfy/ops.py index 2cc9bbc27..3b576bd1b 100644 --- a/comfy/ops.py +++ b/comfy/ops.py @@ -26,6 +26,9 @@ import contextlib 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)