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
67be7eb8
Commit
67be7eb8
authored
Jul 22, 2023
by
comfyanonymous
Browse files
Nodes can now patch the unet function.
parent
12a6e931
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
comfy/samplers.py
comfy/samplers.py
+4
-1
No files found.
comfy/samplers.py
View file @
67be7eb8
...
@@ -248,7 +248,10 @@ def sampling_function(model_function, x, timestep, uncond, cond, cond_scale, con
...
@@ -248,7 +248,10 @@ def sampling_function(model_function, x, timestep, uncond, cond, cond_scale, con
c
[
'transformer_options'
]
=
transformer_options
c
[
'transformer_options'
]
=
transformer_options
output
=
model_function
(
input_x
,
timestep_
,
**
c
).
chunk
(
batch_chunks
)
if
'model_function_wrapper'
in
model_options
:
output
=
model_options
[
'model_function_wrapper'
](
model_function
,
{
"input"
:
input_x
,
"timestep"
:
timestep_
,
"c"
:
c
,
"cond_or_uncond"
:
cond_or_uncond
}).
chunk
(
batch_chunks
)
else
:
output
=
model_function
(
input_x
,
timestep_
,
**
c
).
chunk
(
batch_chunks
)
del
input_x
del
input_x
model_management
.
throw_exception_if_processing_interrupted
()
model_management
.
throw_exception_if_processing_interrupted
()
...
...
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