[Bugfix]: modify diffusion pipeline profiler result in videos (#2647)

Signed-off-by: bjf-frz <frz123db@gmail.com>
This commit is contained in:
bjf-frz authored and GitHub committed 2026-04-10 16:48:06 +08:00
1 parent c2ae58bb84
commit fbb5dd5794
6 files changed
+158 -30

No files matched your search

@@ -201,6 +201,14 @@ class VideoGenerationResponse(BaseModel):
created: int = Field(..., description="Unix timestamp of when the generation completed")
data: list[VideoData] = Field(..., description="Array of generated videos")
stage_durations: dict[str, float] = Field(
default_factory=dict,
description="Profiler stage durations reported by the diffusion pipeline.",
)
peak_memory_mb: float = Field(
default=0.0,
description="Peak device memory usage in MB reported by the diffusion pipeline.",
)
class VideoError(BaseModel):
@@ -250,6 +258,14 @@ class VideoResponse(BaseModel):
description="Filename of the saved output video files for this job.",
)
inference_time_s: float | None = Field(default=None, description="End-to-end inference time in seconds.")
stage_durations: dict[str, float] = Field(
default_factory=dict,
description="Profiler stage durations reported by the diffusion pipeline.",
)
peak_memory_mb: float = Field(
default=0.0,
description="Peak device memory usage in MB reported by the diffusion pipeline.",
)
@property
def file_extension(self) -> str: