[Bugfix] Stop reading the removed OmniRequestOutput.request_output accessor (#6172)

Signed-off-by: MrlixiangWE <mrdanaer@gmail.com>
This commit is contained in:
MrlixiangWE authored and GitHub committed 2026-08-15 07:07:28 +08:00
1 parent fe54ecc388
commit b95c73742d
12 files changed
+74 -32

No files matched your search

@@ -53,14 +53,10 @@ def _diff_metrics(a: Image.Image, b: Image.Image) -> tuple[float, float]:
def _extract_single_image(outputs) -> Image.Image:
first_output = outputs[0]
assert first_output.final_output_type == "image"
if not hasattr(first_output, "request_output") or not first_output.request_output:
raise ValueError("No request_output found in OmniRequestOutput")
if not isinstance(first_output, OmniRequestOutput):
raise ValueError(f"Expected an OmniRequestOutput, got {type(first_output).__name__}")
req_out = first_output.request_output
if not isinstance(req_out, OmniRequestOutput) or not hasattr(req_out, "images"):
raise ValueError("Invalid request_output structure or missing 'images' key")
images = req_out.images
images = first_output.images
if images is None or len(images) != 1:
raise ValueError(f"Expected 1 image, got {0 if images is None else len(images)}")
return images[0]
@@ -72,8 +72,7 @@ def _to_float_array(data: Any) -> np.ndarray:
def _extract_output_array(output: Any) -> np.ndarray:
req_out = output.request_output
payload = req_out.images[0]
payload = output.images[0]
return _to_float_array(payload)
@@ -142,12 +142,6 @@ def _generate_joint_output(omni, config: QualityTestConfig):
first = outputs[0]
worker_peak_memory_mb = float(getattr(first, "peak_memory_mb", 0.0) or 0.0)
if hasattr(first, "request_output") and isinstance(first.request_output, list):
first = first.request_output[0]
worker_peak_memory_mb = max(
worker_peak_memory_mb,
float(getattr(first, "peak_memory_mb", 0.0) or 0.0),
)
if not hasattr(first, "images") or not first.images:
raise ValueError("Could not extract video frames from H3 output")
frames = first.images[0]