Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
87b800e1
Unverified
Commit
87b800e1
authored
Aug 28, 2025
by
Aryan
Committed by
GitHub
Aug 28, 2025
Browse files
[modular diffusers] Fix AutoGuidance validation (#12247)
fix
parent
e58711e7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/diffusers/guiders/auto_guidance.py
src/diffusers/guiders/auto_guidance.py
+6
-6
No files found.
src/diffusers/guiders/auto_guidance.py
View file @
87b800e1
...
@@ -82,15 +82,15 @@ class AutoGuidance(BaseGuidance):
...
@@ -82,15 +82,15 @@ class AutoGuidance(BaseGuidance):
self
.
guidance_rescale
=
guidance_rescale
self
.
guidance_rescale
=
guidance_rescale
self
.
use_original_formulation
=
use_original_formulation
self
.
use_original_formulation
=
use_original_formulation
if
auto_guidance_layers
is
None
and
auto_guidance_config
is
None
:
is_layer_or_config_provided
=
auto_guidance_layers
is
not
None
or
auto_guidance_config
is
not
None
is_layer_and_config_provided
=
auto_guidance_layers
is
not
None
and
auto_guidance_config
is
not
None
if
not
is_layer_or_config_provided
:
raise
ValueError
(
raise
ValueError
(
"Either `auto_guidance_layers` or `auto_guidance_config` must be provided to enable
Skip Layer
Guidance."
"Either `auto_guidance_layers` or `auto_guidance_config` must be provided to enable
Auto
Guidance."
)
)
if
auto_guidance_layers
is
not
None
and
auto_guidance_config
is
not
None
:
if
is_layer_and_config_provided
:
raise
ValueError
(
"Only one of `auto_guidance_layers` or `auto_guidance_config` can be provided."
)
raise
ValueError
(
"Only one of `auto_guidance_layers` or `auto_guidance_config` can be provided."
)
if
(
dropout
is
None
and
auto_guidance_layers
is
not
None
)
or
(
if
auto_guidance_config
is
None
and
dropout
is
None
:
dropout
is
not
None
and
auto_guidance_layers
is
None
):
raise
ValueError
(
"`dropout` must be provided if `auto_guidance_layers` is provided."
)
raise
ValueError
(
"`dropout` must be provided if `auto_guidance_layers` is provided."
)
if
auto_guidance_layers
is
not
None
:
if
auto_guidance_layers
is
not
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment