From c535f219ffc63a63e10e16c43ee86234b18c479c Mon Sep 17 00:00:00 2001 From: Wanaldino Antimonio Date: Sat, 24 Dec 2022 18:26:53 +0100 Subject: [PATCH] Added guidanceScale in CLI --- swift/StableDiffusionCLI/main.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/swift/StableDiffusionCLI/main.swift b/swift/StableDiffusionCLI/main.swift index 5cbe627..7471316 100644 --- a/swift/StableDiffusionCLI/main.swift +++ b/swift/StableDiffusionCLI/main.swift @@ -53,6 +53,9 @@ struct StableDiffusionSample: ParsableCommand { @Option(help: "Random seed") var seed: UInt32 = 93 + @Option(help: "Controls the influence of the text prompt on sampling process (0=random images)") + var guidanceScale: Float = 7.5 + @Option(help: "Compute units to load model with {all,cpuOnly,cpuAndGPU,cpuAndNeuralEngine}") var computeUnits: ComputeUnits = .all @@ -92,6 +95,7 @@ struct StableDiffusionSample: ParsableCommand { imageCount: imageCount, stepCount: stepCount, seed: seed, + guidanceScale: guidanceScale, scheduler: scheduler.stableDiffusionScheduler ) { progress in sampleTimer.stop()