Skip to content

Commit 749da3c

Browse files
authored
Merge pull request #1148 from ionite34/backport/main/pr-1147
[dev to main] backport: Update nunchaku and sage installers, change comfy cuda index to cu128 for better compat (1147)
2 parents 1a31edc + 4964aed commit 749da3c

File tree

4 files changed

+43
-27
lines changed

4 files changed

+43
-27
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
88
## v2.15.1
99
### Changed
1010
- Upgraded ComfyUI-Zluda and Stable Diffusion WebUI AMDGPU Forge packages to install and use HIP SDK 6.4.2
11+
- Changed ComfyUI torch index from `cu129` back to `cu128` for better compatibility with custom nodes
12+
- Updated SageAttention installer to install v2.2.0-windows.post3
13+
- Updated Nunchaku installer to install v1.0.1
1114
### Fixed
1215
- Fixed [#1372](https://github.com/LykosAI/StabilityMatrix/issues/1372) - LiteAsyncException upon starting Stability Matrix v2.15.0
1316
- Fixed [#1391](https://github.com/LykosAI/StabilityMatrix/issues/1391) - "Failed to parse" error when upgrading pip packages with extra index url

StabilityMatrix.Core/Models/PackageModification/InstallNunchakuStep.cs

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ await pyInstallationManager.GetInstallationAsync(pyVersion).ConfigureAwait(false
5050
10 => "cp310",
5151
11 => "cp311",
5252
12 => "cp312",
53+
13 => "cp313",
5354
_ => throw new ArgumentOutOfRangeException("Invalid Python version"),
5455
};
5556
var platform = Compat.IsWindows ? "win_amd64" : "linux_x86_64";
@@ -65,13 +66,13 @@ var v when v.StartsWith("2.5") => "2.5",
6566
var v when v.StartsWith("2.6") => "2.6",
6667
var v when v.StartsWith("2.7") => "2.7",
6768
var v when v.StartsWith("2.8") => "2.8",
69+
var v when v.StartsWith("2.10") => "2.10",
6870
_ => throw new InvalidOperationException(
6971
"No compatible torch version found in the virtual environment."
7072
),
7173
};
72-
7374
var downloadUrl =
74-
$"https://github.com/mit-han-lab/nunchaku/releases/download/v0.3.1/nunchaku-0.3.1+torch{torchVersion}-{shortPythonVersionString}-{shortPythonVersionString}-{platform}.whl";
75+
$"https://github.com/nunchaku-tech/nunchaku/releases/download/v1.0.1/nunchaku-1.0.1+torch{torchVersion}-{shortPythonVersionString}-{shortPythonVersionString}-{platform}.whl";
7576
progress?.Report(
7677
new ProgressReport(-1f, message: "Installing Nunchaku backend", isIndeterminate: true)
7778
);
@@ -82,31 +83,43 @@ var v when v.StartsWith("2.8") => "2.8",
8283
new ProgressReport(1f, message: "Nunchaku backend installed successfully", isIndeterminate: false)
8384
);
8485

85-
var nunchakuNodePath = WorkingDirectory.JoinDir("custom_nodes", "ComfyUI-nunchaku");
86-
if (nunchakuNodePath.Exists)
87-
{
88-
progress?.Report(
89-
new ProgressReport(
90-
1f,
91-
message: "Nunchaku extension installed successfully.",
92-
isIndeterminate: false
93-
)
94-
);
95-
return;
96-
}
97-
9886
var extensions = await ComfyExtensionManager
9987
.GetManifestExtensionsAsync(ComfyExtensionManager.DefaultManifests)
10088
.ConfigureAwait(false);
10189
var nunchakuExtension = extensions.FirstOrDefault(e =>
10290
e.Title.Equals("ComfyUI-nunchaku", StringComparison.OrdinalIgnoreCase)
10391
);
92+
10493
if (nunchakuExtension is null)
10594
return;
10695

107-
await ComfyExtensionManager
108-
.InstallExtensionAsync(nunchakuExtension, InstalledPackage, null, progress)
96+
var installedExtensions = await ComfyExtensionManager
97+
.GetInstalledExtensionsLiteAsync(InstalledPackage)
10998
.ConfigureAwait(false);
99+
var installedNunchakuExtension = installedExtensions.FirstOrDefault(e =>
100+
e.Title.Equals("ComfyUI-nunchaku", StringComparison.OrdinalIgnoreCase)
101+
);
102+
103+
if (installedNunchakuExtension is not null)
104+
{
105+
var installedNunchakuExtensionWithVersion = await ComfyExtensionManager
106+
.GetInstalledExtensionInfoAsync(installedNunchakuExtension)
107+
.ConfigureAwait(false);
108+
installedNunchakuExtensionWithVersion = installedNunchakuExtensionWithVersion with
109+
{
110+
Definition = nunchakuExtension,
111+
};
112+
113+
await ComfyExtensionManager
114+
.UpdateExtensionAsync(installedNunchakuExtensionWithVersion, InstalledPackage, null, progress)
115+
.ConfigureAwait(false);
116+
}
117+
else
118+
{
119+
await ComfyExtensionManager
120+
.InstallExtensionAsync(nunchakuExtension, InstalledPackage, null, progress)
121+
.ConfigureAwait(false);
122+
}
110123

