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
a7a039d5
Commit
a7a039d5
authored
Dec 17, 2022
by
timntorres
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add option to include upscaler name in filename.
parent
a26fe850
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
modules/extras.py
modules/extras.py
+3
-2
modules/shared.py
modules/shared.py
+1
-0
No files found.
modules/extras.py
View file @
a7a039d5
...
@@ -194,8 +194,9 @@ def run_extras(extras_mode, resize_mode, image, image_folder, input_dir, output_
...
@@ -194,8 +194,9 @@ def run_extras(extras_mode, resize_mode, image, image_folder, input_dir, output_
basename
=
''
basename
=
''
# Add upscaler name as a suffix.
# Add upscaler name as a suffix.
suffix
=
f
"-{shared.sd_upscalers[extras_upscaler_1].name}"
suffix
=
f
"-{shared.sd_upscalers[extras_upscaler_1].name}"
if
shared
.
opts
.
use_upscaler_name_as_suffix
else
""
if
extras_upscaler_2
and
extras_upscaler_2_visibility
:
# Add second upscaler if applicable.
if
suffix
and
extras_upscaler_2
and
extras_upscaler_2_visibility
:
suffix
+=
f
"-{shared.sd_upscalers[extras_upscaler_2].name}"
suffix
+=
f
"-{shared.sd_upscalers[extras_upscaler_2].name}"
images
.
save_image
(
image
,
path
=
outpath
,
basename
=
basename
,
seed
=
None
,
prompt
=
None
,
extension
=
opts
.
samples_format
,
info
=
info
,
short_filename
=
True
,
images
.
save_image
(
image
,
path
=
outpath
,
basename
=
basename
,
seed
=
None
,
prompt
=
None
,
extension
=
opts
.
samples_format
,
info
=
info
,
short_filename
=
True
,
...
...
modules/shared.py
View file @
a7a039d5
...
@@ -293,6 +293,7 @@ options_templates.update(options_section(('saving-images', "Saving images/grids"
...
@@ -293,6 +293,7 @@ options_templates.update(options_section(('saving-images', "Saving images/grids"
"export_for_4chan"
:
OptionInfo
(
True
,
"If PNG image is larger than 4MB or any dimension is larger than 4000, downscale and save copy as JPG"
),
"export_for_4chan"
:
OptionInfo
(
True
,
"If PNG image is larger than 4MB or any dimension is larger than 4000, downscale and save copy as JPG"
),
"use_original_name_batch"
:
OptionInfo
(
False
,
"Use original name for output filename during batch process in extras tab"
),
"use_original_name_batch"
:
OptionInfo
(
False
,
"Use original name for output filename during batch process in extras tab"
),
"use_upscaler_name_as_suffix"
:
OptionInfo
(
False
,
"Add upscaler name to the end of filename in the extras tab"
),
"save_selected_only"
:
OptionInfo
(
True
,
"When using 'Save' button, only save a single selected image"
),
"save_selected_only"
:
OptionInfo
(
True
,
"When using 'Save' button, only save a single selected image"
),
"do_not_add_watermark"
:
OptionInfo
(
False
,
"Do not add watermark to images"
),
"do_not_add_watermark"
:
OptionInfo
(
False
,
"Do not add watermark to images"
),
...
...
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