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
7a7a3a6b
Commit
7a7a3a6b
authored
Aug 28, 2022
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Option to not save grid for single images for #22
parent
6bec9c3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
webui.py
webui.py
+3
-1
No files found.
webui.py
View file @
7a7a3a6b
...
...
@@ -131,6 +131,7 @@ class Options:
"grid_save"
:
OptionInfo
(
True
,
"Save image grids"
),
"grid_format"
:
OptionInfo
(
'png'
,
'File format for grids'
),
"grid_extended_filename"
:
OptionInfo
(
False
,
"Add extended info (seed, prompt) to filename when saving grid"
),
"grid_only_if_multiple"
:
OptionInfo
(
True
,
"Do not save grids consisting of one picture"
),
"n_rows"
:
OptionInfo
(
-
1
,
"Grid row count; use -1 for autodetect and 0 for it to be same as batch size"
,
gr
.
Slider
,
{
"minimum"
:
-
1
,
"maximum"
:
16
,
"step"
:
1
}),
"jpeg_quality"
:
OptionInfo
(
80
,
"Quality for saved jpeg images"
,
gr
.
Slider
,
{
"minimum"
:
1
,
"maximum"
:
100
,
"step"
:
1
}),
"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"
),
...
...
@@ -876,7 +877,8 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
output_images
.
append
(
image
)
base_count
+=
1
if
(
p
.
prompt_matrix
or
opts
.
grid_save
)
and
not
p
.
do_not_save_grid
:
unwanted_grid_because_of_img_count
=
len
(
output_images
)
<
2
and
opts
.
grid_only_if_multiple
if
(
p
.
prompt_matrix
or
opts
.
grid_save
)
and
not
p
.
do_not_save_grid
and
not
unwanted_grid_because_of_img_count
:
if
p
.
prompt_matrix
:
grid
=
image_grid
(
output_images
,
p
.
batch_size
,
rows
=
1
<<
((
len
(
prompt_matrix_parts
)
-
1
)
//
2
))
...
...
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