Optimizing Memory Storage
Within the processing field, you can toggle Optimize Memory Usage.
![](https://cdn.prod.website-files.com/6630875599550e7ce589dac0/6662c81160f7493e5909ca2d_reduced_memory.jpg)
When this option is enabled, Sogni loads and unloads models just-in-time to prevent memory shortages, which can increase latency by approximately 2 seconds in exchange for reducing memory usage. The Stable Diffusion pipeline will lazily load TextEncoder, Unet, Decoder, and SafetyChecker when needed and aggressively unload their resources afterward.
Optimizing memory usage can be advantageous when running resource-intensive models on systems with less than 32GB of RAM, or if the generation process is causing your Mac to run slowly.
This option is automatically enabled if your Mac has less than 16GB of RAM, and it is not recommended to disable it.