Unverified Commit 8530a2fb authored by PengGao's avatar PengGao Committed by GitHub
Browse files

Refactor target_fps handling in TorchrunInferenceWorker (#580)

parent bc2828b0
......@@ -61,10 +61,13 @@ class TorchrunInferenceWorker:
task_data["return_result_tensor"] = False
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"]
target_fps = task_data.pop("target_fps", None)
if target_fps is not None:
vfi_cfg = self.runner.config.get("video_frame_interpolation")
if vfi_cfg:
task_data["video_frame_interpolation"] = {**vfi_cfg, "target_fps": target_fps}
else:
logger.warning(f"Target FPS {target_fps} is set, but video frame interpolation is not configured")
task_data = EasyDict(task_data)
input_info = set_input_info(task_data)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment