Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Put ROCm version in tuple to make it easier to enable stuff based on it. (#8348)

comfyanonymous704fc7885491
diff --git a/comfy/model_management.py b/comfy/model_management.py
index f5b37e68e..8ae5a5abb 100644
--- a/comfy/model_management.py
+++ b/comfy/model_management.py
@@ -297,8 +297,13 @@ except:
try:
if is_amd():
+ try:
+ rocm_version = tuple(map(int, str(torch.version.hip).split(".")[:2]))
+ except:
+ rocm_version = (6, -1)
arch = torch.cuda.get_device_properties(get_torch_device()).gcnArchName
logging.info("AMD arch: {}".format(arch))
+ logging.info("ROCm version: {}".format(rocm_version))
if args.use_split_cross_attention == False and args.use_quad_cross_attention == False:
if torch_version_numeric[0] >= 2 and torch_version_numeric[1] >= 7: # works on 2.6 but doesn't actually seem to improve much
if any((a in arch) for a in ["gfx1100", "gfx1101", "gfx1151"]): # TODO: more arches