Skip to content
Merged
Changes from 4 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
69 changes: 68 additions & 1 deletion StabilityMatrix.Core/Models/Packages/ComfyZluda.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,75 @@ IPyInstallationManager pyInstallationManager
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 = base.LaunchOptions;

// Update Cross Attention Method default
var crossAttentionIndex = options.FindIndex(o => o.Name == "Cross Attention Method");
if (crossAttentionIndex != -1)
{
options[crossAttentionIndex] = options[crossAttentionIndex] with
{
InitialValue = "--use-quad-cross-attention",
};
}

// Add new options before Extras (which is usually last)
var extrasIndex = options.FindIndex(o => o.Name == "Extra Launch Arguments");
var insertIndex = extrasIndex != -1 ? extrasIndex : options.Count;

options.Insert(
insertIndex,
new LaunchOptionDefinition
{
Name = "Disable Async Offload",
Type = LaunchOptionType.Bool,
InitialValue = true,
Options = ["--disable-async-offload"],
}
);

options.Insert(
insertIndex + 1,
new LaunchOptionDefinition
{
Name = "Disable Pinned Memory",
Type = LaunchOptionType.Bool,
InitialValue = true,
Options = ["--disable-pinned-memory"],
}
);
options.Insert(
insertIndex + 2,
new LaunchOptionDefinition
{
Name = "Disable Smart Memory",
Type = LaunchOptionType.Bool,
InitialValue = false,
Options = ["--disable-smart-memory"],
}
);
options.Insert(
insertIndex + 3,
new LaunchOptionDefinition
{
Name = "Disable Model/Node Caching",
Type = LaunchOptionType.Bool,
InitialValue = false,
Options = ["--cache-none"],
}
);

return options;
}
}

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

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