Enable Convolution AutoTuning (#9301)

This commit is contained in:
contentis
2025-09-02 02:33:50 +02:00
committed by GitHub
parent 27e067ce50
commit e2d1e5dad9
2 changed files with 4 additions and 0 deletions

View File

@@ -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() and PerformanceFeature.AutoTune in args.fast:
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)