Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
0f40c4b9
Commit
0f40c4b9
authored
Jun 20, 2024
by
w-e-w
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Sampler Scheduler autocorrection warning
parent
9e0f6d20
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
modules/sd_samplers.py
modules/sd_samplers.py
+3
-3
No files found.
modules/sd_samplers.py
View file @
0f40c4b9
...
...
@@ -98,7 +98,7 @@ def get_hr_scheduler_from_infotext(d: dict):
@
functools
.
cache
def
get_sampler_and_scheduler
(
sampler_name
,
scheduler_name
):
def
get_sampler_and_scheduler
(
sampler_name
,
scheduler_name
,
*
,
convert_automatic
=
True
):
default_sampler
=
samplers
[
0
]
found_scheduler
=
sd_schedulers
.
schedulers_map
.
get
(
scheduler_name
,
sd_schedulers
.
schedulers
[
0
])
...
...
@@ -116,7 +116,7 @@ def get_sampler_and_scheduler(sampler_name, scheduler_name):
sampler
=
all_samplers_map
.
get
(
name
,
default_sampler
)
# revert back to Automatic if it's the default scheduler for the selected sampler
if
sampler
.
options
.
get
(
'scheduler'
,
None
)
==
found_scheduler
.
name
:
if
convert_automatic
and
sampler
.
options
.
get
(
'scheduler'
,
None
)
==
found_scheduler
.
name
:
found_scheduler
=
sd_schedulers
.
schedulers
[
0
]
return
sampler
.
name
,
found_scheduler
.
label
...
...
@@ -124,7 +124,7 @@ def get_sampler_and_scheduler(sampler_name, scheduler_name):
def
fix_p_invalid_sampler_and_scheduler
(
p
):
i_sampler_name
,
i_scheduler
=
p
.
sampler_name
,
p
.
scheduler
p
.
sampler_name
,
p
.
scheduler
=
get_sampler_and_scheduler
(
p
.
sampler_name
,
p
.
scheduler
)
p
.
sampler_name
,
p
.
scheduler
=
get_sampler_and_scheduler
(
p
.
sampler_name
,
p
.
scheduler
,
convert_automatic
=
False
)
if
p
.
sampler_name
!=
i_sampler_name
or
i_scheduler
!=
p
.
scheduler
:
logging
.
warning
(
f
'Sampler Scheduler autocorrection: "{i_sampler_name}" -> "{p.sampler_name}", "{i_scheduler}" -> "{p.scheduler}"'
)
...
...
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