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
5a6c0740
Commit
5a6c0740
authored
Sep 01, 2022
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for broken extras tab
parent
0b8ca64a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
webui.py
webui.py
+5
-4
No files found.
webui.py
View file @
5a6c0740
...
@@ -209,6 +209,7 @@ class Options:
...
@@ -209,6 +209,7 @@ class Options:
"outdir_samples"
:
OptionInfo
(
""
,
"Output dictectory for images; if empty, defaults to two directories below"
),
"outdir_samples"
:
OptionInfo
(
""
,
"Output dictectory for images; if empty, defaults to two directories below"
),
"outdir_txt2img_samples"
:
OptionInfo
(
"outputs/txt2img-images"
,
'Output dictectory for txt2img images'
),
"outdir_txt2img_samples"
:
OptionInfo
(
"outputs/txt2img-images"
,
'Output dictectory for txt2img images'
),
"outdir_img2img_samples"
:
OptionInfo
(
"outputs/img2img-images"
,
'Output dictectory for img2img images'
),
"outdir_img2img_samples"
:
OptionInfo
(
"outputs/img2img-images"
,
'Output dictectory for img2img images'
),
"outdir_extras_samples"
:
OptionInfo
(
"outputs/extras-images"
,
'Output dictectory for images from extras tab'
),
"outdir_grids"
:
OptionInfo
(
""
,
"Output dictectory for grids; if empty, defaults to two directories below"
),
"outdir_grids"
:
OptionInfo
(
""
,
"Output dictectory for grids; if empty, defaults to two directories below"
),
"outdir_txt2img_grids"
:
OptionInfo
(
"outputs/txt2img-grids"
,
'Output dictectory for txt2img grids'
),
"outdir_txt2img_grids"
:
OptionInfo
(
"outputs/txt2img-grids"
,
'Output dictectory for txt2img grids'
),
"outdir_img2img_grids"
:
OptionInfo
(
"outputs/img2img-grids"
,
'Output dictectory for img2img grids'
),
"outdir_img2img_grids"
:
OptionInfo
(
"outputs/img2img-grids"
,
'Output dictectory for img2img grids'
),
...
@@ -368,7 +369,7 @@ def torch_gc():
...
@@ -368,7 +369,7 @@ def torch_gc():
torch
.
cuda
.
ipc_collect
()
torch
.
cuda
.
ipc_collect
()
def
save_image
(
image
,
path
,
basename
,
seed
=
None
,
prompt
=
None
,
extension
=
'png'
,
info
=
None
,
short_filename
=
False
):
def
save_image
(
image
,
path
,
basename
,
seed
=
None
,
prompt
=
None
,
extension
=
'png'
,
info
=
None
,
short_filename
=
False
,
no_prompt
=
False
):
if
short_filename
or
prompt
is
None
or
seed
is
None
:
if
short_filename
or
prompt
is
None
or
seed
is
None
:
file_decoration
=
""
file_decoration
=
""
elif
opts
.
save_to_dirs
:
elif
opts
.
save_to_dirs
:
...
@@ -382,7 +383,7 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i
...
@@ -382,7 +383,7 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i
else
:
else
:
pnginfo
=
None
pnginfo
=
None
if
opts
.
save_to_dirs
:
if
opts
.
save_to_dirs
and
not
no_prompt
:
words
=
re
.
findall
(
r'\w+'
,
prompt
or
""
)
words
=
re
.
findall
(
r'\w+'
,
prompt
or
""
)
if
len
(
words
)
==
0
:
if
len
(
words
)
==
0
:
words
=
[
"empty"
]
words
=
[
"empty"
]
...
@@ -1838,7 +1839,7 @@ def run_extras(image, GFPGAN_strength, RealESRGAN_upscaling, RealESRGAN_model_in
...
@@ -1838,7 +1839,7 @@ def run_extras(image, GFPGAN_strength, RealESRGAN_upscaling, RealESRGAN_model_in
image
=
image
.
convert
(
"RGB"
)
image
=
image
.
convert
(
"RGB"
)
outpath
=
opts
.
outdir
or
"outputs/extras-samples"
outpath
=
opts
.
outdir
_samples
or
opts
.
outdir_extras_samples
if
have_gfpgan
is
not
None
and
GFPGAN_strength
>
0
:
if
have_gfpgan
is
not
None
and
GFPGAN_strength
>
0
:
gfpgan_model
=
gfpgan
()
gfpgan_model
=
gfpgan
()
...
@@ -1854,7 +1855,7 @@ def run_extras(image, GFPGAN_strength, RealESRGAN_upscaling, RealESRGAN_model_in
...
@@ -1854,7 +1855,7 @@ def run_extras(image, GFPGAN_strength, RealESRGAN_upscaling, RealESRGAN_model_in
if
have_realesrgan
and
RealESRGAN_upscaling
!=
1.0
:
if
have_realesrgan
and
RealESRGAN_upscaling
!=
1.0
:
image
=
upscale_with_realesrgan
(
image
,
RealESRGAN_upscaling
,
RealESRGAN_model_index
)
image
=
upscale_with_realesrgan
(
image
,
RealESRGAN_upscaling
,
RealESRGAN_model_index
)
save_image
(
image
,
outpath
,
""
,
None
,
''
,
opts
.
samples_format
,
short_filename
=
True
)
save_image
(
image
,
outpath
,
""
,
None
,
''
,
opts
.
samples_format
,
short_filename
=
True
,
no_prompt
=
True
)
return
image
,
''
,
''
return
image
,
''
,
''
...
...
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