server_config.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef SERVER_CONFIG_H
  2. #define SERVER_CONFIG_H
  3. #include <string>
  4. // Server configuration structure
  5. struct ServerConfig {
  6. // Server settings
  7. std::string host = "0.0.0.0";
  8. int port = 8080;
  9. int maxConcurrentGenerations = 1;
  10. bool verbose = false;
  11. // Required directory parameter
  12. std::string modelsDir = ""; // Base models directory (required, must be set via --models-dir)
  13. // Model type directory parameters
  14. // All default to standard folder names under modelsDir if not explicitly set
  15. std::string checkpoints = ""; // Checkpoints directory (default: checkpoints)
  16. std::string controlnetDir = ""; // ControlNet directory (default: controlnet)
  17. std::string embeddingsDir = ""; // Embeddings directory (default: embeddings)
  18. std::string esrganDir = ""; // ESRGAN directory (default: ESRGAN)
  19. std::string loraDir = ""; // LoRA directory (default: loras)
  20. std::string taesdDir = ""; // TAESD directory (default: TAESD)
  21. std::string vaeDir = ""; // VAE directory (default: vae)
  22. // Queue and output directories
  23. std::string queueDir = "./queue"; // Directory to store queue job files
  24. std::string outputDir = "./output"; // Directory to store generated images/videos
  25. // UI directory (optional - for serving static web UI)
  26. std::string uiDir = ""; // Directory containing static web UI files
  27. // Legacy mode flag (always false now - kept for backward compatibility)
  28. bool legacyMode = false;
  29. // Logging options
  30. bool enableFileLogging = false;
  31. std::string logFilePath = "/var/log/stable-diffusion-rest/server.log";
  32. };
  33. #endif // SERVER_CONFIG_H