[diffusion] Accept mesh benchmark artifacts (#36553)
This commit is contained in:
+2
-1
@@ -107,7 +107,8 @@ temporal shape. Treat any remaining temporal or conditioning signature miss as
|
||||
Eager fallback, not as a valid BCG measurement.
|
||||
|
||||
A zero process exit is not sufficient evidence: every accepted row must also
|
||||
contain its requested perf dump and a generated image, video, or audio file.
|
||||
contain its requested perf dump and a generated image, video, audio, or 3D mesh
|
||||
file.
|
||||
The helper gives every cell a unique output name and rejects missing artifacts.
|
||||
|
||||
On machines with a read-only Hugging Face cache, combine
|
||||
|
||||
+4
-4
@@ -161,10 +161,10 @@ Eager/BCG/BCG/Eager at `lossless`, then the same sequence at `high`, while
|
||||
holding one GPU set and one isolated checkpoint cache. The high+BCG cells test
|
||||
whether the combination is actually supported; do not average them when the
|
||||
runtime rejects the combination or the helper detects a late quality-fusion
|
||||
mount. The helper also hashes every generated artifact, first requires the two
|
||||
Eager rows at each quality to agree, then rejects any BCG row whose hash differs
|
||||
from that Eager reference. Cleanup occurs only after all eight runs, including
|
||||
on failure or interruption:
|
||||
mount. The helper hashes every generated image, video, audio, or 3D mesh
|
||||
artifact. It first requires the two Eager rows at each quality to agree, then
|
||||
rejects any BCG row whose hash differs from that Eager reference. Cleanup occurs
|
||||
only after all eight runs, including on failure or interruption:
|
||||
|
||||
```bash
|
||||
MODEL_CACHE_ROOT=/path/to/task-owned/model-caches
|
||||
|
||||
+10
-1
@@ -121,7 +121,16 @@ MODEL_WEIGHT_SUFFIXES = {
|
||||
".pth",
|
||||
".safetensors",
|
||||
}
|
||||
GENERATED_OUTPUT_SUFFIXES = {".jpeg", ".jpg", ".mp4", ".png", ".wav", ".webp"}
|
||||
GENERATED_OUTPUT_SUFFIXES = {
|
||||
".glb",
|
||||
".jpeg",
|
||||
".jpg",
|
||||
".mp4",
|
||||
".obj",
|
||||
".png",
|
||||
".wav",
|
||||
".webp",
|
||||
}
|
||||
NIGHTLY_PRESET_ORDER = (
|
||||
"flux",
|
||||
"flux2",
|
||||
|
||||
@@ -472,6 +472,41 @@ class TestDiffusionBenchmarkSkill(unittest.TestCase):
|
||||
result["missing_artifacts"], ["perf dump", "generated output"]
|
||||
)
|
||||
|
||||
def test_mesh_artifacts_are_accepted_and_hashed(self):
|
||||
with tempfile.TemporaryDirectory() as tmpdir:
|
||||
temp_root = Path(tmpdir)
|
||||
module = _load_benchmark_module(temp_root)
|
||||
output_dir = temp_root / "outputs"
|
||||
output_dir.mkdir()
|
||||
|
||||
def finish_run():
|
||||
(output_dir / "hunyuan3d-shape_mesh-output.json").write_text(
|
||||
json.dumps({"total_duration_ms": 1000, "steps": []}),
|
||||
encoding="utf-8",
|
||||
)
|
||||
(output_dir / "hunyuan3d-shape-mesh-output.obj").write_bytes(
|
||||
b"v 0 0 0\n"
|
||||
)
|
||||
return 0
|
||||
|
||||
with patch.object(module.subprocess, "Popen") as popen:
|
||||
popen.return_value.stdout = iter(())
|
||||
popen.return_value.wait.side_effect = finish_run
|
||||
result = module._run_benchmark_once_impl(
|
||||
"hunyuan3d-shape",
|
||||
"mesh-output",
|
||||
output_dir,
|
||||
warmup=False,
|
||||
cuda_visible_devices="0",
|
||||
)
|
||||
|
||||
self.assertFalse(result["error"])
|
||||
self.assertEqual(
|
||||
result["output_artifacts"],
|
||||
[str(output_dir / "hunyuan3d-shape-mesh-output.obj")],
|
||||
)
|
||||
self.assertEqual(len(result["output_sha256"]), 1)
|
||||
|
||||
def test_high_bcg_rejects_quality_fusion_mounted_after_capture(self):
|
||||
with tempfile.TemporaryDirectory() as tmpdir:
|
||||
temp_root = Path(tmpdir)
|
||||
|
||||
Reference in New Issue
Block a user