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
e684202c
Commit
e684202c
authored
Aug 05, 2025
by
helloyongyang
Browse files
fix bug
parent
8e7490b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
lightx2v/infer.py
lightx2v/infer.py
+1
-1
lightx2v/utils/set_config.py
lightx2v/utils/set_config.py
+2
-2
No files found.
lightx2v/infer.py
View file @
e684202c
...
@@ -63,7 +63,7 @@ def main():
...
@@ -63,7 +63,7 @@ def main():
config
=
set_config
(
args
)
config
=
set_config
(
args
)
logger
.
info
(
f
"config:
\n
{
json
.
dumps
(
config
,
ensure_ascii
=
False
,
indent
=
4
)
}
"
)
logger
.
info
(
f
"config:
\n
{
json
.
dumps
(
config
,
ensure_ascii
=
False
,
indent
=
4
)
}
"
)
if
"
parallel
"
in
config
:
if
config
.
parallel
:
dist
.
init_process_group
(
backend
=
"nccl"
)
dist
.
init_process_group
(
backend
=
"nccl"
)
torch
.
cuda
.
set_device
(
dist
.
get_rank
())
torch
.
cuda
.
set_device
(
dist
.
get_rank
())
set_parallel_config
(
config
)
set_parallel_config
(
config
)
...
...
lightx2v/utils/set_config.py
View file @
e684202c
...
@@ -22,6 +22,8 @@ def get_default_config():
...
@@ -22,6 +22,8 @@ def get_default_config():
"mm_config"
:
{},
"mm_config"
:
{},
"use_prompt_enhancer"
:
False
,
"use_prompt_enhancer"
:
False
,
"parallel"
:
False
,
"parallel"
:
False
,
"seq_parallel"
:
False
,
"cfg_parallel"
:
False
,
"enable_cfg"
:
False
,
"enable_cfg"
:
False
,
}
}
return
default_config
return
default_config
...
@@ -65,8 +67,6 @@ def set_config(args):
...
@@ -65,8 +67,6 @@ def set_config(args):
def
set_parallel_config
(
config
):
def
set_parallel_config
(
config
):
config
[
"seq_parallel"
]
=
False
config
[
"cfg_parallel"
]
=
False
if
config
.
parallel
:
if
config
.
parallel
:
if
not
dist
.
is_initialized
():
if
not
dist
.
is_initialized
():
dist
.
init_process_group
(
backend
=
"nccl"
)
dist
.
init_process_group
(
backend
=
"nccl"
)
...
...
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