LykosAI/StabilityMatrix · error · InvalidOperationException

Installed package path is not available.

Error message

Installed package path is not available.

What it means

InstallWindowsRocmPackageCommandStep.ExecuteAsync throws this InvalidOperationException when the InstalledPackage supplied to the step has a null FullPath. The step needs the package's install directory to resolve the venv and Python version it will patch with Windows ROCm components. Without a FullPath the step cannot proceed, so it fails fast with a clear message.

Solutions

  1. Ensure the package is fully installed and its FullPath is set (check the package record in the ComfyPackageManager / shared_db) before queuing this step.
  2. Reinstall or re-add the package so the install directory is re-registered, then retry the ROCm command.
  3. Before executing, guard: if (step.InstalledPackage.FullPath is null) { /* repair or abort */ }
  4. If constructing the step manually, pass the actual installed package directory rather than a placeholder InstalledPackage.

Example fix

// before
var step = new InstallWindowsRocmPackageCommandStep(...) { InstalledPackage = partialPackage, ... };
await step.ExecuteAsync(progress);
// after
if (partialPackage.FullPath is null)
    throw new InvalidOperationException("Package must be installed before running ROCm steps.");
await step.ExecuteAsync(progress);
Defensive patterns

Strategy: validation

Validate before calling

if (installedPackage?.FullPath is null)
    throw new InvalidOperationException("Package must be fully installed (FullPath set) before running Windows ROCm steps.");

Type guard

bool CanRunRocmStep(InstalledPackage p) => !string.IsNullOrEmpty(p?.FullPath);

Try / catch

try
{
    await step.ExecuteAsync(progress);
}
catch (InvalidOperationException ex) when (ex.Message == "Installed package path is not available.")
{
    // repair/reinstall package, then requeue
}

Prevention

When it happens

Trigger: Constructing the step with InstalledPackage whose FullPath property is null (e.g. a package record that was never fully installed/registered, or a deserialized/stub InstalledPackage) and calling ExecuteAsync on Windows.

Common situations: Running a ROCm one-click install step against a package entry that failed mid-install, was imported from a corrupted shared_db record, or was constructed manually without setting the install path; also happens if package paths point to drives that were removed and the app nulls the path.

Related errors


AI-assisted analysis of LykosAI/StabilityMatrix@af93d6ef57 (2026-09-12). Data as JSON: /api/errors/7a7abebd7662feba. Report an issue: GitHub.

Appendix: source

Thrown at StabilityMatrix.Core/Models/PackageModification/InstallWindowsRocmPackageCommandStep.cs:71

            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")
        {
            pyVersion = PyInstallationManager.Python_3_10_11;
        }

        var baseInstall = !string.IsNullOrWhiteSpace(InstalledPackage.PythonVersion)
            ? new PyBaseInstall(
                await pyInstallationManager.GetInstallationAsync(pyVersion).ConfigureAwait(false)
            )

View on GitHub (pinned to af93d6ef57)