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
40f4d3ed
Commit
40f4d3ed
authored
Sep 12, 2022
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEATURE] Save both images, (Skip_Save optional). #265
parent
a26f157a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
modules/processing.py
modules/processing.py
+4
-0
modules/shared.py
modules/shared.py
+1
-0
No files found.
modules/processing.py
View file @
40f4d3ed
...
...
@@ -254,12 +254,16 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
x_sample
=
x_sample
.
astype
(
np
.
uint8
)
if
p
.
restore_faces
:
if
opts
.
save
and
not
p
.
do_not_save_samples
and
opts
.
save_images_before_face_restoration
:
images
.
save_image
(
Image
.
fromarray
(
x_sample
),
p
.
outpath_samples
,
""
,
seeds
[
i
],
prompts
[
i
],
opts
.
samples_format
,
info
=
infotext
(
n
,
i
),
p
=
p
)
devices
.
torch_gc
()
x_sample
=
modules
.
face_restoration
.
restore_faces
(
x_sample
)
image
=
Image
.
fromarray
(
x_sample
)
if
p
.
overlay_images
is
not
None
and
i
<
len
(
p
.
overlay_images
):
overlay
=
p
.
overlay_images
[
i
]
...
...
modules/shared.py
View file @
40f4d3ed
...
...
@@ -132,6 +132,7 @@ class Options:
"multiple_tqdm"
:
OptionInfo
(
True
,
"Add a second progress bar to the console that shows progress for an entire job. Broken in PyCharm console."
),
"face_restoration_model"
:
OptionInfo
(
None
,
"Face restoration model"
,
gr
.
Radio
,
lambda
:
{
"choices"
:
[
x
.
name
()
for
x
in
face_restorers
]}),
"code_former_weight"
:
OptionInfo
(
0.5
,
"CodeFormer weight parameter; 0 = maximum effect; 1 = minimum effect"
,
gr
.
Slider
,
{
"minimum"
:
0
,
"maximum"
:
1
,
"step"
:
0.01
}),
"save_images_before_face_restoration"
:
OptionInfo
(
False
,
"Save a copy of image before doing face restoration."
),
"interrogate_keep_models_in_memory"
:
OptionInfo
(
False
,
"Interrogate: keep models in VRAM"
),
"interrogate_use_builtin_artists"
:
OptionInfo
(
True
,
"Interrogate: use artists from artists.csv"
),
"interrogate_clip_num_beams"
:
OptionInfo
(
1
,
"Interrogate: num_beams for BLIP"
,
gr
.
Slider
,
{
"minimum"
:
1
,
"maximum"
:
16
,
"step"
:
1
}),
...
...
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