Skip to content
This repository was archived by the owner on Nov 27, 2024. It is now read-only.

Commit 78f3a77

Browse files
committed
Use GetPromptOptions in Generate
1 parent a5a6c7d commit 78f3a77

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

OnnxStack.UI/Views/TextToImage.xaml.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ public int SelectedTabIndex
140140
set { _selectedTabIndex = value; NotifyPropertyChanged(); }
141141
}
142142

143-
144143
public bool IsControlsEnabled
145144
{
146145
get { return _isControlsEnabled; }
@@ -182,13 +181,7 @@ private async Task Generate()
182181
IsGenerating = true;
183182
IsControlsEnabled = false;
184183
ResultImage = null;
185-
var promptOptions = new PromptOptions
186-
{
187-
Prompt = PromptOptions.Prompt,
188-
NegativePrompt = PromptOptions.NegativePrompt,
189-
DiffuserType = DiffuserType.TextToImage
190-
};
191-
184+
var promptOptions = GetPromptOptions(PromptOptions);
192185
var batchOptions = BatchOptions.ToBatchOptions();
193186
var schedulerOptions = SchedulerOptions.ToSchedulerOptions();
194187

@@ -219,6 +212,7 @@ private async Task Generate()
219212
Reset();
220213
}
221214

215+
222216
/// <summary>
223217
/// Determines whether this instance can execute Generate.
224218
/// </summary>

0 commit comments

Comments
 (0)