kaolin icon indicating copy to clipboard operation
kaolin copied to clipboard

variables needed for gradient computation has been modified

Open Dannynis opened this issue 5 months ago • 4 comments

Hey, im trying to use this great framework to do texture optimization but im facing the next isssue, all the steps to reproduce are in this colab notebook.

https://colab.research.google.com/drive/1K6oT4DD7NroacY3jd6k-62QI7PzLGnXM?usp=sharing

key code:

mesh.materials[0].diffuse_texture = torch.nn.Parameter(mesh.materials[0].diffuse_texture) r = kal.render.easy_render.render_mesh(camera, mesh.cuda()) (r['render'].sum()).backward()

and the error:

File "/usr/local/lib/python3.10/dist-packages/kaolin/render/lighting/sg.py", line 340, in sg_warp_specular_term h /= torch.sqrt(_dot(h, h)) (Triggered internally at ../torch/csrc/autograd/python_anomaly_mode.cpp:111.) return Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass

Thank you!

Dannynis avatar Sep 23 '24 23:09 Dannynis