LykosAI/StabilityMatrix · error · PlatformNotSupportedException
Windows ROCm package commands are only supported on Windows.
Error message
Windows ROCm package commands are only supported on Windows.
What it means
InstallWindowsRocmPackageCommandStep.ExecuteAsync runs ROCm-related package commands that only exist on Windows; on other OSes it throws PlatformNotSupportedException before doing any work.
Solutions
- Run this package/command on Windows only
- Use the Linux-native ROCm install path instead of the Windows ROCm step
- Skip this step on non-Windows platforms in your install pipeline
Example fix
// before await rocmStep.ExecuteAsync(); // after if (OperatingSystem.IsWindows()) await rocmStep.ExecuteAsync(); else /* alternate path */
Defensive patterns
Strategy: type-guard
Validate before calling
if (!OperatingSystem.IsWindows()) skipWindowsRocmStep();
Type guard
bool CanRunWindowsRocmStep() => OperatingSystem.IsWindows();
Try / catch
try { await step.ExecuteAsync(progress); } catch (PlatformNotSupportedException) { /* use platform-appropriate ROCm path or skip */ } Prevention
- Only attach Windows ROCm command steps on Windows builds
- Route Linux ROCm users to the native install flow
- Check InstalledPackage.FullPath is set before running package command steps
When it happens
Trigger: Invoking ExecuteAsync on Linux/macOS for a package configured with Windows ROCm install commands.
Common situations: Shared package configs applied across platforms; users on Linux selecting a ROCm-enabled package variant meant for Windows.
Understand the failure class
Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.
Related errors
- Nunchaku is not supported on macOS or GPUs with compute…
- This method of installing Triton and SageAttention is only…
- Could not find Visual Studio 2022 Build Tools. Please…
- Could not find CUDA Toolkit. Please install version 12.6 or…
- Installed package path is not available.
AI-assisted analysis of LykosAI/StabilityMatrix@af93d6ef57 (2026-09-12).
Data as JSON: /api/errors/be5cb17c804b4ff8.
Report an issue: GitHub.
Appendix: source
Thrown at StabilityMatrix.Core/Models/PackageModification/InstallWindowsRocmPackageCommandStep.cs:64
public required DirectoryPath WorkingDirectory { get; init; }
public required WindowsRocmPackageCommandType CommandType { get; init; }
public IReadOnlyDictionary<string, string>? EnvironmentVariables { get; init; }
public string ProgressTitle =>
CommandType switch
{
WindowsRocmPackageCommandType.SageAttention => "Installing Windows ROCm SageAttention",
WindowsRocmPackageCommandType.DevelopmentSdk => "Installing Windows ROCm Development SDK",
WindowsRocmPackageCommandType.BitsAndBytes => "Installing Windows ROCm bitsandbytes",
WindowsRocmPackageCommandType.FlashAttention => "Installing Windows ROCm Flash Attention",
_ => "Running Windows ROCm package command",
};
public async Task ExecuteAsync(IProgress<ProgressReport>? progress = null)
{
if (!OperatingSystem.IsWindows())
{
throw new PlatformNotSupportedException(
"Windows ROCm package commands are only supported on Windows."
);
}
if (InstalledPackage.FullPath is null)
{
throw new InvalidOperationException("Installed package path is not available.");
}
var venvDir = WorkingDirectory.JoinDir("venv");
if (!venvDir.Exists)
{
throw new DirectoryNotFoundException($"ComfyUI venv was not found at '{venvDir.FullPath}'.");
}
var pyVersion = PyVersion.Parse(InstalledPackage.PythonVersion);
if (pyVersion.StringValue == "0.0.0")
{View on GitHub (pinned to af93d6ef57)