using System; using StabilityMatrix.Avalonia.Services; using StabilityMatrix.Avalonia.ViewModels.Base; using StabilityMatrix.Avalonia.ViewModels.Inference; using StabilityMatrix.Core.Models.Base; namespace StabilityMatrix.Avalonia.Models.Inference; public record EditableModule : StringValue { public static readonly EditableModule FreeU = new( "FreeU", builder => builder.Get(vm => { vm.Title = "FreeU"; vm.AddCards(builder.Get()); }) ); public static readonly EditableModule HiresFix = new( "HiresFix", builder => builder.Get(vm => { vm.Title = "HiresFix"; vm.AddCards( builder.Get(), builder.Get(vmSampler => { vmSampler.IsDenoiseStrengthEnabled = true; }) ); }) ); public static readonly EditableModule Upscaler = new( "Upscaler", builder => builder.Get(vm => { vm.Title = "Upscaler"; vm.AddCards(builder.Get()); }) ); public Func, ViewModelBase> Build { get; } private EditableModule(string value, Func, ViewModelBase> build) : base(value) { Build = build; } }