Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
this pull request has two fixes:
one is arrangement of GUI
other is more substantial but untested on windows machines:
ProfilerX Apple Silicon Compatibility Fix
Problem
The ComfyUI_ProfilerX custom node was throwing errors on Apple Silicon Macs because it was using CUDA-specific PyTorch functions that don't exist on MPS (Metal Performance Shaders) backend.
Error:
AttributeError: module 'torch.mps' has no attribute 'current_device'Root Cause
The ProfilerX code contained hardcoded CUDA function calls:
torch.cuda.reset_peak_memory_stats()torch.cuda.memory_allocated()torch.cuda.max_memory_allocated()These functions don't exist in the MPS backend used by Apple Silicon.
Solution
Created a cross-platform memory management system:
1. Created
memory_manager.py2. Updated
profiler_core.pytorch.cuda.*calls with memory manager calls3. Enhanced
__init__.py4. Fixed PyTorch Installation
Files Modified
custom_nodes/ComfyUI_ProfilerX/memory_manager.py(new)custom_nodes/ComfyUI_ProfilerX/profiler_core.pycustom_nodes/ComfyUI_ProfilerX/__init__.pycustom_nodes/ComfyUI_ProfilerX/tests/test_compatibility.py(new)Testing
Run the compatibility test:
Benefits
Next Steps
mv custom_nodes/ComfyUI_ProfilerX custom_nodes/ComfyUI_ProfilerX.disabled