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
xuwx1
LightX2V
Commits
58f84489
Unverified
Commit
58f84489
authored
Dec 03, 2025
by
PengGao
Committed by
GitHub
Dec 03, 2025
Browse files
Enhance inference worker to support parallel configuration setup (#556)
Co-authored-by:
helloyongyang
<
yongyang1030@163.com
>
parent
1d1608b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
lightx2v/server/services/inference/worker.py
lightx2v/server/services/inference/worker.py
+6
-3
No files found.
lightx2v/server/services/inference/worker.py
View file @
58f84489
import
asyncio
import
json
import
os
from
typing
import
Any
,
Dict
...
...
@@ -9,7 +8,7 @@ from loguru import logger
from
lightx2v.infer
import
init_runner
from
lightx2v.utils.input_info
import
set_input_info
from
lightx2v.utils.set_config
import
set_config
from
lightx2v.utils.set_config
import
set_config
,
set_parallel_config
from
..distributed_utils
import
DistributedManager
...
...
@@ -34,8 +33,12 @@ class TorchrunInferenceWorker:
self
.
dist_manager
.
is_initialized
=
False
config
=
set_config
(
args
)
if
config
[
"parallel"
]:
set_parallel_config
(
config
)
if
self
.
rank
==
0
:
logger
.
info
(
f
"Config:
\n
{
json
.
dumps
(
config
,
ensure_ascii
=
False
,
indent
=
4
)
}
"
)
logger
.
info
(
f
"Config:
\n
{
config
}
"
)
self
.
runner
=
init_runner
(
config
)
logger
.
info
(
f
"Rank
{
self
.
rank
}
/
{
self
.
world_size
-
1
}
initialization completed"
)
...
...
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