Reply to Huge memory leakage issue with tf.keras.models.predict() For me, the leakage problem on M2 was magically solved by: import tensorflow as tf tf.config.set_visible_devices([],'GPU') Machine Learning & AI General May ’23