import { Computed, Dict, Schema, Session } from 'koishi'; import { Size } from './utils'; export declare const modelMap: { readonly safe: "safe-diffusion"; readonly nai: "nai-diffusion"; readonly furry: "nai-diffusion-furry"; }; export declare const orientMap: { readonly landscape: { readonly height: 512; readonly width: 768; }; readonly portrait: { readonly height: 768; readonly width: 512; }; readonly square: { readonly height: 640; readonly width: 640; }; }; export declare const hordeModels: string[]; type Model = keyof typeof modelMap; type Orient = keyof typeof orientMap; export declare const models: ("safe" | "nai" | "furry")[]; export declare const orients: ("landscape" | "portrait" | "square")[]; export declare namespace sampler { const nai: { k_euler_a: string; k_euler: string; k_lms: string; ddim: string; plms: string; }; const sd: { k_euler_a: string; k_euler: string; k_lms: string; k_heun: string; k_dpm_2: string; k_dpm_2_a: string; k_dpmpp_2s_a: string; k_dpmpp_2m: string; k_dpmpp_sde: string; k_dpmpp_2m_sde: string; k_dpm_fast: string; k_dpm_ad: string; k_lms_ka: string; k_dpm_2_ka: string; k_dpm_2_a_ka: string; k_dpmpp_2s_a_ka: string; k_dpmpp_2m_ka: string; k_dpmpp_sde_ka: string; k_dpmpp_2m_sde_ka: string; ddim: string; plms: string; unipc: string; }; const horde: { k_lms: string; k_heun: string; k_euler: string; k_euler_a: string; k_dpm_2: string; k_dpm_2_a: string; k_dpm_fast: string; k_dpm_adaptive: string; k_dpmpp_2m: string; k_dpmpp_2s_a: string; k_dpmpp_sde: string; DDIM: string; k_lms_ka: string; k_heun_ka: string; k_euler_ka: string; k_euler_a_ka: string; k_dpm_2_ka: string; k_dpm_2_a_ka: string; k_dpm_fast_ka: string; k_dpm_adaptive_ka: string; k_dpmpp_2m_ka: string; k_dpmpp_2s_a_ka: string; k_dpmpp_sde_ka: string; DDIM_ka: string; }; function createSchema(map: Dict): Schema; function sd2nai(sampler: string): string; } export declare const upscalers: readonly ["None", "Lanczos", "Nearest", "LDSR", "ESRGAN_4x", "R-ESRGAN General 4xV3", "R-ESRGAN General WDN 4xV3", "R-ESRGAN AnimeVideo", "R-ESRGAN 4x+", "R-ESRGAN 4x+ Anime6B", "R-ESRGAN 2x+", "ScuNET GAN", "ScuNET PSNR", "SwinIR 4x"]; export interface Options { enhance: boolean; model: string; resolution: Size; sampler: string; seed: string; steps: number; scale: number; noise: number; strength: number; } export interface PromptConfig { basePrompt?: Computed; negativePrompt?: Computed; forbidden?: Computed; defaultPromptSw?: boolean; defaultPrompt?: Computed; placement?: Computed<'before' | 'after'>; latinOnly?: Computed; translator?: boolean; maxWords?: Computed; } export declare const PromptConfig: Schema; interface FeatureConfig { anlas?: Computed; text?: Computed; image?: Computed; upscale?: Computed; } export interface RemoteStorageApiConfig { api_type?: 'baidu-bos' | 'ali-oss' | 'qiniu-oss'; api_key?: string; api_secret?: string; bucket?: string; endpoint?: string; prefix_path?: string; } interface ParamConfig { model?: Model; sampler?: string; upscaler?: string; restoreFaces?: boolean; hiresFix?: boolean; scale?: Computed; textSteps?: Computed; imageSteps?: Computed; maxSteps?: Computed; strength?: Computed; resolution?: Computed; maxResolution?: Computed; } export interface Config extends PromptConfig, ParamConfig { type: 'token' | 'login' | 'naifu' | 'sd-webui' | 'stable-horde'; token?: string; email?: string; password?: string; authLv?: Computed; authLvDefault?: Computed; output?: Computed<'minimal' | 'default' | 'verbose'>; features?: FeatureConfig; endpoint?: string; headers?: Dict; nsfw?: Computed<'disallow' | 'censor' | 'allow'>; maxIterations?: number; maxRetryCount?: number; requestTimeout?: number; recallTimeout?: number; maxConcurrency?: number; pollInterval?: number; trustedWorkers?: boolean; remoteImages?: boolean; remoteImagePrefix?: string; remoteStoreType?: string; remoteStorageConfig?: RemoteStorageApiConfig; } export declare const Config: Schema; interface Forbidden { pattern: string; strict: boolean; } export declare function parseForbidden(input: string): Forbidden[]; export declare function parseInput(session: Session, input: string, config: Config, override: boolean, addDefault: boolean): string[]; export {};