I am trying to test the Nearest Neighbor Model, but I keep encountering various errors. I have a simple skinned tube that I animated, simulated, and then exported as an FBX with rig and animation, along with an Alembic simulation, into Unreal Engine. The alignment is perfect, and I can see the deltas in the viewport, but each version of Unreal Engine gives me different errors.
for alembic import i just put -1 in y since maya was z up
https://file.io/qySVb0SZEFEy
in 5.5 it says:
LogPython: Error: ERROR:root:cannot mmap an empty file
LogPython: Error: ERROR:root:Traceback (most recent call last):
File “D:\UE_5.5/Engine/Plugins/Animation/MLDeformer/NearestNeighborModel/Content/Python\nearestneighbormodel.py”, line 1359, in train
compute_and_save_deltas(param)
File “D:\UE_5.5/Engine/Plugins/Animation/MLDeformer/NearestNeighborModel/Content/Python\nearestneighbormodel.py”, line 881, in compute_and_save_deltas
deltas = np.memmap(param.deltas_path, dtype=param.delta_dtype, mode=‘w+’, shape=(param.num_samples, param.num_sum_deltas * 3))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\reza_niroumand\unreal\ML_Deformer_5_5\Intermediate\PipInstall\Lib\site-packages\numpy\core\memmap.py”, line 267, in new
mm = mmap.mmap(fid.fileno(), bytes, access=acc, offset=start)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: cannot mmap an empty file
and in unreal 5.4 it says:
LogNearestNeighborModel: Error: HiddenLayerDims is empty, which will lead to bad results. Default hidden layer dims are added for you. Please double check and train model again.
then
LogNearestNeighborModel: Error: At least one section is required. Please create a section using the ‘+’ button.
and finally:
LogPython: Error: ERROR:root:Event device type CUDA does not match blocking stream’s device type CPU.
LogPython: Error: ERROR:root:Traceback (most recent call last):
File “D:\UE_5.4/Engine/Plugins/Animation/MLDeformer/NearestNeighborModel/Content/Python\nearestneighbormodel.py”, line 1283, in train
train_and_save_network(param, train_data)
File “D:\UE_5.4/Engine/Plugins/Animation/MLDeformer/NearestNeighborModel/Content/Python\nearestneighbormodel.py”, line 1077, in train_and_save_network
batch_loss.backward()
File “D:\reza_niroumand\unreal\ML_Deformer\Intermediate\PipInstall\Lib\site-packages\torch_tensor.py”, line 492, in backward
torch.autograd.backward(
File “D:\reza_niroumand\unreal\ML_Deformer\Intermediate\PipInstall\Lib\site-packages\torch\autograd_init_.py”, line 251, in backward
Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
RuntimeError: Event device type CUDA does not match blocking stream’s device type CPU.