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
7bc5739f
Commit
7bc5739f
authored
Sep 17, 2022
by
Brian Drupieski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set loopback color corrections on each iteration
parent
663af7c1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
modules/processing.py
modules/processing.py
+2
-0
scripts/batch.py
scripts/batch.py
+1
-4
scripts/loopback.py
scripts/loopback.py
+2
-2
No files found.
modules/processing.py
View file @
7bc5739f
...
...
@@ -339,6 +339,8 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
state
.
nextjob
()
p
.
color_corrections
=
None
unwanted_grid_because_of_img_count
=
len
(
output_images
)
<
2
and
opts
.
grid_only_if_multiple
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
)
...
...
scripts/batch.py
View file @
7bc5739f
...
...
@@ -6,7 +6,7 @@ import traceback
import
modules.scripts
as
scripts
import
gradio
as
gr
from
modules.processing
import
Processed
,
process_images
,
setup_color_correction
from
modules.processing
import
Processed
,
process_images
from
PIL
import
Image
from
modules.shared
import
opts
,
cmd_opts
,
state
...
...
@@ -52,9 +52,6 @@ class Script(scripts.Script):
state
.
job
=
f
"{batch_no} out of {batch_count}: {batch_images[0][1]}"
p
.
init_images
=
[
x
[
0
]
for
x
in
batch_images
]
if
opts
.
img2img_color_correction
:
p
.
color_corrections
=
[
setup_color_correction
(
i
)
for
i
in
p
.
init_images
]
proc
=
process_images
(
p
)
for
image
,
(
_
,
path
)
in
zip
(
proc
.
images
,
batch_images
):
filename
=
os
.
path
.
basename
(
path
)
...
...
scripts/loopback.py
View file @
7bc5739f
...
...
@@ -40,8 +40,7 @@ class Script(scripts.Script):
all_images
=
[]
state
.
job_count
=
loops
*
batch_count
if
opts
.
img2img_color_correction
:
p
.
color_corrections
=
[
processing
.
setup_color_correction
(
p
.
init_images
[
0
])]
initial_color_corrections
=
[
processing
.
setup_color_correction
(
p
.
init_images
[
0
])]
for
n
in
range
(
batch_count
):
history
=
[]
...
...
@@ -50,6 +49,7 @@ class Script(scripts.Script):
p
.
n_iter
=
1
p
.
batch_size
=
1
p
.
do_not_save_grid
=
True
p
.
color_corrections
=
initial_color_corrections
state
.
job
=
f
"Iteration {i + 1}/{loops}, batch {n + 1}/{batch_count}"
...
...
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