I have limited SSD space and won’t use Machine Learning. Can I run UE5 with PyTorch deleted?
Yes - you can delete the PythonFoundationPackages plugin and run UE5. You will not be able to use certain experimental features such as the MLDeformer plugin.
Actually you can’t. If you delete PythonFoundationPackages
or just torch
folders Unreal Engine (as for 5.1.1) will download them back.
The interesting thing (besides having 5.7 GB of PyTorch you’re not using) that Unreal also is saving 4.1 GB of PyTorch just for Linux (???) and 0.4 GB for Mac (???). In sum it’s 10.3 GB of PyTorch. Is it a bug? Is it neccessary?
I’ve found a solution for myself - wrote .bat
file that replaces all files inside torch
directories with empty files of the same names.
I’ve checked - the next time you launch EGS it wouldn’t notice the difference and wouldn’t try to redownload them.
How it works:
- Create
.bat
file with whatever name you find appropriate. I’ve named minereduce_to_atoms.bat
. Copy the contents below to your.bat
file.
@echo off
echo This script will permanently empty all files in the current and child directories.
echo Be careful before using it!
echo.
pause
for /f "delims=" %%f in ('dir /s /b /a-d ^| findstr /v ".bat"') do (
echo. > "%%f"
)
echo Done...
pause
-
Put
.bat
in one the threetorch
folders that you want to occupy less space (UE_5.1\Engine\Plugins\Experimental\PythonFoundationPackages\Content\Python\Lib\Win64\site-packages\torch
or similar folders for Linux or Mac`) -
Run it, press any button to confirm. Be careful - this
.bat
will actually empty all files in current directory and children folders wherever you run it. -
Voila, you just saved 10GB of disk space. (probably until next big Unreal Engine update)
Can we know what other plugins depend on it besides MLDeformer which you mentioned? I’m about to delete the PythonFoundationPackages, and we need to know it’s safe to be deleted.
for me it’s DazToUnreal plugin. It uses MLDeformer.
In Unreal Engine 5.5 by default this folder is now 402KB instead of 10GB, so Unreal fixed it