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
f67c0062
Commit
f67c0062
authored
Mar 22, 2023
by
comfyanonymous
Browse files
Use inference_mode instead of no_grad.
parent
4039616c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
execution.py
execution.py
+1
-1
No files found.
execution.py
View file @
f67c0062
...
@@ -143,7 +143,7 @@ class PromptExecutor:
...
@@ -143,7 +143,7 @@ class PromptExecutor:
else
:
else
:
self
.
server
.
client_id
=
None
self
.
server
.
client_id
=
None
with
torch
.
no_grad
():
with
torch
.
inference_mode
():
for
x
in
prompt
:
for
x
in
prompt
:
recursive_output_delete_if_changed
(
prompt
,
self
.
old_prompt
,
self
.
outputs
,
x
)
recursive_output_delete_if_changed
(
prompt
,
self
.
old_prompt
,
self
.
outputs
,
x
)
...
...
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