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__(
8282 self .guidance_rescale = guidance_rescale
8383 self .use_original_formulation = use_original_formulation
8484
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 :
8688 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 ."
8890 )
89- if auto_guidance_layers is not None and auto_guidance_config is not None :
91+ if is_layer_and_config_provided :
9092 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 :
9494 raise ValueError ("`dropout` must be provided if `auto_guidance_layers` is provided." )
9595
9696 if auto_guidance_layers is not None :
You can’t perform that action at this time.
0 commit comments