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
96b57a9a
"lightx2v/git@developer.sourcefind.cn:Wenxuan/LightX2V.git" did not exist on "ae1125688a4e23dde97bdd0ddc17870b65a2019e"
Commit
96b57a9a
authored
Apr 19, 2023
by
comfyanonymous
Browse files
Don't pass adm to model when it doesn't support it.
parent
2d546d51
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
comfy/samplers.py
comfy/samplers.py
+3
-3
No files found.
comfy/samplers.py
View file @
96b57a9a
...
@@ -36,8 +36,8 @@ def sampling_function(model_function, x, timestep, uncond, cond, cond_scale, con
...
@@ -36,8 +36,8 @@ def sampling_function(model_function, x, timestep, uncond, cond, cond_scale, con
strength
=
cond
[
1
][
'strength'
]
strength
=
cond
[
1
][
'strength'
]
adm_cond
=
None
adm_cond
=
None
if
'adm'
in
cond
[
1
]:
if
'adm
_encoded
'
in
cond
[
1
]:
adm_cond
=
cond
[
1
][
'adm'
]
adm_cond
=
cond
[
1
][
'adm
_encoded
'
]
input_x
=
x_in
[:,:,
area
[
2
]:
area
[
0
]
+
area
[
2
],
area
[
3
]:
area
[
1
]
+
area
[
3
]]
input_x
=
x_in
[:,:,
area
[
2
]:
area
[
0
]
+
area
[
2
],
area
[
3
]:
area
[
1
]
+
area
[
3
]]
mult
=
torch
.
ones_like
(
input_x
)
*
strength
mult
=
torch
.
ones_like
(
input_x
)
*
strength
...
@@ -405,7 +405,7 @@ def encode_adm(noise_augmentor, conds, batch_size, device):
...
@@ -405,7 +405,7 @@ def encode_adm(noise_augmentor, conds, batch_size, device):
else
:
else
:
adm_out
=
torch
.
zeros
((
1
,
noise_augmentor
.
time_embed
.
dim
*
2
),
device
=
device
)
adm_out
=
torch
.
zeros
((
1
,
noise_augmentor
.
time_embed
.
dim
*
2
),
device
=
device
)
x
[
1
]
=
x
[
1
].
copy
()
x
[
1
]
=
x
[
1
].
copy
()
x
[
1
][
"adm"
]
=
torch
.
cat
([
adm_out
]
*
batch_size
)
x
[
1
][
"adm
_encoded
"
]
=
torch
.
cat
([
adm_out
]
*
batch_size
)
return
conds
return
conds
...
...
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