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
2be27427
"git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "7ee76192f0b8853ab883e1a2fe5e33ac785db90c"
Commit
2be27427
authored
Aug 17, 2023
by
comfyanonymous
Browse files
Fix issue with regular torch version.
parent
89a0767a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
comfy/model_management.py
comfy/model_management.py
+5
-1
No files found.
comfy/model_management.py
View file @
2be27427
...
@@ -390,7 +390,11 @@ def unet_inital_load_device(parameters, dtype):
...
@@ -390,7 +390,11 @@ def unet_inital_load_device(parameters, dtype):
return
torch_dev
return
torch_dev
cpu_dev
=
torch
.
device
(
"cpu"
)
cpu_dev
=
torch
.
device
(
"cpu"
)
model_size
=
dtype
.
itemsize
*
parameters
dtype_size
=
4
if
dtype
==
torch
.
float16
or
dtype
==
torch
.
bfloat16
:
dtype_size
=
2
model_size
=
dtype_size
*
parameters
mem_dev
=
get_free_memory
(
torch_dev
)
mem_dev
=
get_free_memory
(
torch_dev
)
mem_cpu
=
get_free_memory
(
cpu_dev
)
mem_cpu
=
get_free_memory
(
cpu_dev
)
...
...
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