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
caddef8d
"examples/trials/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "134368fa745380fca5559c4c62d6aeda573e77c3"
Commit
caddef8d
authored
Mar 04, 2024
by
comfyanonymous
Browse files
Auto disable cuda malloc on unsupported GPUs on Linux.
parent
478f71a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
cuda_malloc.py
cuda_malloc.py
+7
-1
No files found.
cuda_malloc.py
View file @
caddef8d
import
os
import
os
import
importlib.util
import
importlib.util
from
comfy.cli_args
import
args
from
comfy.cli_args
import
args
import
subprocess
#Can't use pytorch to get the GPU names because the cuda malloc has to be set before the first import.
#Can't use pytorch to get the GPU names because the cuda malloc has to be set before the first import.
def
get_gpu_names
():
def
get_gpu_names
():
...
@@ -34,7 +35,12 @@ def get_gpu_names():
...
@@ -34,7 +35,12 @@ def get_gpu_names():
return
gpu_names
return
gpu_names
return
enum_display_devices
()
return
enum_display_devices
()
else
:
else
:
return
set
()
gpu_names
=
set
()
out
=
subprocess
.
check_output
([
'nvidia-smi'
,
'-L'
])
for
l
in
out
.
split
(
b
'
\n
'
):
if
len
(
l
)
>
0
:
gpu_names
.
add
(
l
.
decode
(
'utf-8'
).
split
(
' (UUID'
)[
0
])
return
gpu_names
blacklist
=
{
"GeForce GTX TITAN X"
,
"GeForce GTX 980"
,
"GeForce GTX 970"
,
"GeForce GTX 960"
,
"GeForce GTX 950"
,
"GeForce 945M"
,
blacklist
=
{
"GeForce GTX TITAN X"
,
"GeForce GTX 980"
,
"GeForce GTX 970"
,
"GeForce GTX 960"
,
"GeForce GTX 950"
,
"GeForce 945M"
,
"GeForce 940M"
,
"GeForce 930M"
,
"GeForce 920M"
,
"GeForce 910M"
,
"GeForce GTX 750"
,
"GeForce GTX 745"
,
"Quadro K620"
,
"GeForce 940M"
,
"GeForce 930M"
,
"GeForce 920M"
,
"GeForce 910M"
,
"GeForce GTX 750"
,
"GeForce GTX 745"
,
"Quadro K620"
,
...
...
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