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
48426398
Commit
48426398
authored
May 23, 2025
by
Xinchi Huang
Committed by
GitHub
May 23, 2025
Browse files
async infer.py (#51)
Co-authored-by:
“de1star”
<
“843414674@qq.com”
>
parent
a852f879
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
lightx2v/infer.py
lightx2v/infer.py
+7
-2
No files found.
lightx2v/infer.py
View file @
48426398
import
asyncio
import
argparse
import
argparse
import
torch
import
torch
import
torch.distributed
as
dist
import
torch.distributed
as
dist
...
@@ -33,7 +34,7 @@ def init_runner(config):
...
@@ -33,7 +34,7 @@ def init_runner(config):
return
runner
return
runner
if
__name__
==
"__
main
__"
:
async
def
main
()
:
parser
=
argparse
.
ArgumentParser
()
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"--model_cls"
,
type
=
str
,
required
=
True
,
choices
=
[
"wan2.1"
,
"hunyuan"
,
"wan2.1_causvid"
,
"wan2.1_skyreels_v2_df"
],
default
=
"hunyuan"
)
parser
.
add_argument
(
"--model_cls"
,
type
=
str
,
required
=
True
,
choices
=
[
"wan2.1"
,
"hunyuan"
,
"wan2.1_causvid"
,
"wan2.1_skyreels_v2_df"
],
default
=
"hunyuan"
)
parser
.
add_argument
(
"--task"
,
type
=
str
,
choices
=
[
"t2v"
,
"i2v"
],
default
=
"t2v"
)
parser
.
add_argument
(
"--task"
,
type
=
str
,
choices
=
[
"t2v"
,
"i2v"
],
default
=
"t2v"
)
...
@@ -54,4 +55,8 @@ if __name__ == "__main__":
...
@@ -54,4 +55,8 @@ if __name__ == "__main__":
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
)
}
"
)
runner
=
init_runner
(
config
)
runner
=
init_runner
(
config
)
runner
.
run_pipeline
()
await
runner
.
run_pipeline
()
if
__name__
==
"__main__"
:
asyncio
.
run
(
main
())
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