Skip to content

Commit 895b247

Browse files
authored
Merge pull request LykosAI#1521 from NeuralFault/CUI-Zluda-launch-fix
Update/Fix: ComfyUI-Zluda
2 parents 33cea37 + 3a1e9b4 commit 895b247

2 files changed

Lines changed: 60 additions & 5 deletions

File tree

StabilityMatrix.Core/Models/Packages/AiToolkit.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ IPyInstallationManager pyInstallationManager
3535
public override string LicenseUrl => "https://github.com/ostris/ai-toolkit/blob/main/LICENSE";
3636
public override string LaunchCommand => string.Empty;
3737

38-
public override Uri PreviewImageUri =>
39-
new(
40-
"https://camo.githubusercontent.com/ea35b399e0d659f9f2ee09cbedb58e1a3ec7a0eab763e8ae8d11d076aad5be40/68747470733a2f2f6f73747269732e636f6d2f77702d636f6e74656e742f75706c6f6164732f323032352f30322f746f6f6c6b69742d75692e6a7067"
41-
);
38+
public override Uri PreviewImageUri => new("https://cdn.lykos.ai/sm/packages/aitoolkit/preview.webp");
4239

4340
public override string OutputFolderName => "output";
4441
public override IEnumerable<TorchIndex> AvailableTorchIndices => [TorchIndex.Cuda];

StabilityMatrix.Core/Models/Packages/ComfyZluda.cs

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using StabilityMatrix.Core.Helper;
77
using StabilityMatrix.Core.Helper.Cache;
88
using StabilityMatrix.Core.Helper.HardwareInfo;
9+
using StabilityMatrix.Core.Models;
910
using StabilityMatrix.Core.Models.FileInterfaces;
1011
using StabilityMatrix.Core.Models.Progress;
1112
using StabilityMatrix.Core.Processes;
@@ -40,8 +41,65 @@ IPyInstallationManager pyInstallationManager
4041
public override string Disclaimer =>
4142
"Prerequisite install may require admin privileges and a reboot. "
4243
+ "Visual Studio Build Tools for C++ Desktop Development will be installed automatically. "
43-
+ "AMD GPUs under the RX 6800 may require additional manual setup.";
44+
+ "AMD GPUs under the RX 6800 may require additional manual setup. ";
4445
public override string LaunchCommand => Path.Combine("zluda", "zluda.exe");
46+
47+
public override List<LaunchOptionDefinition> LaunchOptions
48+
{
49+
get
50+
{
51+
var options = new List<LaunchOptionDefinition>
52+
{
53+
new()
54+
{
55+
Name = "Cross Attention Method",
56+
Type = LaunchOptionType.Bool,
57+
InitialValue = "--use-quad-cross-attention",
58+
Options =
59+
[
60+
"--use-split-cross-attention",
61+
"--use-quad-cross-attention",
62+
"--use-pytorch-cross-attention",
63+
"--use-sage-attention",
64+
],
65+
},
66+
new()
67+
{
68+
Name = "Disable Async Offload",
69+
Type = LaunchOptionType.Bool,
70+
InitialValue = true,
71+
Options = ["--disable-async-offload"],
72+
},
73+
new()
74+
{
75+
Name = "Disable Pinned Memory",
76+
Type = LaunchOptionType.Bool,
77+
InitialValue = true,
78+
Options = ["--disable-pinned-memory"],
79+
},
80+
new()
81+
{
82+
Name = "Disable Smart Memory",
83+
Type = LaunchOptionType.Bool,
84+
InitialValue = false,
85+
Options = ["--disable-smart-memory"],
86+
},
87+
new()
88+
{
89+
Name = "Disable Model/Node Caching",
90+
Type = LaunchOptionType.Bool,
91+
InitialValue = false,
92+
Options = ["--cache-none"],
93+
},
94+
};
95+
96+
options.AddRange(
97+
base.LaunchOptions.Where(x => x.Name != "Cross Attention Method")
98+
);
99+
return options;
100+
}
101+
}
102+
45103
public override IEnumerable<TorchIndex> AvailableTorchIndices => [TorchIndex.Zluda];
46104

47105
public override TorchIndex GetRecommendedTorchVersion() => TorchIndex.Zluda;

0 commit comments

Comments
 (0)