2 Commits
Author SHA1 Message Date
stratopause-lscandClaude Opus 4.8 b7c3cc181d Show MLX Metal bar without requiring a probe node
The /macmem/stats route previously never read MLX and returned a cached
value populated only by the MacMemProbe node, so the "MLX Metal" bar stayed
hidden (display:none) until a probe ran in the graph.

Read MLX memory live in collect_stats() whenever the server is idle
(mlx_live or not _is_executing()), keeping the last good value during
execution. Reading MLX's memory counters (get_active/cache/peak_memory) is
a global per-process query that is safe from any thread — verified under
concurrent GPU compute — and gating the route read on "not executing"
ensures MLX is never touched while a prompt runs on the executor thread.

The Metal bar now appears automatically after any MLX/mflux activity.
MacMemProbe still works and is now optional (live updates during a run).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 17:27:38 +08:00
stratopause-lscandClaude Opus 4.8 5f5adfea73 Initial release: ComfyUI Mac Memory Monitor
Real-time memory monitor for ComfyUI on Apple Silicon (MPS / unified memory):
floating panel (Unified RAM, MPS driver/active, MLX Metal, Swap, CPU, process
RSS, loaded models) with per-run peak markers, plus a Mac Memory Probe graph
node for inline snapshots. MLX memory is read only from the execution thread
for thread-safety. Includes an mflux AnyModel example workflow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 15:52:50 +08:00