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
589215df
Commit
589215df
authored
Oct 16, 2022
by
MalumaDev
Committed by
GitHub
Oct 16, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into test_resolve_conflicts
parents
ae0fdad6
c8045c5a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
2 deletions
+19
-2
javascript/imageviewer.js
javascript/imageviewer.js
+1
-1
modules/shared.py
modules/shared.py
+10
-0
modules/ui.py
modules/ui.py
+8
-1
No files found.
javascript/imageviewer.js
View file @
589215df
...
@@ -31,7 +31,7 @@ function updateOnBackgroundChange() {
...
@@ -31,7 +31,7 @@ function updateOnBackgroundChange() {
}
}
})
})
if
(
modalImage
.
src
!=
currentButton
.
children
[
0
].
src
)
{
if
(
currentButton
?.
children
?.
length
>
0
&&
modalImage
.
src
!=
currentButton
.
children
[
0
].
src
)
{
modalImage
.
src
=
currentButton
.
children
[
0
].
src
;
modalImage
.
src
=
currentButton
.
children
[
0
].
src
;
if
(
modalImage
.
style
.
display
===
'
none
'
)
{
if
(
modalImage
.
style
.
display
===
'
none
'
)
{
modal
.
style
.
setProperty
(
'
background-image
'
,
`url(
${
modalImage
.
src
}
)`
)
modal
.
style
.
setProperty
(
'
background-image
'
,
`url(
${
modalImage
.
src
}
)`
)
...
...
modules/shared.py
View file @
589215df
...
@@ -80,6 +80,16 @@ parser.add_argument("--disable-safe-unpickle", action='store_true', help="disabl
...
@@ -80,6 +80,16 @@ parser.add_argument("--disable-safe-unpickle", action='store_true', help="disabl
cmd_opts
=
parser
.
parse_args
()
cmd_opts
=
parser
.
parse_args
()
restricted_opts
=
[
"samples_filename_pattern"
,
"outdir_samples"
,
"outdir_txt2img_samples"
,
"outdir_img2img_samples"
,
"outdir_extras_samples"
,
"outdir_grids"
,
"outdir_txt2img_grids"
,
"outdir_save"
,
]
devices
.
device
,
devices
.
device_interrogate
,
devices
.
device_gfpgan
,
devices
.
device_bsrgan
,
devices
.
device_esrgan
,
devices
.
device_scunet
,
devices
.
device_codeformer
=
\
devices
.
device
,
devices
.
device_interrogate
,
devices
.
device_gfpgan
,
devices
.
device_bsrgan
,
devices
.
device_esrgan
,
devices
.
device_scunet
,
devices
.
device_codeformer
=
\
(
devices
.
cpu
if
any
(
y
in
cmd_opts
.
use_cpu
for
y
in
[
x
,
'all'
])
else
devices
.
get_optimal_device
()
for
x
in
[
'sd'
,
'interrogate'
,
'gfpgan'
,
'bsrgan'
,
'esrgan'
,
'scunet'
,
'codeformer'
])
(
devices
.
cpu
if
any
(
y
in
cmd_opts
.
use_cpu
for
y
in
[
x
,
'all'
])
else
devices
.
get_optimal_device
()
for
x
in
[
'sd'
,
'interrogate'
,
'gfpgan'
,
'bsrgan'
,
'esrgan'
,
'scunet'
,
'codeformer'
])
...
...
modules/ui.py
View file @
589215df
...
@@ -25,7 +25,8 @@ import gradio.routes
...
@@ -25,7 +25,8 @@ import gradio.routes
from
modules
import
sd_hijack
,
sd_models
from
modules
import
sd_hijack
,
sd_models
from
modules.paths
import
script_path
from
modules.paths
import
script_path
from
modules.shared
import
opts
,
cmd_opts
,
aesthetic_embeddings
from
modules.shared
import
opts
,
cmd_opts
,
restricted_opts
,
aesthetic_embeddings
if
cmd_opts
.
deepdanbooru
:
if
cmd_opts
.
deepdanbooru
:
from
modules.deepbooru
import
get_deepbooru_tags
from
modules.deepbooru
import
get_deepbooru_tags
...
@@ -1505,6 +1506,9 @@ Requested path was: {f}
...
@@ -1505,6 +1506,9 @@ Requested path was: {f}
if
comp_args
and
isinstance
(
comp_args
,
dict
)
and
comp_args
.
get
(
'visible'
)
is
False
:
if
comp_args
and
isinstance
(
comp_args
,
dict
)
and
comp_args
.
get
(
'visible'
)
is
False
:
continue
continue
if
cmd_opts
.
hide_ui_dir_config
and
key
in
restricted_opts
:
continue
oldval
=
opts
.
data
.
get
(
key
,
None
)
oldval
=
opts
.
data
.
get
(
key
,
None
)
opts
.
data
[
key
]
=
value
opts
.
data
[
key
]
=
value
...
@@ -1522,6 +1526,9 @@ Requested path was: {f}
...
@@ -1522,6 +1526,9 @@ Requested path was: {f}
if
not
opts
.
same_type
(
value
,
opts
.
data_labels
[
key
]
.
default
):
if
not
opts
.
same_type
(
value
,
opts
.
data_labels
[
key
]
.
default
):
return
gr
.
update
(
visible
=
True
),
opts
.
dumpjson
()
return
gr
.
update
(
visible
=
True
),
opts
.
dumpjson
()
if
cmd_opts
.
hide_ui_dir_config
and
key
in
restricted_opts
:
return
gr
.
update
(
value
=
oldval
),
opts
.
dumpjson
()
oldval
=
opts
.
data
.
get
(
key
,
None
)
oldval
=
opts
.
data
.
get
(
key
,
None
)
opts
.
data
[
key
]
=
value
opts
.
data
[
key
]
=
value
...
...
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