mirror of
https://github.com/Comfy-Org/comfyui-benchmark.git
synced 2026-11-04 23:47:33 +00:00
[PR #5] feat: capture full benchmark metric set (times, RAM, VRAM, CPU, GPU) on all backends #5
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfyui-benchmark#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/comfyui-benchmark/pull/5
Author: @deepme987
Created: 9/29/2026
Status: 🔄 Open
Base:
main← Head:deepme987/mps-memory-capture📝 Commits (2)
ea3723bfeat: capture device memory on Apple Silicon (MPS) via torch6f4d83dfeat: unified always-on sampler — CPU%, RAM, VRAM, GPU util/power/temp/clocks📊 Changes
2 files changed (+132 additions, -28 deletions)
View changed files
📝
README.md(+14 -2)📝
__init__.py(+118 -26)📄 Description
Summary
Make the node capture everything a benchmark needs, on every backend — times, RAM, VRAM, CPU, and GPU telemetry — so it can serve as the shared metric-collection engine across Desktop / cloud / CLI (a public GPU×workflow benchmark corpus).
Before this, the sampler was
nvidia-smi-only: Apple Silicon captured no GPU memory, CPU-only machines got no time series at all, and CPU utilization was never recorded.What changed (
__init__.py)One always-on system sampler (replaces the NVIDIA-only and MPS-only threads) with a pluggable GPU probe:
psutil_data)nvidia_smi_data)current_allocated/driver_allocatedbytes)torch.mps(device_memory_data)Static record —
device_infonow includesbackend(nvidia/mps/cpu),cpu_model, physical/logical core counts, architecture, platform, PyTorch/Python/ComfyUI versions, total VRAM/RAM — so each run is a self-contained corpus record.device_info.backendensures unified memory (MPS/CPU, drawn from system RAM) is never ranked against dedicated VRAM.Config is unchanged and backward-compatible (
nvidia-smi.enable_thread/check_intervalnow gate the whole sampler; the key name is retained).Testing
python -m py_compile __init__.py nodes.pypasses.sysctl machdep.cpu.brand_string→ "Apple M4 Pro";torch.mps.current_allocated_memory/driver_allocated_memoryare stable since torch 2.1 (this machine runs torch 2.5.1 + mps).custom_nodes/, run any workflow, and confirm the JSON inoutputs/benchmark/has: populatedpsutil_datawith a 4thcpu_percentcolumn;device_memory_data+device_info.backend: "mps"on Apple Silicon (ornvidia_smi_datawith temperature/clocks on NVIDIA); anddevice_info.cpu_model/ core counts / versions.Timeline visualization of the new series in
visualize_benchmark.pyis a deliberate follow-up — this PR is capture-only.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.