File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
StableDiffusion.NET/Extensions Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ public static class ParameterExtension
9
9
public static void Validate ( this StableDiffusionParameter parameter )
10
10
{
11
11
ArgumentNullException . ThrowIfNull ( parameter , nameof ( parameter ) ) ;
12
+ ArgumentNullException . ThrowIfNull ( parameter . ControlNet , nameof ( StableDiffusionParameter . ControlNet ) ) ;
13
+ ArgumentNullException . ThrowIfNull ( parameter . PhotoMaker , nameof ( StableDiffusionParameter . PhotoMaker ) ) ;
12
14
ArgumentNullException . ThrowIfNull ( parameter . NegativePrompt , nameof ( StableDiffusionParameter . NegativePrompt ) ) ;
13
15
14
16
ArgumentOutOfRangeException . ThrowIfNegativeOrZero ( parameter . Width , nameof ( StableDiffusionParameter . Width ) ) ;
@@ -20,10 +22,8 @@ public static void Validate(this StableDiffusionParameter parameter)
20
22
21
23
if ( ! Enum . IsDefined ( parameter . SampleMethod ) ) throw new ArgumentOutOfRangeException ( nameof ( StableDiffusionParameter . SampleMethod ) ) ;
22
24
23
- // ReSharper disable ConditionalAccessQualifierIsNonNullableAccordingToAPIContract
24
- parameter . ControlNet ? . Validate ( ) ;
25
- parameter . PhotoMaker ? . Validate ( ) ;
26
- // ReSharper restore ConditionalAccessQualifierIsNonNullableAccordingToAPIContract
25
+ parameter . ControlNet . Validate ( ) ;
26
+ parameter . PhotoMaker . Validate ( ) ;
27
27
}
28
28
29
29
public static void Validate ( this StableDiffusionControlNetParameter parameter )
You can’t perform that action at this time.
0 commit comments