Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
7d7f7f4b
Commit
7d7f7f4b
authored
Jul 08, 2024
by
w-e-w
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sysinfo handle psutil not working
parent
bad47dcf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
11 deletions
+23
-11
modules/sysinfo.py
modules/sysinfo.py
+23
-11
No files found.
modules/sysinfo.py
View file @
7d7f7f4b
...
@@ -5,7 +5,6 @@ import sys
...
@@ -5,7 +5,6 @@ import sys
import
platform
import
platform
import
hashlib
import
hashlib
import
pkg_resources
import
pkg_resources
import
psutil
import
re
import
re
import
launch
import
launch
...
@@ -69,9 +68,27 @@ def check(x):
...
@@ -69,9 +68,27 @@ def check(x):
return
h
.
hexdigest
()
==
m
.
group
(
1
)
return
h
.
hexdigest
()
==
m
.
group
(
1
)
def
get_dict
():
def
get_cpu_info
():
ram
=
psutil
.
virtual_memory
()
cpu_info
=
{
"model"
:
platform
.
processor
()}
try
:
import
psutil
cpu_info
[
"count logical"
]
=
psutil
.
cpu_count
(
logical
=
True
)
cpu_info
[
"count physical"
]
=
psutil
.
cpu_count
(
logical
=
False
)
except
Exception
as
e
:
cpu_info
[
"error"
]
=
str
(
e
)
return
cpu_info
def
get_ram_info
():
try
:
import
psutil
ram
=
psutil
.
virtual_memory
()
return
{
x
:
pretty_bytes
(
getattr
(
ram
,
x
,
0
))
for
x
in
[
"total"
,
"used"
,
"free"
,
"active"
,
"inactive"
,
"buffers"
,
"cached"
,
"shared"
]
if
getattr
(
ram
,
x
,
0
)
!=
0
}
except
Exception
as
e
:
return
str
(
e
)
def
get_dict
():
res
=
{
res
=
{
"Platform"
:
platform
.
platform
(),
"Platform"
:
platform
.
platform
(),
"Python"
:
platform
.
python_version
(),
"Python"
:
platform
.
python_version
(),
...
@@ -84,14 +101,8 @@ def get_dict():
...
@@ -84,14 +101,8 @@ def get_dict():
"Commandline"
:
get_argv
(),
"Commandline"
:
get_argv
(),
"Torch env info"
:
get_torch_sysinfo
(),
"Torch env info"
:
get_torch_sysinfo
(),
"Exceptions"
:
errors
.
get_exceptions
(),
"Exceptions"
:
errors
.
get_exceptions
(),
"CPU"
:
{
"CPU"
:
get_cpu_info
(),
"model"
:
platform
.
processor
(),
"RAM"
:
get_ram_info
(),
"count logical"
:
psutil
.
cpu_count
(
logical
=
True
),
"count physical"
:
psutil
.
cpu_count
(
logical
=
False
),
},
"RAM"
:
{
x
:
pretty_bytes
(
getattr
(
ram
,
x
,
0
))
for
x
in
[
"total"
,
"used"
,
"free"
,
"active"
,
"inactive"
,
"buffers"
,
"cached"
,
"shared"
]
if
getattr
(
ram
,
x
,
0
)
!=
0
},
"Extensions"
:
get_extensions
(
enabled
=
True
),
"Extensions"
:
get_extensions
(
enabled
=
True
),
"Inactive extensions"
:
get_extensions
(
enabled
=
False
),
"Inactive extensions"
:
get_extensions
(
enabled
=
False
),
"Environment"
:
get_environment
(),
"Environment"
:
get_environment
(),
...
@@ -123,6 +134,7 @@ def get_argv():
...
@@ -123,6 +134,7 @@ def get_argv():
return
res
return
res
re_newline
=
re
.
compile
(
r"\r*\n"
)
re_newline
=
re
.
compile
(
r"\r*\n"
)
...
...
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