diff --git a/Examples/ImageCreationUI/ImageCreationUI.csproj b/Examples/ImageCreationUI/ImageCreationUI.csproj
index 4a5501e..304092f 100644
--- a/Examples/ImageCreationUI/ImageCreationUI.csproj
+++ b/Examples/ImageCreationUI/ImageCreationUI.csproj
@@ -10,11 +10,10 @@
-
-
-
-
-
+
+
+
+
diff --git a/Examples/ImageCreationUI/MainWindow.xaml b/Examples/ImageCreationUI/MainWindow.xaml
index e185201..261f3cf 100644
--- a/Examples/ImageCreationUI/MainWindow.xaml
+++ b/Examples/ImageCreationUI/MainWindow.xaml
@@ -5,14 +5,32 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ImageCreationUI"
xmlns:converter="clr-namespace:ImageCreationUI.Converter"
+ xmlns:sys="clr-namespace:System;assembly=System.Runtime"
+ xmlns:sd="clr-namespace:StableDiffusion.NET;assembly=StableDiffusion.NET"
mc:Ignorable="d"
- Title="StableDiffusion.NET" Width="1280" Height="720">
+ Title="StableDiffusion.NET" Width="1280" Height="800">
+
+
+
+
+
+
+
+
+
+
+
+
@@ -29,18 +47,21 @@
-
+
-
+
+
+
+
@@ -76,6 +97,9 @@
+
+
+
diff --git a/Examples/ImageCreationUI/MainWindowViewModel.cs b/Examples/ImageCreationUI/MainWindowViewModel.cs
index b385f86..7a9a100 100644
--- a/Examples/ImageCreationUI/MainWindowViewModel.cs
+++ b/Examples/ImageCreationUI/MainWindowViewModel.cs
@@ -27,6 +27,13 @@ public class MainWindowViewModel : INotifyPropertyChanged
set => SetProperty(ref _vaePath, value);
}
+ private Schedule _schedule = Schedule.Default;
+ public Schedule Schedule
+ {
+ get => _schedule;
+ set => SetProperty(ref _schedule, value);
+ }
+
private string _prompt = string.Empty;
public string Prompt
{
@@ -76,6 +83,13 @@ public class MainWindowViewModel : INotifyPropertyChanged
set => SetProperty(ref _seed, value);
}
+ private Sampler _sampleMethod = Sampler.Euler_A;
+ public Sampler SampleMethod
+ {
+ get => _sampleMethod;
+ set => SetProperty(ref _sampleMethod, value);
+ }
+
private IImage? _image;
public IImage? Image
{
@@ -146,7 +160,7 @@ public class MainWindowViewModel : INotifyPropertyChanged
_model?.Dispose();
LogLine($"Loading model '{ModelPath}'");
- _model = await Task.Run(() => new StableDiffusionModel(ModelPath, new ModelParameter { VaePath = VaePath }));
+ _model = await Task.Run(() => new StableDiffusionModel(ModelPath, new ModelParameter { VaePath = VaePath, Schedule = Schedule }));
}
catch (Exception ex)
{
@@ -172,7 +186,8 @@ public class MainWindowViewModel : INotifyPropertyChanged
Height = Height,
CfgScale = Cfg,
SampleSteps = Steps,
- Seed = Seed
+ Seed = Seed,
+ SampleMethod = SampleMethod
}));
Image = image?.ToImage();
diff --git a/StableDiffusion.NET/Enums/Schedule.cs b/StableDiffusion.NET/Enums/Schedule.cs
index 51904de..d13a378 100644
--- a/StableDiffusion.NET/Enums/Schedule.cs
+++ b/StableDiffusion.NET/Enums/Schedule.cs
@@ -5,5 +5,6 @@ public enum Schedule
Default,
Discrete,
Karras,
+ AYS,
N_Schedules
}
\ No newline at end of file
diff --git a/build.bat b/build.bat
index 246bf67..f7e69da 100644
--- a/build.bat
+++ b/build.bat
@@ -4,7 +4,7 @@ if not exist stable-diffusion.cpp (
cd stable-diffusion.cpp
git fetch
-git checkout ec82d5279ab7d3b20d95bf1e803c78306030e6b1
+git checkout ce1bcc74a6bf1f2c187d4d8ea14ee247cf562af2
git submodule init
git submodule update