""" Options: Date: 2025-01-08 03:04:03 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: datetime,decimal,marshmallow.fields:*,servicestack:*,typing:*,dataclasses:dataclass/field,dataclasses_json:dataclass_json/LetterCase/Undefined/config,enum:Enum/IntEnum #DataClass: #DataClassJson: """ import datetime import decimal from marshmallow.fields import * from servicestack import * from typing import * from dataclasses import dataclass, field from dataclasses_json import dataclass_json, LetterCase, Undefined, config from enum import Enum, IntEnum class ComfySampler(str, Enum): EULER = 'euler' EULER_CFG_PP = 'euler_cfg_pp' EULER_ANCESTRAL = 'euler_ancestral' EULER_ANCESTRAL_CFG_PP = 'euler_ancestral_cfg_pp' HUEN = 'huen' HUENPP2 = 'huenpp2' DPM_2 = 'dpm_2' DPM_2_ANCESTRAL = 'dpm_2_ancestral' LMS = 'lms' DPM_FAST = 'dpm_fast' DPM_ADAPTIVE = 'dpm_adaptive' DPMPP_2S_ANCESTRAL = 'dpmpp_2s_ancestral' DPMPP_SDE = 'dpmpp_sde' DPMPP_SDE_GPU = 'dpmpp_sde_gpu' DPMPP_2M = 'dpmpp_2m' DPMPP_2M_SDE = 'dpmpp_2m_sde' DPMPP_2M_SDE_GPU = 'dpmpp_2m_sde_gpu' DPMPP_3M_SDE = 'dpmpp_3m_sde' DPMPP_3M_SDE_GPU = 'dpmpp_3m_sde_gpu' DDPM = 'ddpm' LCM = 'lcm' DDIM = 'ddim' UNI_PC = 'uni_pc' UNI_PC_BH2 = 'uni_pc_bh2' class ModelType(str, Enum): TEXT_TO_IMAGE = 'TextToImage' TEXT_ENCODER = 'TextEncoder' IMAGE_UPSCALE = 'ImageUpscale' TEXT_TO_SPEECH = 'TextToSpeech' TEXT_TO_AUDIO = 'TextToAudio' SPEECH_TO_TEXT = 'SpeechToText' IMAGE_TO_TEXT = 'ImageToText' IMAGE_TO_IMAGE = 'ImageToImage' IMAGE_WITH_MASK = 'ImageWithMask' VAE = 'VAE' @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ProviderModelDefaults: id: Optional[str] = None api_models: Dict[str, str] = field(default_factory=dict) url: Optional[str] = None quality: Optional[float] = None aspect_ratio: Optional[str] = None cfg_scale: Optional[float] = None scheduler: Optional[str] = None sampler: Optional[ComfySampler] = None width: Optional[int] = None height: Optional[int] = None steps: Optional[int] = None negative_prompt: Optional[str] = None model_type: Optional[ModelType] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class QueryGenerationModelSettings(QueryDb[ProviderModelDefaults], IReturn[QueryResponse[ProviderModelDefaults]]): id: Optional[str] = None