|
8 | 8 | xmlns:sys="clr-namespace:System;assembly=System.Runtime"
|
9 | 9 | xmlns:sd="clr-namespace:StableDiffusion.NET;assembly=StableDiffusion.NET"
|
10 | 10 | mc:Ignorable="d"
|
11 |
| - Title="StableDiffusion.NET" Width="1280" Height="800"> |
| 11 | + Title="StableDiffusion.NET" Width="1706" Height="960"> |
12 | 12 | <Window.DataContext>
|
13 | 13 | <local:MainWindowViewModel />
|
14 | 14 | </Window.DataContext>
|
|
42 | 42 | <ColumnDefinition Width="400" />
|
43 | 43 | </Grid.ColumnDefinitions>
|
44 | 44 |
|
45 |
| - <StackPanel Margin="4,0" Orientation="Vertical"> |
46 |
| - <TextBlock Margin="8" Text="This is just an example - inputs are not validated! Make sure everything is correct before pressing 'Create Image'." /> |
| 45 | + <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"> |
| 46 | + <StackPanel Margin="4,0" Orientation="Vertical"> |
| 47 | + <TextBlock Margin="8" Text="This is just an example - inputs are not validated! Make sure everything is correct before pressing 'Create Image'." /> |
47 | 48 |
|
48 |
| - <Separator /> |
| 49 | + <Separator /> |
49 | 50 |
|
50 |
| - <Label Content="Model-Path" /> |
51 |
| - <DockPanel> |
52 |
| - <Button DockPanel.Dock="Right" Width="24" Margin="2,0,0,0" Content="..." Command="{Binding SelectModelCommand}" IsEnabled="{Binding IsReady}" /> |
53 |
| - <TextBox Text="{Binding ModelPath}" /> |
54 |
| - </DockPanel> |
| 51 | + <Label Content="Model-Type" /> |
| 52 | + <StackPanel Orientation="Horizontal" Margin="4,0,0,0"> |
| 53 | + <RadioButton Content="Stable Diffusion" IsChecked="{Binding IsStableDiffusionSelected}" GroupName="ModelType" /> |
| 54 | + <RadioButton Margin="16,0,0,0" Content="Flux" IsChecked="{Binding IsFluxSelected}" GroupName="ModelType" /> |
| 55 | + </StackPanel> |
55 | 56 |
|
56 |
| - <Label Content="Vae-Path (Optional)" /> |
57 |
| - <DockPanel> |
58 |
| - <Button DockPanel.Dock="Right" Width="24" Margin="2,0,0,0" Content="..." Command="{Binding SelectVaeCommand}" IsEnabled="{Binding IsReady}" /> |
59 |
| - <TextBox Text="{Binding VaePath}" /> |
60 |
| - </DockPanel> |
| 57 | + <StackPanel Orientation="Vertical" IsEnabled="{Binding IsStableDiffusionSelected}"> |
| 58 | + <Label Content="Model-Path" /> |
| 59 | + <DockPanel> |
| 60 | + <Button DockPanel.Dock="Right" Width="24" Margin="2,0,0,0" Content="..." Command="{Binding SelectModelCommand}" IsEnabled="{Binding IsReady}" /> |
| 61 | + <TextBox Text="{Binding ModelPath}" /> |
| 62 | + </DockPanel> |
| 63 | + </StackPanel> |
61 | 64 |
|
62 |
| - <Label Content="Schedule" /> |
63 |
| - <ComboBox ItemsSource="{Binding Source={StaticResource ScheduleDataSource}}" SelectedItem="{Binding Schedule}" /> |
| 65 | + <StackPanel Orientation="Vertical" IsEnabled="{Binding IsFluxSelected}"> |
| 66 | + <Label Content="DiffusionModel-Path" /> |
| 67 | + <DockPanel> |
| 68 | + <Button DockPanel.Dock="Right" Width="24" Margin="2,0,0,0" Content="..." Command="{Binding SelectDiffusionModelCommand}" IsEnabled="{Binding IsReady}" /> |
| 69 | + <TextBox Text="{Binding DiffusionModelPath}" /> |
| 70 | + </DockPanel> |
64 | 71 |
|
65 |
| - <Button Margin="0,8" Content="Load Model" Command="{Binding LoadModelCommand}" IsEnabled="{Binding IsReady}" /> |
| 72 | + <Label Content="ClipL-Path" /> |
| 73 | + <DockPanel> |
| 74 | + <Button DockPanel.Dock="Right" Width="24" Margin="2,0,0,0" Content="..." Command="{Binding SelectClipLCommand}" IsEnabled="{Binding IsReady}" /> |
| 75 | + <TextBox Text="{Binding ClipLPath}" /> |
| 76 | + </DockPanel> |
66 | 77 |
|
67 |
| - <Separator /> |
| 78 | + <Label Content="T5xxl-Path" /> |
| 79 | + <DockPanel> |
| 80 | + <Button DockPanel.Dock="Right" Width="24" Margin="2,0,0,0" Content="..." Command="{Binding SelectT5xxlCommand}" IsEnabled="{Binding IsReady}" /> |
| 81 | + <TextBox Text="{Binding T5xxlPath}" /> |
| 82 | + </DockPanel> |
| 83 | + </StackPanel> |
68 | 84 |
|
69 |
| - <Label Margin="0,8,0,0" Content="Prompt" /> |
70 |
| - <TextBox Height="80" TextWrapping="Wrap" Text="{Binding Prompt}" /> |
| 85 | + <Label Content="Vae-Path (Optional)" /> |
| 86 | + <DockPanel> |
| 87 | + <Button DockPanel.Dock="Right" Width="24" Margin="2,0,0,0" Content="..." Command="{Binding SelectVaeCommand}" IsEnabled="{Binding IsReady}" /> |
| 88 | + <TextBox Text="{Binding VaePath}" /> |
| 89 | + </DockPanel> |
71 | 90 |
|
72 |
| - <Label Content="AntiPrompt" /> |
73 |
| - <TextBox Height="80" TextWrapping="Wrap" Text="{Binding AntiPrompt}" /> |
| 91 | + <Label Content="Schedule" /> |
| 92 | + <ComboBox ItemsSource="{Binding Source={StaticResource ScheduleDataSource}}" SelectedItem="{Binding Schedule}" /> |
74 | 93 |
|
75 |
| - <DockPanel LastChildFill="True"> |
76 |
| - <StackPanel DockPanel.Dock="Left"> |
77 |
| - <StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0,8,0,0"> |
78 |
| - <Label Width="50" Content="Width" /> |
79 |
| - <TextBox HorizontalAlignment="Left" Width="60" Text="{Binding Width}" /> |
80 |
| - </StackPanel> |
| 94 | + <Button Margin="0,8" Content="Load Model" Command="{Binding LoadModelCommand}" IsEnabled="{Binding IsReady}" /> |
81 | 95 |
|
82 |
| - <StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0,8,0,0"> |
83 |
| - <Label Width="50" Content="Height" /> |
84 |
| - <TextBox HorizontalAlignment="Left" Width="60" Text="{Binding Height}" /> |
85 |
| - </StackPanel> |
| 96 | + <Separator /> |
86 | 97 |
|
87 |
| - <StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0,8,0,0"> |
88 |
| - <Label Width="50" Content="Cfg" /> |
89 |
| - <TextBox HorizontalAlignment="Left" Width="60" Text="{Binding Cfg}" /> |
90 |
| - </StackPanel> |
| 98 | + <Label Margin="0,8,0,0" Content="Prompt" /> |
| 99 | + <TextBox Height="80" TextWrapping="Wrap" Text="{Binding Prompt}" /> |
91 | 100 |
|
92 |
| - <StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0,8,0,0"> |
93 |
| - <Label Width="50" Content="Steps" /> |
94 |
| - <TextBox HorizontalAlignment="Left" Width="60" Text="{Binding Steps}" /> |
95 |
| - </StackPanel> |
| 101 | + <Label Content="AntiPrompt" /> |
| 102 | + <TextBox Height="60" TextWrapping="Wrap" Text="{Binding AntiPrompt}" /> |
| 103 | + |
| 104 | + <DockPanel LastChildFill="True"> |
| 105 | + <StackPanel DockPanel.Dock="Left"> |
| 106 | + <StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0,8,0,0"> |
| 107 | + <Label Width="50" Content="Width" /> |
| 108 | + <TextBox HorizontalAlignment="Left" Width="60" Text="{Binding Width}" /> |
| 109 | + </StackPanel> |
| 110 | + |
| 111 | + <StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0,8,0,0"> |
| 112 | + <Label Width="50" Content="Height" /> |
| 113 | + <TextBox HorizontalAlignment="Left" Width="60" Text="{Binding Height}" /> |
| 114 | + </StackPanel> |
| 115 | + |
| 116 | + <StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0,8,0,0"> |
| 117 | + <Label Width="50" Content="Cfg" /> |
| 118 | + <TextBox HorizontalAlignment="Left" Width="60" Text="{Binding Cfg}" /> |
| 119 | + </StackPanel> |
96 | 120 |
|
97 |
| - <StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0,8,0,0"> |
98 |
| - <Label Width="50" Content="Seed" /> |
99 |
| - <TextBox HorizontalAlignment="Left" Width="60" Text="{Binding Seed}" /> |
| 121 | + <StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0,8,0,0"> |
| 122 | + <Label Width="50" Content="Steps" /> |
| 123 | + <TextBox HorizontalAlignment="Left" Width="60" Text="{Binding Steps}" /> |
| 124 | + </StackPanel> |
| 125 | + |
| 126 | + <StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0,8,0,0"> |
| 127 | + <Label Width="50" Content="Seed" /> |
| 128 | + <TextBox HorizontalAlignment="Left" Width="60" Text="{Binding Seed}" /> |
| 129 | + </StackPanel> |
100 | 130 | </StackPanel>
|
101 |
| - </StackPanel> |
102 | 131 |
|
103 |
| - <DockPanel Margin="16,0,0,0" LastChildFill="True"> |
104 |
| - <Label DockPanel.Dock="Top" Content="Image2Image Source" /> |
105 |
| - <DockPanel DockPanel.Dock="Top" > |
106 |
| - <Button DockPanel.Dock="Right" Width="24" Margin="2,0,0,0" Content="..." Command="{Binding SelectImage2ImageSourceCommand}" IsEnabled="{Binding IsReady}" /> |
107 |
| - <TextBox Text="{Binding Image2ImageSourcePath}" /> |
108 |
| - </DockPanel> |
| 132 | + <DockPanel Margin="16,0,0,0" LastChildFill="True"> |
| 133 | + <Label DockPanel.Dock="Top" Content="Image2Image Source" /> |
| 134 | + <DockPanel DockPanel.Dock="Top" > |
| 135 | + <Button DockPanel.Dock="Right" Width="24" Margin="2,0,0,0" Content="..." Command="{Binding SelectImage2ImageSourceCommand}" IsEnabled="{Binding IsReady}" /> |
| 136 | + <TextBox Text="{Binding Image2ImageSourcePath}" /> |
| 137 | + </DockPanel> |
109 | 138 |
|
110 |
| - <Image Source="{Binding Image2ImageSource, Converter={StaticResource ImageToImageSourceConverter}}" /> |
| 139 | + <Image Source="{Binding Image2ImageSource, Converter={StaticResource ImageToImageSourceConverter}}" /> |
| 140 | + </DockPanel> |
111 | 141 | </DockPanel>
|
112 |
| - </DockPanel> |
113 | 142 |
|
114 |
| - <Label Content="Sample-Method" /> |
115 |
| - <ComboBox ItemsSource="{Binding Source={StaticResource SamplerDataSource}}" SelectedItem="{Binding SampleMethod}" /> |
| 143 | + <Label Content="Sample-Method" /> |
| 144 | + <ComboBox ItemsSource="{Binding Source={StaticResource SamplerDataSource}}" SelectedItem="{Binding SampleMethod}" /> |
| 145 | + |
| 146 | + <Button Margin="0,16,0,0" Content="Create Image" Command="{Binding CreateImageCommand}" IsEnabled="{Binding IsReady}" /> |
| 147 | + <Button Margin="0,16,0,0" Content="Save Image" Command="{Binding SaveImageCommand}" IsEnabled="{Binding IsReady}" /> |
| 148 | + </StackPanel> |
116 | 149 |
|
117 |
| - <Button Margin="0,16,0,0" Content="Create Image" Command="{Binding CreateImageCommand}" IsEnabled="{Binding IsReady}" /> |
118 |
| - <Button Margin="0,16,0,0" Content="Save Image" Command="{Binding SaveImageCommand}" IsEnabled="{Binding IsReady}" /> |
119 |
| - </StackPanel> |
| 150 | + </ScrollViewer> |
120 | 151 |
|
121 | 152 | <GridSplitter Grid.Column="1" Margin="2,0" Width="2" Background="DimGray" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
|
122 | 153 |
|
|
0 commit comments