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
9a7619b7
Commit
9a7619b7
authored
Dec 19, 2023
by
comfyanonymous
Browse files
Fix regression with inpaint model.
parent
571ea8cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
comfy/samplers.py
comfy/samplers.py
+3
-4
No files found.
comfy/samplers.py
View file @
9a7619b7
...
...
@@ -599,6 +599,9 @@ def sample(model, noise, positive, negative, cfg, device, sampler, sigmas, model
calculate_start_end_timesteps
(
model
,
negative
)
calculate_start_end_timesteps
(
model
,
positive
)
if
latent_image
is
not
None
:
latent_image
=
model
.
process_latent_in
(
latent_image
)
if
hasattr
(
model
,
'extra_conds'
):
positive
=
encode_model_conds
(
model
.
extra_conds
,
positive
,
noise
,
device
,
"positive"
,
latent_image
=
latent_image
,
denoise_mask
=
denoise_mask
)
negative
=
encode_model_conds
(
model
.
extra_conds
,
negative
,
noise
,
device
,
"negative"
,
latent_image
=
latent_image
,
denoise_mask
=
denoise_mask
)
...
...
@@ -614,10 +617,6 @@ def sample(model, noise, positive, negative, cfg, device, sampler, sigmas, model
apply_empty_x_to_equal_area
(
list
(
filter
(
lambda
c
:
c
.
get
(
'control_apply_to_uncond'
,
False
)
==
True
,
positive
)),
negative
,
'control'
,
lambda
cond_cnets
,
x
:
cond_cnets
[
x
])
apply_empty_x_to_equal_area
(
positive
,
negative
,
'gligen'
,
lambda
cond_cnets
,
x
:
cond_cnets
[
x
])
if
latent_image
is
not
None
:
latent_image
=
model
.
process_latent_in
(
latent_image
)
extra_args
=
{
"cond"
:
positive
,
"uncond"
:
negative
,
"cond_scale"
:
cfg
,
"model_options"
:
model_options
,
"seed"
:
seed
}
samples
=
sampler
.
sample
(
model_wrap
,
sigmas
,
extra_args
,
callback
,
noise
,
latent_image
,
denoise_mask
,
disable_pbar
)
...
...
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