/* Options: Date: 2025-01-08 03:24:10 Version: 8.53 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazordiffusion.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: QueryGenerationModelSettings.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; enum ComfySampler { euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, huen, huenpp2, dpm_2, dpm_2_ancestral, lms, dpm_fast, dpm_adaptive, dpmpp_2s_ancestral, dpmpp_sde, dpmpp_sde_gpu, dpmpp_2m, dpmpp_2m_sde, dpmpp_2m_sde_gpu, dpmpp_3m_sde, dpmpp_3m_sde_gpu, ddpm, lcm, ddim, uni_pc, uni_pc_bh2, } enum ModelType { TextToImage, TextEncoder, ImageUpscale, TextToSpeech, TextToAudio, SpeechToText, ImageToText, ImageToImage, ImageWithMask, VAE, } class ProviderModelDefaults implements IConvertible { String? id; Map? apiModels = {}; String? url; double? quality; String? aspectRatio; double? cfgScale; String? scheduler; ComfySampler? sampler; int? width; int? height; int? steps; String? negativePrompt; ModelType? modelType; ProviderModelDefaults({this.id,this.apiModels,this.url,this.quality,this.aspectRatio,this.cfgScale,this.scheduler,this.sampler,this.width,this.height,this.steps,this.negativePrompt,this.modelType}); ProviderModelDefaults.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; apiModels = JsonConverters.toStringMap(json['apiModels']); url = json['url']; quality = JsonConverters.toDouble(json['quality']); aspectRatio = json['aspectRatio']; cfgScale = JsonConverters.toDouble(json['cfgScale']); scheduler = json['scheduler']; sampler = JsonConverters.fromJson(json['sampler'],'ComfySampler',context!); width = json['width']; height = json['height']; steps = json['steps']; negativePrompt = json['negativePrompt']; modelType = JsonConverters.fromJson(json['modelType'],'ModelType',context!); return this; } Map toJson() => { 'id': id, 'apiModels': apiModels, 'url': url, 'quality': quality, 'aspectRatio': aspectRatio, 'cfgScale': cfgScale, 'scheduler': scheduler, 'sampler': JsonConverters.toJson(sampler,'ComfySampler',context!), 'width': width, 'height': height, 'steps': steps, 'negativePrompt': negativePrompt, 'modelType': JsonConverters.toJson(modelType,'ModelType',context!) }; getTypeName() => "ProviderModelDefaults"; TypeContext? context = _ctx; } class QueryGenerationModelSettings extends QueryDb implements IReturn>, IConvertible, IGet { String? id; QueryGenerationModelSettings({this.id}); QueryGenerationModelSettings.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); id = json['id']; return this; } Map toJson() => super.toJson()..addAll({ 'id': id }); createResponse() => QueryResponse(); getResponseTypeName() => "QueryResponse"; getTypeName() => "QueryGenerationModelSettings"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'blazordiffusion.com', types: { 'ComfySampler': TypeInfo(TypeOf.Enum, enumValues:ComfySampler.values), 'ModelType': TypeInfo(TypeOf.Enum, enumValues:ModelType.values), 'ProviderModelDefaults': TypeInfo(TypeOf.Class, create:() => ProviderModelDefaults()), 'QueryResponse': TypeInfo(TypeOf.Class, create:() => QueryResponse()), 'QueryGenerationModelSettings': TypeInfo(TypeOf.Class, create:() => QueryGenerationModelSettings()), 'List': TypeInfo(TypeOf.Class, create:() => []), });