Skip to content

Commit 83043e6

Browse files
committed
Merge pull request LykosAI#984 from ionite34/blackwell-support
Add blackwell torch/vision versions for comfyUI & fix unet path for l… (cherry picked from commit ef90eb2) # Conflicts: # CHANGELOG.md
1 parent 207e6c6 commit 83043e6

File tree

4 files changed

+128
-26
lines changed

4 files changed

+128
-26
lines changed

CHANGELOG.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,71 @@ All notable changes to Stability Matrix will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2.0.0.html).
77

8+
<<<<<<< HEAD
9+
=======
10+
## v2.14.0-dev.3
11+
### Added
12+
- Added support for RTX 5000-series GPUs in ComfyUI
13+
### Changed
14+
- Upgraded ComfyUI CUDA torch to 12.6
15+
### Fixed
16+
- Fixed [#1128](https://github.com/LykosAI/StabilityMatrix/issues/1128) - overwriting models when downloading multiple with the same name
17+
- Fixed ROCm torch indexes for ComfyUI & Forge
18+
- Fixed model browser sometimes downloading to `ModelsLora` or `ModelsStableDiffusion` folders instead of the correct folder
19+
- Fixed incorrect Unet folder path for ComfyUI users on Linux/macOS
20+
21+
## v2.14.0-dev.2
22+
### Added
23+
- Added Align Your Steps scheduler to Inference
24+
- Added wildcards to Inference prompts, e.g. `{blue|green|red}` will randomly select one of the colors
25+
- Added Safetensor Metadata viewer to the Checkpoint Manager context menu - thanks to @genteure!
26+
### Changed
27+
- Updated the Civitai Model Browser base model selector to match the new Checkpoint Manager filter UI
28+
- FaceDetailers in Inference will now inherit the primary sampler/scheduler/etc. by default. You can still manually set these by enabling the options via the ⚙️ button on the FaceDetailer card
29+
- Slightly rearranged the FaceDetailer card layout due to the above change
30+
- "Remove symbolic links on shutdown" option now also removes links from Output Sharing
31+
- Inference "Extra Networks" selector now filters extra networks based on the selected base model
32+
- Updated Japanese, Brazilian Portuguese, Chinese, and Russian translations
33+
### Fixed
34+
- Fixed crash when dragging & dropping images in Inference (hopefully)
35+
- Fixed HiresFix Inference addon not inheriting sampler/scheduler properly
36+
- Fixed some plus (+) buttons getting cut off in the Inference UI
37+
- Fixed CFG Rescale addon interfering with refiner model in Inference
38+
- Fixed [#1083](https://github.com/LykosAI/StabilityMatrix/issues/1083) - "Show Nested Models" incorrectly displaying models from some non-nested folders
39+
- Fixed issue with InvokeAI model sharing when the host address is set to 0.0.0.0
40+
- Fixed issue when parsing index URLs in Python Dependencies Override menu
41+
- Fixed ComfyUI-Zluda not respecting pip user overrides
42+
- Fixed issue with Checkpoint Manager not displaying any models
43+
- (dev.2 re-release) Fixed autocomplete not showing in certain cases when using wildcards
44+
- (dev.2 re-release) Fixed package restart button not working
45+
- (dev.2 re-release) Fixed [#1120](https://github.com/LykosAI/StabilityMatrix/issues/1120) - crash when right clicking in the console after restarting a package
46+
### Supporters
47+
#### Visionaries
48+
- A huge thank you to our incredible Visionary-tier Patreon supporters, **Waterclouds**, **TheTekknician**, and our newest Visionary, **Corey**! Your generous support is greatly appreciated!
49+
50+
## v2.14.0-dev.1
51+
### Added
52+
- Added Rescale CFG addon to Inference
53+
- Added Swap Dimensions button between the width/height input in Inference
54+
- Added Ctrl+Tab/Ctrl+Shift+Tab shortcuts for navigating between Inference tabs
55+
- Added OpenModelDB tab to the Model Browser
56+
### Changed
57+
- Improved the quality of Inference inpainting by upgrading the workflow behind the scenes. The workflow remains the same for you — just better results!
58+
- Redesigned the Checkpoint Manager Filter flyout to include more options and improve the layout
59+
- "Clear All" button will now remain at the top of the Downloads list regardless of scroll position - thanks to @Genteure!
60+
- Improved image metadata parsing - thanks to @Genteure!
61+
### Fixed
62+
- Fixed Inference image selector card buttons taking up the whole height of the card
63+
- Fixed Inference mask editor failing to paint to the right-most edge on large images
64+
- Fixed Inference mask editor not showing the entire image in certain circumstances
65+
- Fixed an issue where certain sampler/scheduler combos would not get saved in image metadata - thanks to @yansigit!
66+
- Fixed [#1078](https://github.com/LykosAI/StabilityMatrix/issues/1078) - "Call from invalid thread" error after one-click install finishes
67+
- Fixed [#1080](https://github.com/LykosAI/StabilityMatrix/issues/1080) - Some models not displayed in Checkpoint Manager
68+
### Supporters
69+
#### Visionaries
70+
- Many thanks to our incredible Visionary-tier Patreon supporters, **Waterclouds** and **TheTekknician**! Your support helps us continue to improve Stability Matrix!
71+
72+
>>>>>>> ef90eb2f (Merge pull request #984 from ionite34/blackwell-support)
873
## v2.13.4
974
### Changed
1075
- Upgraded ComfyUI CUDA torch to 12.6

StabilityMatrix.Core/Helper/HardwareInfo/GpuInfo.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ public bool IsNvidia
2727
}
2828
}
2929

30+
public bool IsBlackwellGpu()
31+
{
32+
if (Name is null)
33+
return false;
34+
35+
return IsNvidia
36+
&& Name.Contains("RTX 50", StringComparison.OrdinalIgnoreCase)
37+
&& !Name.Contains("RTX 5000", StringComparison.OrdinalIgnoreCase);
38+
}
39+
3040
public bool IsAmd => Name?.Contains("amd", StringComparison.OrdinalIgnoreCase) ?? false;
3141
public bool IsIntel => Name?.Contains("arc", StringComparison.OrdinalIgnoreCase) ?? false;
3242

StabilityMatrix.Core/Helper/HardwareInfo/HardwareHelper.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,17 @@ public static bool HasNvidiaGpu()
250250
return IterGpuInfo().Any(gpu => gpu.IsNvidia);
251251
}
252252

253+
public static bool HasBlackwellGpu()
254+
{
255+
return IterGpuInfo()
256+
.Any(
257+
gpu =>
258+
gpu is { IsNvidia: true, Name: not null }
259+
&& gpu.Name.Contains("RTX 50", StringComparison.OrdinalIgnoreCase)
260+
&& !gpu.Name.Contains("RTX 5000", StringComparison.OrdinalIgnoreCase)
261+
);
262+
}
263+
253264
/// <summary>
254265
/// Return true if the system has at least one AMD GPU.
255266
/// </summary>

StabilityMatrix.Core/Models/Packages/ComfyUI.cs

Lines changed: 42 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -207,36 +207,52 @@ public override async Task InstallPackage(
207207

208208
var pipArgs = new PipInstallArgs();
209209

210-
pipArgs = torchVersion switch
210+
var isBlackwell =
211+
SettingsManager.Settings.PreferredGpu?.IsBlackwellGpu() ?? HardwareHelper.HasBlackwellGpu();
212+
213+
if (isBlackwell)
211214
{
212-
TorchIndex.DirectMl => pipArgs.WithTorchDirectML(),
213-
_
214-
=> pipArgs
215-
.AddArg("--upgrade")
216-
.WithTorch()
217-
.WithTorchVision()
218-
.WithTorchExtraIndex(
219-
torchVersion switch
220-
{
221-
TorchIndex.Cpu => "cpu",
222-
TorchIndex.Cuda => "cu126",
223-
TorchIndex.Rocm => "rocm6.2.4",
224-
TorchIndex.Mps => "cpu",
225-
_
226-
=> throw new ArgumentOutOfRangeException(
227-
nameof(torchVersion),
228-
torchVersion,
229-
null
230-
)
231-
}
232-
)
233-
};
215+
pipArgs = pipArgs
216+
.AddArg(
217+
"https://huggingface.co/w-e-w/torch-2.6.0-cu128.nv/resolve/main/torch-2.6.0%2Bcu128.nv-cp310-cp310-win_amd64.whl"
218+
)
219+
.AddArg(
220+
"https://huggingface.co/w-e-w/torch-2.6.0-cu128.nv/resolve/main/torchvision-0.20.0a0%2Bcu128.nv-cp310-cp310-win_amd64.whl"
221+
);
222+
}
223+
else
224+
{
225+
pipArgs = torchVersion switch
226+
{
227+
TorchIndex.DirectMl => pipArgs.WithTorchDirectML(),
228+
_
229+
=> pipArgs
230+
.AddArg("--upgrade")
231+
.WithTorch()
232+
.WithTorchVision()
233+
.WithTorchExtraIndex(
234+
torchVersion switch
235+
{
236+
TorchIndex.Cpu => "cpu",
237+
TorchIndex.Cuda => "cu126",
238+
TorchIndex.Rocm => "rocm6.2.4",
239+
TorchIndex.Mps => "cpu",
240+
_
241+
=> throw new ArgumentOutOfRangeException(
242+
nameof(torchVersion),
243+
torchVersion,
244+
null
245+
)
246+
}
247+
)
248+
};
249+
}
234250

235251
var requirements = new FilePath(installLocation, "requirements.txt");
236252

237253
pipArgs = pipArgs.WithParsedFromRequirementsTxt(
238254
await requirements.ReadAllTextAsync(cancellationToken).ConfigureAwait(false),
239-
excludePattern: "torch$|numpy"
255+
excludePattern: isBlackwell ? "torch$|torchvision$|numpy" : "torch$|numpy"
240256
);
241257

242258
// https://github.com/comfyanonymous/ComfyUI/pull/4121
@@ -385,7 +401,7 @@ private async Task SetupModelFoldersConfig(DirectoryPath installDirectory)
385401
nodeValue.Children["ultralytics_bbox"] = Path.Combine(modelsDir, "Ultralytics", "bbox");
386402
nodeValue.Children["ultralytics_segm"] = Path.Combine(modelsDir, "Ultralytics", "segm");
387403
nodeValue.Children["sams"] = Path.Combine(modelsDir, "Sams");
388-
nodeValue.Children["diffusion_models"] = Path.Combine(modelsDir, "unet");
404+
nodeValue.Children["diffusion_models"] = Path.Combine(modelsDir, "Unet");
389405
}
390406
else
391407
{
@@ -429,7 +445,7 @@ private async Task SetupModelFoldersConfig(DirectoryPath installDirectory)
429445
{ "ultralytics_bbox", Path.Combine(modelsDir, "Ultralytics", "bbox") },
430446
{ "ultralytics_segm", Path.Combine(modelsDir, "Ultralytics", "segm") },
431447
{ "sams", Path.Combine(modelsDir, "Sams") },
432-
{ "diffusion_models", Path.Combine(modelsDir, "unet") }
448+
{ "diffusion_models", Path.Combine(modelsDir, "Unet") }
433449
}
434450
);
435451
}

0 commit comments

Comments
 (0)