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
d57ff884
Commit
d57ff884
authored
Jul 09, 2024
by
Andray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not send image size on paste inpaint
parent
1da49079
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
modules/infotext_utils.py
modules/infotext_utils.py
+4
-3
No files found.
modules/infotext_utils.py
View file @
d57ff884
...
@@ -146,18 +146,19 @@ def connect_paste_params_buttons():
...
@@ -146,18 +146,19 @@ def connect_paste_params_buttons():
destination_height_component
=
next
(
iter
([
field
for
field
,
name
in
fields
if
name
==
"Size-2"
]
if
fields
else
[]),
None
)
destination_height_component
=
next
(
iter
([
field
for
field
,
name
in
fields
if
name
==
"Size-2"
]
if
fields
else
[]),
None
)
if
binding
.
source_image_component
and
destination_image_component
:
if
binding
.
source_image_component
and
destination_image_component
:
need_send_dementions
=
destination_width_component
and
binding
.
tabname
!=
'inpaint'
if
isinstance
(
binding
.
source_image_component
,
gr
.
Gallery
):
if
isinstance
(
binding
.
source_image_component
,
gr
.
Gallery
):
func
=
send_image_and_dimensions
if
destination_width_component
else
image_from_url_text
func
=
send_image_and_dimensions
if
need_send_dementions
else
image_from_url_text
jsfunc
=
"extract_image_from_gallery"
jsfunc
=
"extract_image_from_gallery"
else
:
else
:
func
=
send_image_and_dimensions
if
destination_width_component
else
lambda
x
:
x
func
=
send_image_and_dimensions
if
need_send_dementions
else
lambda
x
:
x
jsfunc
=
None
jsfunc
=
None
binding
.
paste_button
.
click
(
binding
.
paste_button
.
click
(
fn
=
func
,
fn
=
func
,
_js
=
jsfunc
,
_js
=
jsfunc
,
inputs
=
[
binding
.
source_image_component
],
inputs
=
[
binding
.
source_image_component
],
outputs
=
[
destination_image_component
,
destination_width_component
,
destination_height_component
]
if
destination_width_component
else
[
destination_image_component
],
outputs
=
[
destination_image_component
,
destination_width_component
,
destination_height_component
]
if
need_send_dementions
else
[
destination_image_component
],
show_progress
=
False
,
show_progress
=
False
,
)
)
...
...
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