using System; using System.Collections.Generic; using System.Threading.Tasks; using CommunityToolkit.Mvvm.ComponentModel; using DynamicData.Binding; using StabilityMatrix.Avalonia.Services; using StabilityMatrix.Core.Inference; using StabilityMatrix.Core.Models; using StabilityMatrix.Core.Models.Api.Comfy; namespace StabilityMatrix.Avalonia.DesignData; public class MockInferenceClientManager : ObservableObject, IInferenceClientManager { public ComfyClient? Client { get; set; } public IObservableCollection Models { get; } = new ObservableCollectionExtended(); public IObservableCollection VaeModels { get; } = new ObservableCollectionExtended(); public IObservableCollection Samplers { get; } = new ObservableCollectionExtended(ComfySampler.Defaults); public IObservableCollection Upscalers { get; } = new ObservableCollectionExtended( new ComfyUpscaler[] { new("nearest-exact", ComfyUpscalerType.Latent), new("bicubic", ComfyUpscalerType.Latent), new("ESRGAN-4x", ComfyUpscalerType.ESRGAN) } ); public IObservableCollection Schedulers { get; } = new ObservableCollectionExtended(ComfyScheduler.Defaults); public bool IsConnected { get; set; } public Task ConnectAsync() { return Task.CompletedTask; } /// public Task ConnectAsync(PackagePair packagePair) { return Task.CompletedTask; } public Task CloseAsync() { return Task.CompletedTask; } public void Dispose() { GC.SuppressFinalize(this); } }