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
d02c4da4
Commit
d02c4da4
authored
Aug 21, 2023
by
AUTOMATIC1111
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
also prevent changing API options via override_settings
parent
df595ae3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
modules/options.py
modules/options.py
+2
-2
modules/processing.py
modules/processing.py
+1
-1
No files found.
modules/options.py
View file @
d02c4da4
...
...
@@ -116,7 +116,7 @@ class Options:
return
super
(
Options
,
self
)
.
__getattribute__
(
item
)
def
set
(
self
,
key
,
value
,
is_api
=
False
):
def
set
(
self
,
key
,
value
,
is_api
=
False
,
run_callbacks
=
True
):
"""sets an option and calls its onchange callback, returning True if the option changed and False otherwise"""
oldval
=
self
.
data
.
get
(
key
,
None
)
...
...
@@ -135,7 +135,7 @@ class Options:
except
RuntimeError
:
return
False
if
option
.
onchange
is
not
None
:
if
run_callbacks
and
option
.
onchange
is
not
None
:
try
:
option
.
onchange
()
except
Exception
as
e
:
...
...
modules/processing.py
View file @
d02c4da4
...
...
@@ -709,7 +709,7 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
sd_models
.
reload_model_weights
()
for
k
,
v
in
p
.
override_settings
.
items
():
setattr
(
opts
,
k
,
v
)
opts
.
set
(
k
,
v
,
is_api
=
True
,
run_callbacks
=
False
)
if
k
==
'sd_model_checkpoint'
:
sd_models
.
reload_model_weights
()
...
...
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