File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -82,15 +82,15 @@ def __init__(
82
82
self .guidance_rescale = guidance_rescale
83
83
self .use_original_formulation = use_original_formulation
84
84
85
- if auto_guidance_layers is None and auto_guidance_config is None :
85
+ is_layer_or_config_provided = auto_guidance_layers is not None or auto_guidance_config is not None
86
+ is_layer_and_config_provided = auto_guidance_layers is not None and auto_guidance_config is not None
87
+ if not is_layer_or_config_provided :
86
88
raise ValueError (
87
- "Either `auto_guidance_layers` or `auto_guidance_config` must be provided to enable Skip Layer Guidance ."
89
+ "Either `auto_guidance_layers` or `auto_guidance_config` must be provided to enable AutoGuidance ."
88
90
)
89
- if auto_guidance_layers is not None and auto_guidance_config is not None :
91
+ if is_layer_and_config_provided :
90
92
raise ValueError ("Only one of `auto_guidance_layers` or `auto_guidance_config` can be provided." )
91
- if (dropout is None and auto_guidance_layers is not None ) or (
92
- dropout is not None and auto_guidance_layers is None
93
- ):
93
+ if auto_guidance_config is None and dropout is None :
94
94
raise ValueError ("`dropout` must be provided if `auto_guidance_layers` is provided." )
95
95
96
96
if auto_guidance_layers is not None :
You can’t perform that action at this time.
0 commit comments