/** * Architecture Registry * * Central registry for all model architectures. Provides: * - Architecture registration * - Detection from checkpoint names * - Capability queries * - Model lookups (ControlNet, IP-Adapter, etc.) */ import type { ArchitectureId, ModelArchitecture, ArchitectureDetection, ControlNetType, IPAdapterConfig, ArchitectureDefaults } from "./types.js"; /** * The Architecture Registry manages all registered model architectures * and provides unified access to detection and model lookups. */ export declare class ArchitectureRegistry { private architectures; private sortedArchitectures; /** * Register a new architecture * @param arch The architecture definition to register */ register(arch: ModelArchitecture): void; /** * Rebuild the sorted list of architectures by priority */ private rebuildSortedList; /** * Detect the architecture from a checkpoint filename * @param checkpointName The checkpoint filename to analyze * @returns Detection result with architecture, confidence, and reason */ detect(checkpointName: string): ArchitectureDetection; /** * Get an architecture by ID * @param id The architecture ID * @returns The architecture or undefined if not found */ get(id: ArchitectureId): ModelArchitecture | undefined; /** * Get the default architecture (SDXL) * @returns The default architecture */ getDefault(): ModelArchitecture; /** * List all registered architectures * @returns Array of all registered architectures */ list(): ModelArchitecture[]; /** * Check if an architecture is registered * @param id The architecture ID to check * @returns True if registered */ has(id: ArchitectureId): boolean; /** * Get the ControlNet model for a given checkpoint and control type * @param checkpointName The checkpoint filename * @param controlType The type of ControlNet * @returns The ControlNet model filename, or null if not supported */ getControlNetModel(checkpointName: string, controlType: ControlNetType): string | null; /** * Get the IP-Adapter configuration for a given checkpoint * @param checkpointName The checkpoint filename * @returns The IP-Adapter config, or null if not supported */ getIPAdapterConfig(checkpointName: string): IPAdapterConfig | null; /** * Get the default generation parameters for a given checkpoint * @param checkpointName The checkpoint filename * @returns The default parameters for this architecture */ getDefaults(checkpointName: string): ArchitectureDefaults; /** * Check if a checkpoint supports negative prompts * @param checkpointName The checkpoint filename * @returns True if negative prompts are supported */ supportsNegativePrompt(checkpointName: string): boolean; /** * Check if a checkpoint supports weight syntax like (word:1.2) * @param checkpointName The checkpoint filename * @returns True if weight syntax is supported */ supportsWeightSyntax(checkpointName: string): boolean; } /** * Global singleton registry instance */ export declare const architectureRegistry: ArchitectureRegistry;