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
be9c5e25
Commit
be9c5e25
authored
Aug 17, 2023
by
comfyanonymous
Browse files
Fix issue with not freeing enough memory when sampling.
parent
ac0758a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
comfy/sample.py
comfy/sample.py
+1
-1
No files found.
comfy/sample.py
View file @
be9c5e25
...
@@ -78,7 +78,7 @@ def sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative
...
@@ -78,7 +78,7 @@ def sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative
real_model
=
None
real_model
=
None
models
=
get_additional_models
(
positive
,
negative
)
models
=
get_additional_models
(
positive
,
negative
)
comfy
.
model_management
.
load_models_gpu
([
model
]
+
models
,
comfy
.
model_management
.
batch_area_memory
(
noise
.
shape
[
2
]
*
noise
.
shape
[
3
]))
comfy
.
model_management
.
load_models_gpu
([
model
]
+
models
,
comfy
.
model_management
.
batch_area_memory
(
noise
.
shape
[
0
]
*
noise
.
shape
[
2
]
*
noise
.
shape
[
3
]))
real_model
=
model
.
model
real_model
=
model
.
model
noise
=
noise
.
to
(
device
)
noise
=
noise
.
to
(
device
)
...
...
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