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
00425563
"...testcase/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "1ee97350ca8a19bb3d780dea3a80135ee417a578"
Commit
00425563
authored
Mar 01, 2024
by
comfyanonymous
Browse files
Cleanup: Use sampling noise scaling function for inpainting.
parent
c62e8361
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
comfy/samplers.py
comfy/samplers.py
+1
-1
No files found.
comfy/samplers.py
View file @
00425563
...
...
@@ -278,7 +278,7 @@ class KSamplerX0Inpaint(torch.nn.Module):
def
forward
(
self
,
x
,
sigma
,
uncond
,
cond
,
cond_scale
,
denoise_mask
,
model_options
=
{},
seed
=
None
):
if
denoise_mask
is
not
None
:
latent_mask
=
1.
-
denoise_mask
x
=
x
*
denoise_mask
+
(
self
.
latent_image
+
self
.
noise
*
sigma
.
reshape
([
sigma
.
shape
[
0
]]
+
[
1
]
*
(
len
(
self
.
noise
.
shape
)
-
1
)))
*
latent_mask
x
=
x
*
denoise_mask
+
self
.
inner_model
.
inner_model
.
model_sampling
.
noise_scaling
(
sigma
.
reshape
([
sigma
.
shape
[
0
]]
+
[
1
]
*
(
len
(
self
.
noise
.
shape
)
-
1
))
,
self
.
noise
,
self
.
latent_image
)
*
latent_mask
out
=
self
.
inner_model
(
x
,
sigma
,
cond
=
cond
,
uncond
=
uncond
,
cond_scale
=
cond_scale
,
model_options
=
model_options
,
seed
=
seed
)
if
denoise_mask
is
not
None
:
out
=
out
*
denoise_mask
+
self
.
latent_image
*
latent_mask
...
...
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