Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/inference/basic/basic_fasth3.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,9 @@ def run(args: argparse.Namespace) -> list[float]:
generation_time = getattr(result, "generation_time", None)
if generation_time is not None:
print(f"Generation time: {float(generation_time):.3f}s")
peak_memory_mb = getattr(result, "peak_memory_mb", None)
if peak_memory_mb is not None:
print(f"Peak memory: {float(peak_memory_mb):.1f} MB")
denoise_time = _denoise_seconds(result)
if denoise_time is not None:
measured_denoise_times.append(denoise_time)
Expand Down
4 changes: 4 additions & 0 deletions examples/inference/basic/basic_minimax_h3_t2v.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,14 @@ def main() -> None:
# machine-readable: benchmark harnesses parse this line to separate
# generation from model-load time (last occurrence = steady state)
print(f"Generation time: {result.generation_time:.2f}s")
if result.peak_memory_mb is not None:
print(f"Peak memory: {result.peak_memory_mb:.1f} MB")
for _ in range(args.repeats - 1):
result = generator.generate(request)
if result.generation_time is not None:
print(f"Generation time: {result.generation_time:.2f}s")
if result.peak_memory_mb is not None:
print(f"Peak memory: {result.peak_memory_mb:.1f} MB")
finally:
generator.shutdown()

Expand Down
Loading