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
6bea45d4
Commit
6bea45d4
authored
Sep 14, 2022
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prevent making grid if there is no need for it #428
parent
21f2a706
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
modules/processing.py
modules/processing.py
+3
-5
No files found.
modules/processing.py
View file @
6bea45d4
...
...
@@ -312,16 +312,14 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
state
.
nextjob
()
unwanted_grid_because_of_img_count
=
len
(
output_images
)
<
2
and
opts
.
grid_only_if_multiple
if
not
p
.
do_not_save_grid
and
not
unwanted_grid_because_of_img_count
:
return_grid
=
opts
.
return_grid
if
(
opts
.
return_grid
or
opts
.
grid_save
)
and
not
p
.
do_not_save_grid
and
not
unwanted_grid_because_of_img_count
:
grid
=
images
.
image_grid
(
output_images
,
p
.
batch_size
)
if
return_grid
:
if
opts
.
return_grid
:
output_images
.
insert
(
0
,
grid
)
if
opts
.
grid_save
:
images
.
save_image
(
grid
,
p
.
outpath_grids
,
"grid"
,
all_seeds
[
0
],
all_prompts
[
0
],
opts
.
grid_format
,
info
=
infotext
(),
short_filename
=
not
opts
.
grid_extended_filename
,
grid
=
True
,
p
=
p
)
images
.
save_image
(
grid
,
p
.
outpath_grids
,
"grid"
,
all_seeds
[
0
],
all_prompts
[
0
],
opts
.
grid_format
,
info
=
infotext
(),
short_filename
=
not
opts
.
grid_extended_filename
,
p
=
p
)
devices
.
torch_gc
()
return
Processed
(
p
,
output_images
,
all_seeds
[
0
],
infotext
())
...
...
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