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
61f48830
Commit
61f48830
authored
Mar 20, 2024
by
Art Gourieff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIX: Allow PNG-RGBA for Extras Tab
parent
bef51aed
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
modules/postprocessing.py
modules/postprocessing.py
+1
-1
modules/ui_postprocessing.py
modules/ui_postprocessing.py
+1
-1
scripts/postprocessing_codeformer.py
scripts/postprocessing_codeformer.py
+1
-1
scripts/postprocessing_gfpgan.py
scripts/postprocessing_gfpgan.py
+1
-1
No files found.
modules/postprocessing.py
View file @
61f48830
...
...
@@ -66,7 +66,7 @@ def run_postprocessing(extras_mode, image, image_folder, input_dir, output_dir,
if
parameters
:
existing_pnginfo
[
"parameters"
]
=
parameters
initial_pp
=
scripts_postprocessing
.
PostprocessedImage
(
image_data
.
convert
(
"RGB"
)
)
initial_pp
=
scripts_postprocessing
.
PostprocessedImage
(
image_data
)
scripts
.
scripts_postproc
.
run
(
initial_pp
,
args
)
...
...
modules/ui_postprocessing.py
View file @
61f48830
...
...
@@ -12,7 +12,7 @@ def create_ui():
with
gr
.
Column
(
variant
=
'compact'
):
with
gr
.
Tabs
(
elem_id
=
"mode_extras"
):
with
gr
.
TabItem
(
'Single Image'
,
id
=
"single_image"
,
elem_id
=
"extras_single_tab"
)
as
tab_single
:
extras_image
=
gr
.
Image
(
label
=
"Source"
,
source
=
"upload"
,
interactive
=
True
,
type
=
"pil"
,
elem_id
=
"extras_image"
)
extras_image
=
gr
.
Image
(
label
=
"Source"
,
source
=
"upload"
,
interactive
=
True
,
type
=
"pil"
,
elem_id
=
"extras_image"
,
image_mode
=
"RGBA"
)
with
gr
.
TabItem
(
'Batch Process'
,
id
=
"batch_process"
,
elem_id
=
"extras_batch_process_tab"
)
as
tab_batch
:
image_batch
=
gr
.
Files
(
label
=
"Batch Process"
,
interactive
=
True
,
elem_id
=
"extras_image_batch"
)
...
...
scripts/postprocessing_codeformer.py
View file @
61f48830
...
...
@@ -25,7 +25,7 @@ class ScriptPostprocessingCodeFormer(scripts_postprocessing.ScriptPostprocessing
if
codeformer_visibility
==
0
or
not
enable
:
return
restored_img
=
codeformer_model
.
codeformer
.
restore
(
np
.
array
(
pp
.
image
,
dtype
=
np
.
uint8
),
w
=
codeformer_weight
)
restored_img
=
codeformer_model
.
codeformer
.
restore
(
np
.
array
(
pp
.
image
.
convert
(
"RGB"
)
,
dtype
=
np
.
uint8
),
w
=
codeformer_weight
)
res
=
Image
.
fromarray
(
restored_img
)
if
codeformer_visibility
<
1.0
:
...
...
scripts/postprocessing_gfpgan.py
View file @
61f48830
...
...
@@ -22,7 +22,7 @@ class ScriptPostprocessingGfpGan(scripts_postprocessing.ScriptPostprocessing):
if
gfpgan_visibility
==
0
or
not
enable
:
return
restored_img
=
gfpgan_model
.
gfpgan_fix_faces
(
np
.
array
(
pp
.
image
,
dtype
=
np
.
uint8
))
restored_img
=
gfpgan_model
.
gfpgan_fix_faces
(
np
.
array
(
pp
.
image
.
convert
(
"RGB"
)
,
dtype
=
np
.
uint8
))
res
=
Image
.
fromarray
(
restored_img
)
if
gfpgan_visibility
<
1.0
:
...
...
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