Multi-Platform Package Manager for Stable Diffusion
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
826 B

using System;
using StabilityMatrix.Avalonia.ViewModels.Inference;
namespace StabilityMatrix.Avalonia.Models;
public enum InferenceProjectType
{
Unknown,
TextToImage,
ImageToImage,
Inpainting,
Upscale
}
public static class InferenceProjectTypeExtensions
{
public static Type? ToViewModelType(this InferenceProjectType type)
{
return type switch
{
InferenceProjectType.TextToImage => typeof(InferenceTextToImageViewModel),
InferenceProjectType.ImageToImage => null,
InferenceProjectType.Inpainting => null,
InferenceProjectType.Upscale => typeof(InferenceImageUpscaleViewModel),
InferenceProjectType.Unknown => null,
_ => throw new ArgumentOutOfRangeException(nameof(type), type, null)
};
}
}