Merge pull request #14 from noizfactory/fix-macos-matplotlib

Fix macOS NSWindow error by using matplotlib 'Agg' backend
This commit is contained in:
Jonseed
2025-03-14 10:24:18 -06:00
committed by GitHub
+7
View File
@@ -4,6 +4,13 @@ from __future__ import annotations
import io
# Trying matplotlib NSWindow warning workaround on macOS
import platform
if platform.system() == 'Darwin': # Check if running on macOS
import matplotlib
matplotlib.use('Agg') # Set non-GUI backend to avoid crashes
import matplotlib.pyplot as plt
import numpy as np
import torch