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
81105ee0
Commit
81105ee0
authored
Dec 04, 2023
by
AUTOMATIC1111
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
repair old handler for postprocessing API in a way that doesn't break interface
parent
24dae9bc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
modules/postprocessing.py
modules/postprocessing.py
+6
-2
modules/ui_postprocessing.py
modules/ui_postprocessing.py
+1
-1
No files found.
modules/postprocessing.py
View file @
81105ee0
...
...
@@ -6,7 +6,7 @@ from modules import shared, images, devices, scripts, scripts_postprocessing, ui
from
modules.shared
import
opts
def
run_postprocessing
(
id_task
,
extras_mode
,
image
,
image_folder
,
input_dir
,
output_dir
,
show_extras_results
,
*
args
,
save_output
:
bool
=
True
):
def
run_postprocessing
(
extras_mode
,
image
,
image_folder
,
input_dir
,
output_dir
,
show_extras_results
,
*
args
,
save_output
:
bool
=
True
):
devices
.
torch_gc
()
shared
.
state
.
begin
(
job
=
"extras"
)
...
...
@@ -128,6 +128,10 @@ def run_postprocessing(id_task, extras_mode, image, image_folder, input_dir, out
return
outputs
,
ui_common
.
plaintext_to_html
(
infotext
),
''
def
run_postprocessing_webui
(
id_task
,
*
args
,
**
kwargs
):
return
run_postprocessing
(
*
args
,
**
kwargs
)
def
run_extras
(
extras_mode
,
resize_mode
,
image
,
image_folder
,
input_dir
,
output_dir
,
show_extras_results
,
gfpgan_visibility
,
codeformer_visibility
,
codeformer_weight
,
upscaling_resize
,
upscaling_resize_w
,
upscaling_resize_h
,
upscaling_crop
,
extras_upscaler_1
,
extras_upscaler_2
,
extras_upscaler_2_visibility
,
upscale_first
:
bool
,
save_output
:
bool
=
True
):
"""old handler for API"""
...
...
@@ -153,4 +157,4 @@ def run_extras(extras_mode, resize_mode, image, image_folder, input_dir, output_
},
})
return
run_postprocessing
(
""
,
extras_mode
,
image
,
image_folder
,
input_dir
,
output_dir
,
show_extras_results
,
*
args
,
save_output
=
save_output
)
return
run_postprocessing
(
extras_mode
,
image
,
image_folder
,
input_dir
,
output_dir
,
show_extras_results
,
*
args
,
save_output
=
save_output
)
modules/ui_postprocessing.py
View file @
81105ee0
...
...
@@ -35,7 +35,7 @@ def create_ui():
tab_batch_dir
.
select
(
fn
=
lambda
:
2
,
inputs
=
[],
outputs
=
[
tab_index
])
submit
.
click
(
fn
=
call_queue
.
wrap_gradio_gpu_call
(
postprocessing
.
run_postprocessing
,
extra_outputs
=
[
None
,
''
]),
fn
=
call_queue
.
wrap_gradio_gpu_call
(
postprocessing
.
run_postprocessing
_webui
,
extra_outputs
=
[
None
,
''
]),
_js
=
"submit_extras"
,
inputs
=
[
dummy_component
,
...
...
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