111124
progress?.Report(
112125
new ProgressReport(

StabilityMatrix.Core/Models/PackageModification/InstallSageAttentionStep.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ await pyInstallationManager.GetInstallationAsync(pyVersion).ConfigureAwait(false
6767
else if (torchInfo.Version.Contains("2.5.1") && torchInfo.Version.Contains("cu124"))
6868
{
6969
sageWheelUrl =
70-
"https://github.com/woct0rdho/SageAttention/releases/download/v2.2.0-windows.post2/sageattention-2.2.0+cu124torch2.5.1.post2-cp39-abi3-win_amd64.whl";
70+
"https://github.com/woct0rdho/SageAttention/releases/download/v2.2.0-windows.post3/sageattention-2.2.0+cu124torch2.5.1.post3-cp39-abi3-win_amd64.whl";
7171
}
7272
else if (torchInfo.Version.Contains("2.6.0") && torchInfo.Version.Contains("cu126"))
7373
{
7474
sageWheelUrl =
75-
$"https://github.com/woct0rdho/SageAttention/releases/download/v2.2.0-windows.post2/sageattention-2.2.0+cu126torch2.6.0.post2-cp39-abi3-win_amd64.whl";
75+
"https://github.com/woct0rdho/SageAttention/releases/download/v2.2.0-windows.post3/sageattention-2.2.0+cu126torch2.6.0.post3-cp39-abi3-win_amd64.whl";
7676
}
7777
else if (torchInfo.Version.Contains("2.7.0") && torchInfo.Version.Contains("cu128"))
7878
{
@@ -82,20 +82,20 @@ await pyInstallationManager.GetInstallationAsync(pyVersion).ConfigureAwait(false
8282
else if (torchInfo.Version.Contains("2.7.1") && torchInfo.Version.Contains("cu128"))
8383
{
8484
sageWheelUrl =
85-
$"https://github.com/woct0rdho/SageAttention/releases/download/v2.2.0-windows.post2/sageattention-2.2.0+cu128torch2.7.1.post2-cp39-abi3-win_amd64.whl";
85+
"https://github.com/woct0rdho/SageAttention/releases/download/v2.2.0-windows.post3/sageattention-2.2.0+cu128torch2.7.1.post3-cp39-abi3-win_amd64.whl";
8686
}
8787
else if (torchInfo.Version.Contains("2.8.0") && torchInfo.Version.Contains("cu128"))
8888
{
8989
sageWheelUrl =
90-
$"https://github.com/woct0rdho/SageAttention/releases/download/v2.2.0-windows.post2/sageattention-2.2.0+cu128torch2.8.0.post2-cp39-abi3-win_amd64.whl";
90+
"https://github.com/woct0rdho/SageAttention/releases/download/v2.2.0-windows.post3/sageattention-2.2.0+cu128torch2.8.0.post3-cp39-abi3-win_amd64.whl";
9191
}
92-
93-
var pipArgs = new PipInstallArgs();
94-
if (IsBlackwellGpu)
92+
else if (torchInfo.Version.Contains("2.9.0") && torchInfo.Version.Contains("cu128"))
9593
{
96-
pipArgs = pipArgs.AddArg("--pre");
94+
sageWheelUrl =
95+
"https://github.com/woct0rdho/SageAttention/releases/download/v2.2.0-windows.post3/sageattention-2.2.0+cu128torch2.9.0.post3-cp39-abi3-win_amd64.whl";
9796
}
98-
pipArgs = pipArgs.AddArg("triton-windows");
97+
98+
var pipArgs = new PipInstallArgs("triton-windows");
9999

100100
if (!string.IsNullOrWhiteSpace(sageWheelUrl))
101101
{

StabilityMatrix.Core/Models/Packages/ComfyUI.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ _ when gfxArch.StartsWith("gfx120") => "https://rocm.nightlies.amd.com/v2/gfx120
411411
RequirementsFilePaths = ["requirements.txt"],
412412
ExtraPipArgs = ["numpy<2"],
413413
TorchaudioVersion = " ", // Request torchaudio without a specific version
414-
CudaIndex = isLegacyNvidia ? "cu126" : "cu129",
414+
CudaIndex = isLegacyNvidia ? "cu126" : "cu128",
415415
RocmIndex = "rocm6.4",
416416
UpgradePackages = true,
417417
};

0 commit comments

Comments
 (0)