Merge remote-tracking branch 'origin/main' into dev/vllm-align
This commit is contained in:
commit
22b6703773
44 files changed
+628
-38
No files matched your search
@@ -351,6 +351,13 @@ class OmniServeCommand(CLISubcommand):
|
||||
default=None,
|
||||
help="Maximum length for TTS voice style instructions (overrides stage config, default: 500).",
|
||||
)
|
||||
|
||||
# Enable diffusion pipeline profiling
|
||||
omni_config_group.add_argument(
|
||||
"--enable-diffusion-pipeline-profiler",
|
||||
action="store_true",
|
||||
help="Enable diffusion pipeline profiler to display stage durations.",
|
||||
)
|
||||
return serve_parser
|
||||
|
||||
|
||||
|
||||
@@ -243,6 +243,7 @@ class OmniBase:
|
||||
) -> OmniRequestOutput | None:
|
||||
req_id = result.get("request_id")
|
||||
engine_outputs = result.get("engine_outputs")
|
||||
stage_durations = getattr(result["engine_outputs"], "stage_durations", {})
|
||||
finished = engine_outputs.finished
|
||||
|
||||
submit_ts = result.get("stage_submit_ts")
|
||||
@@ -276,6 +277,7 @@ class OmniBase:
|
||||
final_output_type=stage_meta["final_output_type"],
|
||||
request_output=engine_outputs,
|
||||
images=images,
|
||||
stage_durations=stage_durations,
|
||||
)
|
||||
|
||||
def shutdown(self) -> None:
|
||||
|
||||
@@ -1908,6 +1908,9 @@ class OmniOpenAIServingChat(OpenAIServingChat, AudioMixin):
|
||||
choices: list[ChatCompletionResponseChoice] = []
|
||||
final_res = omni_outputs.request_output
|
||||
|
||||
# Handle profiling data
|
||||
stage_durations = omni_outputs.stage_durations
|
||||
|
||||
# Handle different image output formats
|
||||
images = []
|
||||
|
||||
@@ -1961,6 +1964,7 @@ class OmniOpenAIServingChat(OpenAIServingChat, AudioMixin):
|
||||
"image_url": {
|
||||
"url": f"data:image/png;base64,{img_base64}",
|
||||
},
|
||||
"stage_durations": stage_durations,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -2162,6 +2166,7 @@ class OmniOpenAIServingChat(OpenAIServingChat, AudioMixin):
|
||||
# Extract images from result
|
||||
# Handle nested OmniRequestOutput structure where images might be in request_output
|
||||
images = getattr(result.request_output, "images", [])
|
||||
stage_durations = result.stage_durations
|
||||
|
||||
# Convert images to base64 content
|
||||
image_contents: list[dict[str, Any]] = []
|
||||
@@ -2176,6 +2181,7 @@ class OmniOpenAIServingChat(OpenAIServingChat, AudioMixin):
|
||||
"image_url": {
|
||||
"url": f"data:image/png;base64,{img_base64}",
|
||||
},
|
||||
"stage_durations": stage_durations,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user