From b706078845ea21f3cf0206874877ec062067bbc8 Mon Sep 17 00:00:00 2001 From: NeuralFault <65365345+NeuralFault@users.noreply.github.com> Date: Wed, 24 Dec 2025 20:58:23 -0500 Subject: [PATCH 1/4] Updated SDWebForge ROCm index configuration to utilize version 6.4 as was still hardcoded to 5.7 and causing reForge to install with 5.7. --- 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 6ba6dbcd..c2eb32db 100644 --- a/StabilityMatrix.Core/Models/Packages/SDWebForge.cs +++ b/StabilityMatrix.Core/Models/Packages/SDWebForge.cs @@ -182,7 +182,7 @@ torchIndex is TorchIndex.Cuda TorchVersion = isBlackwell ? "" : "==2.3.1", TorchvisionVersion = isBlackwell ? "" : "==0.18.1", CudaIndex = isBlackwell ? "cu128" : "cu121", - RocmIndex = "rocm5.7", + RocmIndex = "rocm6.4", ExtraPipArgs = [ "https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip", From 83463418e31600f6a77cf4853eb55b29bf0f3517 Mon Sep 17 00:00:00 2001 From: NeuralFault <65365345+NeuralFault@users.noreply.github.com> Date: Wed, 24 Dec 2025 22:23:21 -0500 Subject: [PATCH 2/4] expanded the change to rocm6.4 to include AMD GPU's to not have version contraint for pytorch, so latest pytorch is installed when using AMD --- .../Models/Packages/SDWebForge.cs | 41 +++++++++++-------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/StabilityMatrix.Core/Models/Packages/SDWebForge.cs b/StabilityMatrix.Core/Models/Packages/SDWebForge.cs index c2eb32db..8f1020de 100644 --- a/StabilityMatrix.Core/Models/Packages/SDWebForge.cs +++ b/StabilityMatrix.Core/Models/Packages/SDWebForge.cs @@ -170,25 +170,30 @@ public override async Task InstallPackage( ); } - var torchIndex = options.PythonOptions.TorchIndex ?? GetRecommendedTorchVersion(); - var isBlackwell = - torchIndex is TorchIndex.Cuda - && (SettingsManager.Settings.PreferredGpu?.IsBlackwellGpu() ?? HardwareHelper.HasBlackwellGpu()); +var torchIndex = options.PythonOptions.TorchIndex ?? GetRecommendedTorchVersion(); +var isBlackwell = + torchIndex is TorchIndex.Cuda + && (SettingsManager.Settings.PreferredGpu?. IsBlackwellGpu() ?? HardwareHelper.HasBlackwellGpu()); - var config = new PipInstallConfig - { - PrePipInstallArgs = ["joblib"], - RequirementsFilePaths = requirementsPaths, - TorchVersion = isBlackwell ? "" : "==2.3.1", - TorchvisionVersion = isBlackwell ? "" : "==0.18.1", - CudaIndex = isBlackwell ? "cu128" : "cu121", - RocmIndex = "rocm6.4", - ExtraPipArgs = - [ - "https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip", - ], - PostInstallPipArgs = ["numpy==1.26.4"], - }; +var isAmd = torchIndex is TorchIndex.Rocm; + +// Use latest PyTorch for Blackwell and AMD ROCm, otherwise use 2.3.1 +var useLatestPyTorch = isBlackwell || isAmd; + +var config = new PipInstallConfig +{ + PrePipInstallArgs = ["joblib"], + RequirementsFilePaths = requirementsPaths, + TorchVersion = useLatestPyTorch ? "" : "==2.3.1", + TorchvisionVersion = useLatestPyTorch ? "" : "==0.18.1", + CudaIndex = isBlackwell ? "cu128" : "cu121", + RocmIndex = "rocm6.4", + ExtraPipArgs = + [ + "https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip", + ], + PostInstallPipArgs = ["numpy==1.26.4"], +}; await StandardPipInstallProcessAsync( venvRunner, From 2c12736cfa2820ec5f2546ce9871ddd929a826ec Mon Sep 17 00:00:00 2001 From: NeuralFault <65365345+NeuralFault@users.noreply.github.com> Date: Wed, 24 Dec 2025 22:57:28 -0500 Subject: [PATCH 3/4] updated indents --- .../Models/Packages/SDWebForge.cs | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/StabilityMatrix.Core/Models/Packages/SDWebForge.cs b/StabilityMatrix.Core/Models/Packages/SDWebForge.cs index 8f1020de..65cf412d 100644 --- a/StabilityMatrix.Core/Models/Packages/SDWebForge.cs +++ b/StabilityMatrix.Core/Models/Packages/SDWebForge.cs @@ -170,30 +170,30 @@ public override async Task InstallPackage( ); } -var torchIndex = options.PythonOptions.TorchIndex ?? GetRecommendedTorchVersion(); -var isBlackwell = - torchIndex is TorchIndex.Cuda - && (SettingsManager.Settings.PreferredGpu?. IsBlackwellGpu() ?? HardwareHelper.HasBlackwellGpu()); + var torchIndex = options.PythonOptions.TorchIndex ?? GetRecommendedTorchVersion(); + var isBlackwell = + torchIndex is TorchIndex.Cuda + && (SettingsManager.Settings.PreferredGpu?.IsBlackwellGpu() ?? HardwareHelper.HasBlackwellGpu()); -var isAmd = torchIndex is TorchIndex.Rocm; + var isAmd = torchIndex is TorchIndex.Rocm; -// Use latest PyTorch for Blackwell and AMD ROCm, otherwise use 2.3.1 -var useLatestPyTorch = isBlackwell || isAmd; + // Use latest PyTorch for Blackwell and AMD ROCm, otherwise use 2.3.1 + var useLatestPyTorch = isBlackwell || isAmd; -var config = new PipInstallConfig -{ - PrePipInstallArgs = ["joblib"], - RequirementsFilePaths = requirementsPaths, - TorchVersion = useLatestPyTorch ? "" : "==2.3.1", - TorchvisionVersion = useLatestPyTorch ? "" : "==0.18.1", - CudaIndex = isBlackwell ? "cu128" : "cu121", - RocmIndex = "rocm6.4", - ExtraPipArgs = - [ - "https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip", - ], - PostInstallPipArgs = ["numpy==1.26.4"], -}; + var config = new PipInstallConfig + { + PrePipInstallArgs = ["joblib"], + RequirementsFilePaths = requirementsPaths, + TorchVersion = useLatestPyTorch ? "" : "==2.3.1", + TorchvisionVersion = useLatestPyTorch ? "" : "==0.18.1", + CudaIndex = isBlackwell ? "cu128" : "cu121", + RocmIndex = "rocm6.4", + ExtraPipArgs = + [ + "https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip", + ], + PostInstallPipArgs = ["numpy==1.26.4"], + }; await StandardPipInstallProcessAsync( venvRunner, From 652ac66d9fae377d0d3aa35725e0dc891714c146 Mon Sep 17 00:00:00 2001 From: NeuralFault <65365345+NeuralFault@users.noreply.github.com> Date: Wed, 24 Dec 2025 23:20:14 -0500 Subject: [PATCH 4/4] Updated to have all installs use latest PyTorch. Adjusted default cuda install to be cu126 whilst keeping Blackwell GPU environment at cu128. Removed AMD GPU check as no longer needed. --- StabilityMatrix.Core/Models/Packages/SDWebForge.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/StabilityMatrix.Core/Models/Packages/SDWebForge.cs b/StabilityMatrix.Core/Models/Packages/SDWebForge.cs index 65cf412d..3f9e6ba5 100644 --- a/StabilityMatrix.Core/Models/Packages/SDWebForge.cs +++ b/StabilityMatrix.Core/Models/Packages/SDWebForge.cs @@ -177,16 +177,13 @@ torchIndex is TorchIndex.Cuda var isAmd = torchIndex is TorchIndex.Rocm; - // Use latest PyTorch for Blackwell and AMD ROCm, otherwise use 2.3.1 - var useLatestPyTorch = isBlackwell || isAmd; - var config = new PipInstallConfig { PrePipInstallArgs = ["joblib"], RequirementsFilePaths = requirementsPaths, - TorchVersion = useLatestPyTorch ? "" : "==2.3.1", - TorchvisionVersion = useLatestPyTorch ? "" : "==0.18.1", - CudaIndex = isBlackwell ? "cu128" : "cu121", + TorchVersion = "", + TorchvisionVersion = "", + CudaIndex = isBlackwell ? "cu128" : "cu126", RocmIndex = "rocm6.4", ExtraPipArgs = [