Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions StabilityMatrix.Core/Models/Packages/A3WebUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,19 +219,19 @@ 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());

// 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",
Expand Down
2 changes: 1 addition & 1 deletion StabilityMatrix.Core/Models/Packages/ComfyUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
};
Expand Down
2 changes: 1 addition & 1 deletion StabilityMatrix.Core/Models/Packages/InvokeAI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down
2 changes: 1 addition & 1 deletion StabilityMatrix.Core/Models/Packages/PipInstallConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions StabilityMatrix.Core/Models/Packages/SDWebForge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,18 +181,18 @@ 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?.IsLegacyNvidiaGpu() ?? HardwareHelper.HasLegacyNvidiaGpu());

var config = new PipInstallConfig
{
PrePipInstallArgs = ["joblib"],
RequirementsFilePaths = requirementsPaths,
TorchVersion = "",
TorchvisionVersion = "",
CudaIndex = isBlackwell ? "cu128" : "cu126",
RocmIndex = "rocm7.1",
TorchVersion = " ",
TorchvisionVersion = " ",
CudaIndex = isLegacyNvidia ? "cu126" : "cu128",
RocmIndex = "rocm7.2",
ExtraPipArgs =
[
"https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip",
Expand Down
Loading