[Misc] Clean logs for image gen task (#3414)

Signed-off-by: wuhang <wuhang6@huawei.com>
This commit is contained in:
wuhang authored and GitHub committed 2026-05-11 12:16:05 +00:00
1 parent 3bf4f2850c
commit 3f27ffbd4d
7 files changed
+21 -19

No files matched your search

+4 -4
View File
@@ -147,7 +147,7 @@ class DiffusionEngine:
preprocess_start_time = time.perf_counter()
request = self.pre_process_func(request)
preprocess_time = time.perf_counter() - preprocess_start_time
logger.info(f"Pre-processing completed in {preprocess_time:.4f} seconds")
logger.debug("Pre-processing completed in %.4f seconds", preprocess_time)
exec_start_time = time.perf_counter()
output = await self.async_add_req_and_wait_for_response(request)
@@ -157,7 +157,7 @@ class DiffusionEngine:
raise DiffusionRequestAbortedError(output.abort_message or "Diffusion request aborted.")
if output.error:
raise RuntimeError(output.error)
logger.info("Generation completed successfully.")
logger.debug("Generation completed successfully.")
if output.output is None:
logger.warning("Output is None, returning empty OmniRequestOutput")
@@ -204,10 +204,10 @@ class DiffusionEngine:
model_fps = outputs.get("fps")
outputs = outputs.get("video", outputs)
postprocess_time = time.perf_counter() - postprocess_start_time
logger.info(f"Post-processing completed in {postprocess_time:.4f} seconds")
logger.debug("Post-processing completed in %.4f seconds", postprocess_time)
step_total_ms = (time.perf_counter() - diffusion_engine_start_time) * 1000
logger.info(
logger.debug(
"DiffusionEngine.step breakdown: preprocess=%.2f ms, "
"add_req_and_wait=%.2f ms, postprocess=%.2f ms, total=%.2f ms",
preprocess_time * 1000,
@@ -86,7 +86,7 @@ class InlineStageDiffusionClient:
sampling_params: OmniDiffusionSamplingParams,
kv_sender_info: dict[int, dict[str, Any]] | None = None,
) -> None:
logger.info(
logger.debug(
"[InlineStageDiffusionClient] stage-%s [rep-%s] add request: %s",
self.stage_id,
self.replica_id,
@@ -144,7 +144,7 @@ class InlineStageDiffusionClient:
sampling_params: OmniDiffusionSamplingParams,
kv_sender_info: dict[int, dict[str, Any]] | None = None,
) -> None:
logger.info(
logger.debug(
"[InlineStageDiffusionClient] stage-%s [rep-%s] add batch request: %s (%d prompts)",
self.stage_id,
self.replica_id,
@@ -536,8 +536,10 @@ class ZImagePipeline(nn.Module, DiffusionPipelineProfilerMixin):
image = PIL.Image.open(raw_image) if isinstance(raw_image, str) else raw_image
# strength is currently only applicable for Z-Image I2I; other pipelines ignore this parameter
strength = req.sampling_params.strength if req.sampling_params.strength is not None else strength
if strength is not None and image is None:
explicit_strength = req.sampling_params.strength is not None
if explicit_strength:
strength = req.sampling_params.strength
if explicit_strength and image is None:
logger.warning(
"strength parameter (%.2f) is only applicable for image-to-image (I2I) generation. "
"It will be ignored for text-to-image (T2I) generation.",
@@ -212,7 +212,7 @@ class DiffusionModelRunner(OmniConnectorModelRunnerMixin):
peak_allocated_gb = peak_allocated_bytes / (1024**3)
pool_overhead_gb = peak_reserved_gb - peak_allocated_gb
logger.info(
logger.debug(
"Peak GPU memory (this request): %.2f GB reserved, %.2f GB allocated, %.2f GB pool overhead (%.1f%%)",
peak_reserved_gb,
peak_allocated_gb,