Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
bf1dc1d9
Commit
bf1dc1d9
authored
Mar 16, 2023
by
comfyanonymous
Browse files
Fix VAEEncodeForInpaint modifying source image.
parent
f11d5e07
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
nodes.py
nodes.py
+1
-0
No files found.
nodes.py
View file @
bf1dc1d9
...
@@ -189,6 +189,7 @@ class VAEEncodeForInpaint:
...
@@ -189,6 +189,7 @@ class VAEEncodeForInpaint:
y
=
(
pixels
.
shape
[
2
]
//
64
)
*
64
y
=
(
pixels
.
shape
[
2
]
//
64
)
*
64
mask
=
torch
.
nn
.
functional
.
interpolate
(
mask
[
None
,
None
,],
size
=
(
pixels
.
shape
[
1
],
pixels
.
shape
[
2
]),
mode
=
"bilinear"
)[
0
][
0
]
mask
=
torch
.
nn
.
functional
.
interpolate
(
mask
[
None
,
None
,],
size
=
(
pixels
.
shape
[
1
],
pixels
.
shape
[
2
]),
mode
=
"bilinear"
)[
0
][
0
]
pixels
=
pixels
.
clone
()
if
pixels
.
shape
[
1
]
!=
x
or
pixels
.
shape
[
2
]
!=
y
:
if
pixels
.
shape
[
1
]
!=
x
or
pixels
.
shape
[
2
]
!=
y
:
pixels
=
pixels
[:,:
x
,:
y
,:]
pixels
=
pixels
[:,:
x
,:
y
,:]
mask
=
mask
[:
x
,:
y
]
mask
=
mask
[:
x
,:
y
]
...
...
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