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
c5f9f7c2
Commit
c5f9f7c2
authored
Mar 25, 2023
by
space-nuko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use .success() callback on img2img preview inputs change
parent
75e7eb91
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
262 additions
and
526 deletions
+262
-526
javascript/ui.js
javascript/ui.js
+0
-8
modules/ui.py
modules/ui.py
+3
-5
style.css
style.css
+259
-513
No files found.
javascript/ui.js
View file @
c5f9f7c2
...
...
@@ -118,14 +118,6 @@ function get_img2img_tab_index_for_res_preview() {
return
res
}
function
get_img2img_tab_index_for_res_preview
()
{
let
res
=
args_to_array
(
arguments
)
res
.
splice
(
-
1
)
// gradio also sends outputs to the arguments, pop them off
res
[
0
]
=
get_tab_index
(
'
mode_img2img
'
)
debugger
;
return
res
}
function
create_submit_args
(
args
){
res
=
[]
for
(
var
i
=
0
;
i
<
args
.
length
;
i
++
){
...
...
modules/ui.py
View file @
c5f9f7c2
...
...
@@ -855,7 +855,7 @@ def create_ui():
img2img_resolution_preview_inputs
=
[
dummy_component
,
# filled in by selected img2img tab index in _js
scale
,
width
,
height
,
resize_mode
,
init_img
,
sketch
,
init_img_with_mask
,
inpaint_color_sketch
,
init_img_inpaint
]
for
input
in
img2img_resolution_preview_inputs
:
for
input
in
img2img_resolution_preview_inputs
[
1
:]
:
if
isinstance
(
input
,
Releaseable
):
input
.
release
(
fn
=
calc_resolution_img2img
,
...
...
@@ -863,8 +863,7 @@ def create_ui():
inputs
=
img2img_resolution_preview_inputs
,
outputs
=
[
final_resolution
],
show_progress
=
False
,
)
input
.
release
(
)
.
success
(
None
,
_js
=
"onCalcResolutionImg2Img"
,
inputs
=
img2img_resolution_preview_inputs
,
...
...
@@ -878,8 +877,7 @@ def create_ui():
inputs
=
img2img_resolution_preview_inputs
,
outputs
=
[
final_resolution
],
show_progress
=
False
,
)
input
.
change
(
)
.
success
(
None
,
_js
=
"onCalcResolutionImg2Img"
,
inputs
=
img2img_resolution_preview_inputs
,
...
...
style.css
View file @
c5f9f7c2
This diff is collapsed.
Click to expand it.
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