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
f2a2657b
"vscode:/vscode.git/clone" did not exist on "6387051411db46f255f8025fa24af9b464cfdc2b"
Unverified
Commit
f2a2657b
authored
Nov 27, 2025
by
PengGao
Committed by
GitHub
Nov 27, 2025
Browse files
Add target_fps parameter to video task requests and update inference worker (#528)
parent
4c0a9a0d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
lightx2v/server/api/tasks/video.py
lightx2v/server/api/tasks/video.py
+2
-0
lightx2v/server/schema.py
lightx2v/server/schema.py
+2
-0
lightx2v/server/services/inference/worker.py
lightx2v/server/services/inference/worker.py
+5
-0
No files found.
lightx2v/server/api/tasks/video.py
View file @
f2a2657b
...
@@ -52,6 +52,7 @@ async def create_video_task_form(
...
@@ -52,6 +52,7 @@ async def create_video_task_form(
seed
:
int
=
Form
(
default
=
42
),
seed
:
int
=
Form
(
default
=
42
),
audio_file
:
UploadFile
=
File
(
None
),
audio_file
:
UploadFile
=
File
(
None
),
video_duration
:
int
=
Form
(
default
=
5
),
video_duration
:
int
=
Form
(
default
=
5
),
target_fps
:
int
=
Form
(
default
=
16
),
):
):
services
=
get_services
()
services
=
get_services
()
assert
services
.
file_service
is
not
None
,
"File service is not initialized"
assert
services
.
file_service
is
not
None
,
"File service is not initialized"
...
@@ -89,6 +90,7 @@ async def create_video_task_form(
...
@@ -89,6 +90,7 @@ async def create_video_task_form(
seed
=
seed
,
seed
=
seed
,
audio_path
=
audio_path
,
audio_path
=
audio_path
,
video_duration
=
video_duration
,
video_duration
=
video_duration
,
target_fps
=
target_fps
,
)
)
try
:
try
:
...
...
lightx2v/server/schema.py
View file @
f2a2657b
...
@@ -40,6 +40,7 @@ class VideoTaskRequest(BaseTaskRequest):
...
@@ -40,6 +40,7 @@ class VideoTaskRequest(BaseTaskRequest):
audio_path
:
str
=
Field
(
""
,
description
=
"Input audio path (Wan-Audio)"
)
audio_path
:
str
=
Field
(
""
,
description
=
"Input audio path (Wan-Audio)"
)
video_duration
:
int
=
Field
(
5
,
description
=
"Video duration (Wan-Audio)"
)
video_duration
:
int
=
Field
(
5
,
description
=
"Video duration (Wan-Audio)"
)
talk_objects
:
Optional
[
list
[
TalkObject
]]
=
Field
(
None
,
description
=
"Talk objects (Wan-Audio)"
)
talk_objects
:
Optional
[
list
[
TalkObject
]]
=
Field
(
None
,
description
=
"Talk objects (Wan-Audio)"
)
target_fps
:
Optional
[
int
]
=
Field
(
16
,
description
=
"Target FPS for video frame interpolation (overrides config)"
)
class
ImageTaskRequest
(
BaseTaskRequest
):
class
ImageTaskRequest
(
BaseTaskRequest
):
...
@@ -53,6 +54,7 @@ class TaskRequest(BaseTaskRequest):
...
@@ -53,6 +54,7 @@ class TaskRequest(BaseTaskRequest):
video_duration
:
int
=
Field
(
5
,
description
=
"Video duration (Wan-Audio)"
)
video_duration
:
int
=
Field
(
5
,
description
=
"Video duration (Wan-Audio)"
)
talk_objects
:
Optional
[
list
[
TalkObject
]]
=
Field
(
None
,
description
=
"Talk objects (Wan-Audio)"
)
talk_objects
:
Optional
[
list
[
TalkObject
]]
=
Field
(
None
,
description
=
"Talk objects (Wan-Audio)"
)
aspect_ratio
:
str
=
Field
(
"16:9"
,
description
=
"Output aspect ratio (T2I only)"
)
aspect_ratio
:
str
=
Field
(
"16:9"
,
description
=
"Output aspect ratio (T2I only)"
)
target_fps
:
Optional
[
int
]
=
Field
(
16
,
description
=
"Target FPS for video frame interpolation (overrides config)"
)
class
TaskStatusMessage
(
BaseModel
):
class
TaskStatusMessage
(
BaseModel
):
...
...
lightx2v/server/services/inference/worker.py
View file @
f2a2657b
...
@@ -55,6 +55,11 @@ class TorchrunInferenceWorker:
...
@@ -55,6 +55,11 @@ class TorchrunInferenceWorker:
task_data
[
"return_result_tensor"
]
=
False
task_data
[
"return_result_tensor"
]
=
False
task_data
[
"negative_prompt"
]
=
task_data
.
get
(
"negative_prompt"
,
""
)
task_data
[
"negative_prompt"
]
=
task_data
.
get
(
"negative_prompt"
,
""
)
if
task_data
.
get
(
"target_fps"
)
is
not
None
and
"video_frame_interpolation"
in
self
.
runner
.
config
:
task_data
[
"video_frame_interpolation"
]
=
dict
(
self
.
runner
.
config
[
"video_frame_interpolation"
])
task_data
[
"video_frame_interpolation"
][
"target_fps"
]
=
task_data
[
"target_fps"
]
del
task_data
[
"target_fps"
]
task_data
=
EasyDict
(
task_data
)
task_data
=
EasyDict
(
task_data
)
input_info
=
set_input_info
(
task_data
)
input_info
=
set_input_info
(
task_data
)
...
...
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