From 6d0c02e74c0b0a6e34f74a8c7fe57b79bd15ca32 Mon Sep 17 00:00:00 2001 From: NeuralFault Date: Wed, 8 Apr 2026 01:41:09 -0400 Subject: [PATCH 1/5] Rocm Update to 7.2 index (Linux) - ComfyUI - Forge/reForge - A1111 SD WebUI - InvokeAI (Not documented, tested working) Modernize the PyTorch install handling to bring up to date to latest versions. Switched Blackwell condition to IsLegacyNvidia (pre-Turning) to pin cu126 build (and its matching xformers). Removed MPS pinning as was very old. --- StabilityMatrix.Core/Models/Packages/A3WebUI.cs | 17 ++++++++++------- StabilityMatrix.Core/Models/Packages/ComfyUI.cs | 2 +- .../Models/Packages/InvokeAI.cs | 2 +- .../Models/Packages/PipInstallConfig.cs | 2 +- .../Models/Packages/SDWebForge.cs | 2 +- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/StabilityMatrix.Core/Models/Packages/A3WebUI.cs b/StabilityMatrix.Core/Models/Packages/A3WebUI.cs index 345505bf..f6ca937d 100644 --- a/StabilityMatrix.Core/Models/Packages/A3WebUI.cs +++ b/StabilityMatrix.Core/Models/Packages/A3WebUI.cs @@ -219,19 +219,22 @@ public override async Task InstallPackage( .ConfigureAwait(false); var torchIndex = options.PythonOptions.TorchIndex ?? GetRecommendedTorchVersion(); - var isBlackwell = + var isLegacyNvidia = torchIndex is TorchIndex.Cuda - && (SettingsManager.Settings.PreferredGpu?.IsBlackwellGpu() ?? HardwareHelper.HasBlackwellGpu()); + && (SettingsManager.Settings.PreferredGpu?.IsLegacyNvidiaGpu() ?? HardwareHelper.HasLegacyNvidiaGpu()); + var isRocm = + torchIndex is TorchIndex.Rocm + && (SettingsManager.Settings.PreferredGpu?.IsAmd ?? HardwareHelper.HasAmdGpu()); // 1. Configure the entire install process declaratively. var config = new PipInstallConfig { RequirementsFilePaths = ["requirements_versions.txt"], - TorchVersion = torchIndex == TorchIndex.Mps ? "==2.3.1" : (isBlackwell ? "" : "==2.1.2"), - TorchvisionVersion = torchIndex == TorchIndex.Mps ? "==0.18.1" : (isBlackwell ? "" : "==0.16.2"), - XformersVersion = isBlackwell ? " " : "==0.0.23.post1", - CudaIndex = isBlackwell ? "cu128" : "cu121", - RocmIndex = "rocm5.6", + TorchVersion = "", + TorchvisionVersion = "", + XformersVersion = isLegacyNvidia ? "==0.0.30" : " ", + CudaIndex = isLegacyNvidia ? "cu126" : "cu128", + RocmIndex = "rocm7.2", ExtraPipArgs = [ "https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip", diff --git a/StabilityMatrix.Core/Models/Packages/ComfyUI.cs b/StabilityMatrix.Core/Models/Packages/ComfyUI.cs index 215901ed..a4c34649 100644 --- a/StabilityMatrix.Core/Models/Packages/ComfyUI.cs +++ b/StabilityMatrix.Core/Models/Packages/ComfyUI.cs @@ -431,7 +431,7 @@ _ when gfxArch.StartsWith("gfx120") => "https://rocm.nightlies.amd.com/v2/gfx120 ExtraPipArgs = ["numpy<2"], TorchaudioVersion = " ", // Request torchaudio without a specific version CudaIndex = isLegacyNvidia ? "cu126" : "cu130", - RocmIndex = "rocm7.1", + RocmIndex = "rocm7.2", UpgradePackages = true, PostInstallPipArgs = ["typing-extensions>=4.15.0"], }; diff --git a/StabilityMatrix.Core/Models/Packages/InvokeAI.cs b/StabilityMatrix.Core/Models/Packages/InvokeAI.cs index ed0226df..32080e0a 100644 --- a/StabilityMatrix.Core/Models/Packages/InvokeAI.cs +++ b/StabilityMatrix.Core/Models/Packages/InvokeAI.cs @@ -229,7 +229,7 @@ public override async Task InstallPackage( TorchIndex.Cpu when Compat.IsLinux => "https://download.pytorch.org/whl/cpu", TorchIndex.Cuda when isLegacyNvidiaGpu => "https://download.pytorch.org/whl/cu126", TorchIndex.Cuda => "https://download.pytorch.org/whl/cu128", - TorchIndex.Rocm => "https://download.pytorch.org/whl/rocm6.3", + TorchIndex.Rocm => "https://download.pytorch.org/whl/rocm7.2", _ => string.Empty, }; diff --git a/StabilityMatrix.Core/Models/Packages/PipInstallConfig.cs b/StabilityMatrix.Core/Models/Packages/PipInstallConfig.cs index 320915b2..f2f23add 100644 --- a/StabilityMatrix.Core/Models/Packages/PipInstallConfig.cs +++ b/StabilityMatrix.Core/Models/Packages/PipInstallConfig.cs @@ -15,7 +15,7 @@ public record PipInstallConfig public string TorchaudioVersion { get; init; } = ""; public string XformersVersion { get; init; } = ""; public string CudaIndex { get; init; } = "cu130"; - public string RocmIndex { get; init; } = "rocm6.4"; + public string RocmIndex { get; init; } = "rocm7.2"; public bool ForceReinstallTorch { get; init; } = true; public bool UpgradePackages { get; init; } = false; public bool SkipTorchInstall { get; init; } = false; diff --git a/StabilityMatrix.Core/Models/Packages/SDWebForge.cs b/StabilityMatrix.Core/Models/Packages/SDWebForge.cs index d2675c43..ae384bb0 100644 --- a/StabilityMatrix.Core/Models/Packages/SDWebForge.cs +++ b/StabilityMatrix.Core/Models/Packages/SDWebForge.cs @@ -192,7 +192,7 @@ torchIndex is TorchIndex.Cuda TorchVersion = "", TorchvisionVersion = "", CudaIndex = isBlackwell ? "cu128" : "cu126", - RocmIndex = "rocm7.1", + RocmIndex = "rocm7.2", ExtraPipArgs = [ "https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip", From e7d4b05e30ef38a2ba3780d36bd565ac4ef87878 Mon Sep 17 00:00:00 2001 From: NeuralFault <65365345+NeuralFault@users.noreply.github.com> Date: Wed, 8 Apr 2026 01:51:25 -0400 Subject: [PATCH 2/5] Remove isRocm variable from A3WebUI Remove unused isRocm variable related to AMD GPU check. --- StabilityMatrix.Core/Models/Packages/A3WebUI.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/StabilityMatrix.Core/Models/Packages/A3WebUI.cs b/StabilityMatrix.Core/Models/Packages/A3WebUI.cs index f6ca937d..9742da6b 100644 --- a/StabilityMatrix.Core/Models/Packages/A3WebUI.cs +++ b/StabilityMatrix.Core/Models/Packages/A3WebUI.cs @@ -222,9 +222,6 @@ public override async Task InstallPackage( var isLegacyNvidia = torchIndex is TorchIndex.Cuda && (SettingsManager.Settings.PreferredGpu?.IsLegacyNvidiaGpu() ?? HardwareHelper.HasLegacyNvidiaGpu()); - var isRocm = - torchIndex is TorchIndex.Rocm - && (SettingsManager.Settings.PreferredGpu?.IsAmd ?? HardwareHelper.HasAmdGpu()); // 1. Configure the entire install process declaratively. var config = new PipInstallConfig From 0778594faa088a6c01aabbbd96cb12a2321ade25 Mon Sep 17 00:00:00 2001 From: NeuralFault <65365345+NeuralFault@users.noreply.github.com> Date: Wed, 8 Apr 2026 01:54:35 -0400 Subject: [PATCH 3/5] Update Torch and Torchvision version placeholders Updated Torch and Torchvision version placeholders in the configuration. --- StabilityMatrix.Core/Models/Packages/A3WebUI.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/StabilityMatrix.Core/Models/Packages/A3WebUI.cs b/StabilityMatrix.Core/Models/Packages/A3WebUI.cs index 9742da6b..305f56e7 100644 --- a/StabilityMatrix.Core/Models/Packages/A3WebUI.cs +++ b/StabilityMatrix.Core/Models/Packages/A3WebUI.cs @@ -227,8 +227,8 @@ torchIndex is TorchIndex.Cuda var config = new PipInstallConfig { RequirementsFilePaths = ["requirements_versions.txt"], - TorchVersion = "", - TorchvisionVersion = "", + TorchVersion = " ", + TorchvisionVersion = " ", XformersVersion = isLegacyNvidia ? "==0.0.30" : " ", CudaIndex = isLegacyNvidia ? "cu126" : "cu128", RocmIndex = "rocm7.2", From f763fea836905f9400a39701ddeb39c758012a9d Mon Sep 17 00:00:00 2001 From: NeuralFault <65365345+NeuralFault@users.noreply.github.com> Date: Wed, 8 Apr 2026 02:11:45 -0400 Subject: [PATCH 4/5] Update GPU compatibility checks for Torch version IsBlackwell -> IsLegacyNvidia --- StabilityMatrix.Core/Models/Packages/SDWebForge.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/StabilityMatrix.Core/Models/Packages/SDWebForge.cs b/StabilityMatrix.Core/Models/Packages/SDWebForge.cs index ae384bb0..a31e9378 100644 --- a/StabilityMatrix.Core/Models/Packages/SDWebForge.cs +++ b/StabilityMatrix.Core/Models/Packages/SDWebForge.cs @@ -181,17 +181,17 @@ public override async Task InstallPackage( } var torchIndex = options.PythonOptions.TorchIndex ?? GetRecommendedTorchVersion(); - var isBlackwell = + var isLegacyNvidia = torchIndex is TorchIndex.Cuda - && (SettingsManager.Settings.PreferredGpu?.IsBlackwellGpu() ?? HardwareHelper.HasBlackwellGpu()); + && (SettingsManager.Settings.PreferredGpu?.IsLegacyNvidia() ?? HardwareHelper.HasLegacyNvidia()); var config = new PipInstallConfig { PrePipInstallArgs = ["joblib"], RequirementsFilePaths = requirementsPaths, - TorchVersion = "", - TorchvisionVersion = "", - CudaIndex = isBlackwell ? "cu128" : "cu126", + TorchVersion = " ", + TorchvisionVersion = " ", + CudaIndex = isLegacyNvidia ? "cu126" : "cu128", RocmIndex = "rocm7.2", ExtraPipArgs = [ From 9347b69a1ba068ea32d461b884c4b1a4ecbc1f19 Mon Sep 17 00:00:00 2001 From: NeuralFault Date: Wed, 8 Apr 2026 02:18:03 -0400 Subject: [PATCH 5/5] Update legacy NVIDIA GPU check method in SDWebForge --- StabilityMatrix.Core/Models/Packages/SDWebForge.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/StabilityMatrix.Core/Models/Packages/SDWebForge.cs b/StabilityMatrix.Core/Models/Packages/SDWebForge.cs index a31e9378..dd542aaa 100644 --- a/StabilityMatrix.Core/Models/Packages/SDWebForge.cs +++ b/StabilityMatrix.Core/Models/Packages/SDWebForge.cs @@ -183,7 +183,7 @@ public override async Task InstallPackage( var torchIndex = options.PythonOptions.TorchIndex ?? GetRecommendedTorchVersion(); var isLegacyNvidia = torchIndex is TorchIndex.Cuda - && (SettingsManager.Settings.PreferredGpu?.IsLegacyNvidia() ?? HardwareHelper.HasLegacyNvidia()); + && (SettingsManager.Settings.PreferredGpu?.IsLegacyNvidiaGpu() ?? HardwareHelper.HasLegacyNvidiaGpu()); var config = new PipInstallConfig {