UNPKG

@ldavis9000aws/swarmui-generator

Version:

A Model Context Protocol server for SwarmUI image generation with TypeScript

91 lines (90 loc) 2.54 kB
/** * Type definitions for the SwarmUI MCP Server */ /** * Interface for image generation options */ export interface ImageGenerationOptions { /** Negative prompt - what to avoid in the image */ negativePrompt?: string; /** Image width in pixels */ width?: number; /** Image height in pixels */ height?: number; /** How closely to follow the prompt (higher = more adherence) */ cfgScale?: number; /** Number of denoising steps (more = higher quality but slower) */ steps?: number; /** Random seed for reproducible results (-1 for random) */ seed?: number; /** Model to use for generation */ model?: string; /** Scheduler algorithm to use */ scheduler?: string; /** Number of images to generate in a batch */ batchSize?: number; } /** * Interface for model information */ export interface ModelInfo { /** Model name/identifier */ Name: string; /** Human readable model name */ FormattedName?: string; /** Model description */ Description?: string; /** Default width for this model */ DefaultWidth?: number; /** Default height for this model */ DefaultHeight?: number; /** Whether the model is currently active */ IsActive?: boolean; /** Filesystem path of the model, if available */ Path?: string; } /** * Interface for scheduler information */ export interface SchedulerInfo { /** Scheduler name/identifier */ Name: string; /** Human readable scheduler name */ FormattedName?: string; /** Scheduler description */ Description?: string; } /** * Interface for engine status */ export interface EngineStatus { /** Current model load state */ ModelLoadState?: string; /** Name of the currently loaded model */ ModelName?: string; /** Whether the engine is currently generating */ IsGenerating?: boolean; /** Current prompt being processed */ CurrentPrompt?: string; /** Number of jobs in queue */ QueueLength?: number; /** Progress of current generation (0-1) */ Progress?: number; /** Estimated time remaining in seconds */ ETA?: number; /** Names of running backend services */ RunningBackends?: string[]; } /** * Interface for image generation response */ export interface ImageGenerationResponse { /** Array of image paths */ images?: string[]; /** Success status */ success?: boolean; /** Error message if failed */ error?: string; /** Error ID if applicable */ error_id?: string; }