Skip to content
Merged
Changes from 6 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
63 changes: 62 additions & 1 deletion StabilityMatrix.Core/Models/Packages/ComfyZluda.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
using System.Diagnostics;
using System.Diagnostics;

Check warning on line 2 in StabilityMatrix.Core/Models/Packages/ComfyZluda.cs

View workflow job for this annotation

GitHub Actions / build

The using directive for 'System.Diagnostics' appeared previously in this namespace
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This using statement is a duplicate. There are other duplicates on line 4 for System.Text.RegularExpressions and line 6 for Injectio.Attributes. Please remove all redundant using statements to improve code clarity.

using System.Text.RegularExpressions;
using System.Text.RegularExpressions;

Check warning on line 4 in StabilityMatrix.Core/Models/Packages/ComfyZluda.cs

View workflow job for this annotation

GitHub Actions / build

The using directive for 'System.Text.RegularExpressions' appeared previously in this namespace
using Injectio.Attributes;
using Injectio.Attributes;

Check warning on line 6 in StabilityMatrix.Core/Models/Packages/ComfyZluda.cs

View workflow job for this annotation

GitHub Actions / build

The using directive for 'Injectio.Attributes' appeared previously in this namespace
using StabilityMatrix.Core.Exceptions;
using StabilityMatrix.Core.Extensions;
using StabilityMatrix.Core.Helper;
using StabilityMatrix.Core.Helper.Cache;
using StabilityMatrix.Core.Helper.HardwareInfo;
using StabilityMatrix.Core.Models;
using StabilityMatrix.Core.Models.FileInterfaces;
using StabilityMatrix.Core.Models.Progress;
using StabilityMatrix.Core.Processes;
Expand Down Expand Up @@ -40,8 +44,65 @@
public override string Disclaimer =>
"Prerequisite install may require admin privileges and a reboot. "
+ "Visual Studio Build Tools for C++ Desktop Development will be installed automatically. "
+ "AMD GPUs under the RX 6800 may require additional manual setup.";
+ "AMD GPUs under the RX 6800 may require additional manual setup. ";
public override string LaunchCommand => Path.Combine("zluda", "zluda.exe");

public override List<LaunchOptionDefinition> LaunchOptions
{
get
{
var options = new List<LaunchOptionDefinition>
{
new()
{
Name = "Cross Attention Method",
Type = LaunchOptionType.Bool,
InitialValue = "--use-quad-cross-attention",
Options =
[
"--use-split-cross-attention",
"--use-quad-cross-attention",
"--use-pytorch-cross-attention",
"--use-sage-attention",
],
},
new()
{
Name = "Disable Async Offload",
Type = LaunchOptionType.Bool,
InitialValue = true,
Options = ["--disable-async-offload"],
},
new()
{
Name = "Disable Pinned Memory",
Type = LaunchOptionType.Bool,
InitialValue = true,
Options = ["--disable-pinned-memory"],
},
new()
{
Name = "Disable Smart Memory",
Type = LaunchOptionType.Bool,
InitialValue = false,
Options = ["--disable-smart-memory"],
},
new()
{
Name = "Disable Model/Node Caching",
Type = LaunchOptionType.Bool,
InitialValue = false,
Options = ["--cache-none"],
},
};

options.AddRange(
base.LaunchOptions.Except(base.LaunchOptions.Where(x => x.Name == "Cross Attention Method"))
);
return options;
}
}

public override IEnumerable<TorchIndex> AvailableTorchIndices => [TorchIndex.Zluda];

public override TorchIndex GetRecommendedTorchVersion() => TorchIndex.Zluda;
Expand Down
Loading