|
|
|
@ -24,11 +24,6 @@ struct PromptView: View {
|
|
|
|
|
static let modelNames = models.map { $0.modelVersion }
|
|
|
|
|
|
|
|
|
|
@State private var model = Settings.shared.currentModel.modelVersion
|
|
|
|
|
@State private var positivePrompt = "Labrador in the style of Vermeer"
|
|
|
|
|
@State private var negativePrompt = ""
|
|
|
|
|
@State private var steps = 25.0
|
|
|
|
|
@State private var numImages = 1.0
|
|
|
|
|
@State private var seed = 386.0
|
|
|
|
|
@State private var disclosedPrompt = true
|
|
|
|
|
|
|
|
|
|
// TODO: refactor download with similar code in Loading.swift (iOS)
|
|
|
|
@ -94,11 +89,11 @@ struct PromptView: View {
|
|
|
|
|
|
|
|
|
|
DisclosureGroup(isExpanded: $disclosedPrompt) {
|
|
|
|
|
Group {
|
|
|
|
|
TextField("Positive prompt", text: $positivePrompt,
|
|
|
|
|
TextField("Positive prompt", text: $generation.positivePrompt,
|
|
|
|
|
axis: .vertical).lineLimit(5)
|
|
|
|
|
.textFieldStyle(.squareBorder)
|
|
|
|
|
.listRowInsets(EdgeInsets(top: 0, leading: -20, bottom: 0, trailing: 20))
|
|
|
|
|
TextField("Negative prompt", text: $negativePrompt,
|
|
|
|
|
TextField("Negative prompt", text: $generation.negativePrompt,
|
|
|
|
|
axis: .vertical).lineLimit(5)
|
|
|
|
|
.textFieldStyle(.squareBorder)
|
|
|
|
|
}.padding(.leading, 10)
|
|
|
|
@ -109,10 +104,10 @@ struct PromptView: View {
|
|
|
|
|
Divider()
|
|
|
|
|
|
|
|
|
|
DisclosureGroup {
|
|
|
|
|
CompactSlider(value: $steps, in: 0...150, step: 5) {
|
|
|
|
|
CompactSlider(value: $generation.steps, in: 0...150, step: 5) {
|
|
|
|
|
Text("Steps")
|
|
|
|
|
Spacer()
|
|
|
|
|
Text("\(Int(steps))")
|
|
|
|
|
Text("\(Int(generation.steps))")
|
|
|
|
|
}.padding(.leading, 10)
|
|
|
|
|
} label: {
|
|
|
|
|
Label("Step count", systemImage: "square.3.layers.3d.down.left").foregroundColor(.secondary)
|
|
|
|
@ -120,20 +115,20 @@ struct PromptView: View {
|
|
|
|
|
|
|
|
|
|
Divider()
|
|
|
|
|
DisclosureGroup() {
|
|
|
|
|
CompactSlider(value: $numImages, in: 0...10, step: 1) {
|
|
|
|
|
CompactSlider(value: $generation.numImages, in: 0...10, step: 1) {
|
|
|
|
|
Text("Number of Images")
|
|
|
|
|
Spacer()
|
|
|
|
|
Text("\(Int(numImages))")
|
|
|
|
|
Text("\(Int(generation.numImages))")
|
|
|
|
|
}.padding(.leading, 10)
|
|
|
|
|
} label: {
|
|
|
|
|
Label("Number of images", systemImage: "photo.stack").foregroundColor(.secondary)
|
|
|
|
|
}
|
|
|
|
|
Divider()
|
|
|
|
|
DisclosureGroup() {
|
|
|
|
|
CompactSlider(value: $seed, in: 0...1000, step: 1) {
|
|
|
|
|
CompactSlider(value: $generation.seed, in: 0...1000, step: 1) {
|
|
|
|
|
Text("Random seed")
|
|
|
|
|
Spacer()
|
|
|
|
|
Text("\(Int(seed))")
|
|
|
|
|
Text("\(Int(generation.seed))")
|
|
|
|
|
}.padding(.leading, 10)
|
|
|
|
|
} label: {
|
|
|
|
|
Label("Random Seed", systemImage: "leaf").foregroundColor(.secondary)
|
|
|
|
|