mirror of
https://github.com/GayPizzaSpecifications/stable-diffusion-rpc.git
synced 2025-08-04 05:51:32 +00:00
Formatting, linting, and hopefully a CI build.
This commit is contained in:
@ -1,17 +1,18 @@
|
||||
import Foundation
|
||||
import ArgumentParser
|
||||
import Foundation
|
||||
import GRPC
|
||||
import NIO
|
||||
import StableDiffusionCore
|
||||
import System
|
||||
|
||||
struct ServerCommand: ParsableCommand {
|
||||
@Option(name: .shortAndLong, help: "Path to models directory")
|
||||
var modelsDirectoryPath: String = "models"
|
||||
|
||||
|
||||
mutating func run() throws {
|
||||
let modelsDirectoryURL = URL(filePath: modelsDirectoryPath)
|
||||
let modelManager = ModelManager(modelBaseURL: modelsDirectoryURL)
|
||||
|
||||
|
||||
let semaphore = DispatchSemaphore(value: 0)
|
||||
Task {
|
||||
print("Loading initial models...")
|
||||
@ -32,9 +33,9 @@ struct ServerCommand: ParsableCommand {
|
||||
ImageGenerationServiceProvider(modelManager: modelManager)
|
||||
])
|
||||
.bind(host: "0.0.0.0", port: 4546)
|
||||
|
||||
|
||||
dispatchMain()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ServerCommand.main()
|
||||
|
Reference in New Issue
Block a user