text2mesh
text2mesh copied to clipboard
Error with self-upload model
Hello, thank you for sharing this amazing tool. I wonder if I can use my own model as the init model. I tried mine on Kaggle notebook, here is my version. Is there any requirement (like vertices count) for a model...? my notebook
It came up following issues when running main.py: The size of tensor a (3) must match the size of tensor b (4) at non-singleton dimension 2
full error:
/opt/conda/lib/python3.7/site-packages/clip/clip.py:23: UserWarning: PyTorch version 1.7.1 or higher is recommended warnings.warn("PyTorch version 1.7.1 or higher is recommended") ModuleList( (0): FourierFeatureTransform() (1): Linear(in_features=515, out_features=256, bias=True) (2): ReLU() (3): Linear(in_features=256, out_features=256, bias=True) (4): ReLU() (5): Linear(in_features=256, out_features=256, bias=True) (6): ReLU() (7): Linear(in_features=256, out_features=256, bias=True) (8): ReLU() (9): Linear(in_features=256, out_features=256, bias=True) (10): ReLU() ) ModuleList( (0): Linear(in_features=256, out_features=256, bias=True) (1): ReLU() (2): Linear(in_features=256, out_features=256, bias=True) (3): ReLU() (4): Linear(in_features=256, out_features=3, bias=True) ) ModuleList( (0): Linear(in_features=256, out_features=256, bias=True) (1): ReLU() (2): Linear(in_features=256, out_features=256, bias=True) (3): ReLU() (4): Linear(in_features=256, out_features=1, bias=True) ) 0%| | 0/750 [00:00<?, ?it/s]/opt/conda/lib/python3.7/site-packages/torch/nn/functional.py:1628: UserWarning: nn.functional.tanh is deprecated. Use torch.tanh instead. warnings.warn("nn.functional.tanh is deprecated. Use torch.tanh instead.") 0%| | 0/750 [00:00<?, ?it/s] Traceback (most recent call last): File "main.py", line 481, in
run_branched(args) File "main.py", line 167, in run_branched update_mesh(mlp, network_input, prior_color, sampled_mesh, vertices) File "main.py", line 407, in update_mesh sampled_mesh.faces) RuntimeError: The size of tensor a (3) must match the size of tensor b (4) at non-singleton dimension 2
My model is here: ufo.zip Vertices: 90600 Faces: 90598 Triangles: 181196
Getting the same error when exporting a model from Blender as an obj - wondering if there is an issue with the export settings? It seems that some information is not getting exported which is why the tensor size is lower (3 rather than 4).
Did you ever manage to fix this?
Exporting the same mesh as a .obj
file from MeshLab solved this issue for me. It'd be nice to update code to understand .obj
files not only came from MeshLab
@mbrewster-art I got same error. I have verified that the system input must be a triangle mesh, and the normals must be per vertex.
Blender exports quad mesh as standard, so you need to change it to triangle mesh.
The first image is quad mesh, the seconds mesh is tri mesh.
You can change it in the export settings.
Then, when using blender, the normals of each face are exported. I solved this problem by exporting an obj file without normals and using MeshLab to export normals per vertex.