[REFACT]Refactor diffusion outputs to payload metadata (#4922)

Signed-off-by: bjf-frz <frz123db@gmail.com>
This commit is contained in:
bjf-frz authored and GitHub committed 2026-07-14 17:24:03 +08:00
1 parent 4b9d09cb87
commit 1a4a042a83
44 files changed
+1373 -478

No files matched your search

@@ -187,7 +187,7 @@ def get_wan22_post_process_func(
):
if output_type == "latent":
return video
custom_output = {}
video_metadata = {}
if sampling_params is not None and getattr(sampling_params, "enable_frame_interpolation", False):
video, multiplier = interpolate_video_tensor(
video,
@@ -195,10 +195,10 @@ def get_wan22_post_process_func(
scale=sampling_params.frame_interpolation_scale,
model_path=sampling_params.frame_interpolation_model_path,
)
custom_output["video_fps_multiplier"] = multiplier
video_metadata["video_fps_multiplier"] = multiplier
return {
"video": video_processor.postprocess_video(video, output_type=output_type),
"custom_output": custom_output,
"payload": {"video": video_processor.postprocess_video(video, output_type=output_type)},
"metadata": {"video": video_metadata} if video_metadata else {},
}
return post_process_func
@@ -65,7 +65,7 @@ def get_wan22_i2v_post_process_func(
):
if output_type == "latent":
return video
custom_output = {}
video_metadata = {}
if sampling_params is not None and getattr(sampling_params, "enable_frame_interpolation", False):
video, multiplier = interpolate_video_tensor(
video,
@@ -73,10 +73,10 @@ def get_wan22_i2v_post_process_func(
scale=sampling_params.frame_interpolation_scale,
model_path=sampling_params.frame_interpolation_model_path,
)
custom_output["video_fps_multiplier"] = multiplier
video_metadata["video_fps_multiplier"] = multiplier
return {
"video": video_processor.postprocess_video(video, output_type=output_type),
"custom_output": custom_output,
"payload": {"video": video_processor.postprocess_video(video, output_type=output_type)},
"metadata": {"video": video_metadata} if video_metadata else {},
}
return post_process_func