From 8c0bae50c3b13a4cf1b910f6b98efd27a87acf27 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Mon, 17 Feb 2025 04:42:40 -0500 Subject: [PATCH] bf16 manual cast works on old AMD. --- comfy/model_management.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/comfy/model_management.py b/comfy/model_management.py index 05f66c9e5..535d53014 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -1111,6 +1111,8 @@ def should_use_bf16(device=None, model_params=0, prioritize_performance=True, ma if is_amd(): arch = torch.cuda.get_device_properties(device).gcnArchName if arch in ["gfx1030", "gfx1031", "gfx1010", "gfx1011", "gfx1012", "gfx906", "gfx900", "gfx803"]: # RDNA2 and older don't support bf16 + if manual_cast: + return True return False props = torch.cuda.get_device_properties(device)