Merge branch 'comfyanonymous:master' into master

This commit is contained in:
patientx 2025-08-10 12:09:19 +03:00 committed by GitHub
commit c2686a3968
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -341,7 +341,7 @@ if ENABLE_PYTORCH_ATTENTION:
PRIORITIZE_FP16 = False # TODO: remove and replace with something that shows exactly which dtype is faster than the other
try:
if is_nvidia() and PerformanceFeature.Fp16Accumulation in args.fast:
if (is_nvidia() or is_amd()) and PerformanceFeature.Fp16Accumulation in args.fast:
torch.backends.cuda.matmul.allow_fp16_accumulation = True
PRIORITIZE_FP16 = True # TODO: limit to cards where it actually boosts performance
logging.info("Enabled fp16 accumulation.")