LykosAI/StabilityMatrix · error · NotSupportedException

Project was created in an earlier pre-release version of…

Error message

Project was created in an earlier pre-release version of Stability Matrix and is no longer supported. Please create a new project.

What it means

InferenceProjectDocument.VerifyVersion() rejects project documents whose Version field is below 2. Such documents were written by pre-release builds of Stability Matrix whose layout is no longer readable, so the library throws NotSupportedException instead of attempting a risky migration.

Solutions

  1. Recreate the project in the current version of Stability Matrix.
  2. If the old data matters, open it in a matching legacy pre-release build and re-save/export assets manually.
  3. Catch NotSupportedException around VerifyVersion/Load and offer the user a 'create new project' flow.
  4. Migrate by rebuilding the workflow nodes from a screenshot or exported image of the old graph.

Example fix

// before
projectDoc.VerifyVersion(); // throws for Version < 2
// after
try
{
    projectDoc.VerifyVersion();
}
catch (NotSupportedException)
{
    promptUserToCreateNewProject();
}
Defensive patterns

Strategy: try-catch

Validate before calling

if (projectDoc.Version < 2)
    ShowLegacyProjectDialog(); // offer re-creation before calling VerifyVersion

Type guard

bool IsSupported(InferenceProjectDocument d) => d.Version >= 2;

Try / catch

try { doc.VerifyVersion(); }
catch (NotSupportedException)
{
    Dialog.Show("This project predates supported versions. Please create a new project.");
}

Prevention

When it happens

Trigger: Loading an inference project file (.smp) saved by an early pre-release version and calling VerifyVersion() on it.

Common situations: Opening old projects from before a stable release after upgrading the app; importing project archives created during alpha/beta testing; files with a missing or defaulted Version field (older serializers wrote nothing).

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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

Appendix: source

Thrown at StabilityMatrix.Avalonia/Models/InferenceProjectDocument.cs:49

            ProjectType = loadableModel switch
            {
                InferenceImageToImageViewModel => InferenceProjectType.ImageToImage,
                InferenceTextToImageViewModel => InferenceProjectType.TextToImage,
                InferenceImageUpscaleViewModel => InferenceProjectType.Upscale,
                InferenceImageToVideoViewModel => InferenceProjectType.ImageToVideo,
                InferenceFluxTextToImageViewModel => InferenceProjectType.FluxTextToImage,
                InferenceWanImageToVideoViewModel => InferenceProjectType.WanImageToVideo,
                InferenceWanTextToVideoViewModel => InferenceProjectType.WanTextToVideo
            },
            State = loadableModel.SaveStateToJsonObject()
        };
    }

    public void VerifyVersion()
    {
        if (Version < 2)
        {
            throw new NotSupportedException(
                $"Project was created in an earlier pre-release version of Stability Matrix and is no longer supported. "
                    + $"Please create a new project."
            );
        }
    }

    public SeedCardModel? GetSeedModel()
    {
        if (State is null || !State.TryGetPropertyValue("Seed", out var seedCard))
        {
            return null;
        }

        return seedCard.Deserialize<SeedCardModel>();
    }

    /// <summary>
    /// Returns a new <see cref="InferenceProjectDocument"/> with the State modified.

View on GitHub (pinned to af93d6ef57)