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
5d5224b3
Commit
5d5224b3
authored
May 02, 2024
by
w-e-w
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix_p_invalid_sampler_and_scheduler
parent
ddb28b33
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
modules/processing.py
modules/processing.py
+3
-0
modules/sd_samplers.py
modules/sd_samplers.py
+8
-1
No files found.
modules/processing.py
View file @
5d5224b3
...
@@ -842,6 +842,9 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
...
@@ -842,6 +842,9 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
sd_models
.
apply_token_merging
(
p
.
sd_model
,
p
.
get_token_merging_ratio
())
sd_models
.
apply_token_merging
(
p
.
sd_model
,
p
.
get_token_merging_ratio
())
# backwards compatibility, fix sampler and scheduler if invalid
sd_samplers
.
fix_p_invalid_sampler_and_scheduler
(
p
)
res
=
process_images_inner
(
p
)
res
=
process_images_inner
(
p
)
finally
:
finally
:
...
...
modules/sd_samplers.py
View file @
5d5224b3
from
__future__
import
annotations
from
__future__
import
annotations
import
functools
import
functools
import
logging
from
modules
import
sd_samplers_kdiffusion
,
sd_samplers_timesteps
,
sd_samplers_lcm
,
shared
,
sd_samplers_common
,
sd_schedulers
from
modules
import
sd_samplers_kdiffusion
,
sd_samplers_timesteps
,
sd_samplers_lcm
,
shared
,
sd_samplers_common
,
sd_schedulers
# imports for functions that previously were here and are used by other modules
# imports for functions that previously were here and are used by other modules
...
@@ -122,4 +122,11 @@ def get_sampler_and_scheduler(sampler_name, scheduler_name):
...
@@ -122,4 +122,11 @@ def get_sampler_and_scheduler(sampler_name, scheduler_name):
return
sampler
.
name
,
found_scheduler
.
label
return
sampler
.
name
,
found_scheduler
.
label
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
)
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}"'
)
set_samplers
()
set_samplers
()
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