SoftRas icon indicating copy to clipboard operation
SoftRas copied to clipboard

functional/soft_rasterize.py bug: lagacy branch

Open SeVEnMY opened this issue 2 years ago • 5 comments

When running the function: faces_info, aggrs_info, soft_colors = \ soft_rasterize_cuda.forward_soft_rasterize(face_vertices, textures, faces_info, aggrs_info, soft_colors, image_size, near, far, eps, sigma_val, ctx.func_dist_type, ctx.dist_eps, gamma_val, ctx.func_rgb_type, ctx.func_alpha_type, ctx.texture_type, fill_back) Got the error message: faces must be contiguous

temporarily solved by changing line 41: face_vertices = face_vertices.clone() to: face_vertices = face_vertices.clone().contiguous()

SeVEnMY avatar Apr 05 '22 21:04 SeVEnMY

Hi, I met the same problem: D:\Software\Anaconda3\lib\site-packages\soft_renderer-1.0.0-py3.9-win-amd64.egg\soft_renderer\functional\soft_rasterize.py in forward(ctx, face_vertices, textures, image_size, background_color, near, far, fill_back, eps, sigma_val, dist_func, dist_eps, gamma_val, aggr_func_rgb, aggr_func_alpha, texture_type)

RuntimeError: faces must be contiguous

I try your method but it didn't work, do you fix it?

RenyunLi0116 avatar Apr 06 '22 19:04 RenyunLi0116

Hi, I met the same problem: D:\Software\Anaconda3\lib\site-packages\soft_renderer-1.0.0-py3.9-win-amd64.egg\soft_renderer\functional\soft_rasterize.py in forward(ctx, face_vertices, textures, image_size, background_color, near, far, fill_back, eps, sigma_val, dist_func, dist_eps, gamma_val, aggr_func_rgb, aggr_func_alpha, texture_type)

RuntimeError: faces must be contiguous

I try your method but it didn't work, do you fix it?

Did you also change the line for textures(42)?

SeVEnMY avatar Apr 06 '22 20:04 SeVEnMY

Hi, I met the same problem: D:\Software\Anaconda3\lib\site-packages\soft_renderer-1.0.0-py3.9-win-amd64.egg\soft_renderer\functional\soft_rasterize.py in forward(ctx, face_vertices, textures, image_size, background_color, near, far, fill_back, eps, sigma_val, dist_func, dist_eps, gamma_val, aggr_func_rgb, aggr_func_alpha, texture_type) RuntimeError: faces must be contiguous I try your method but it didn't work, do you fix it?

Did you also change the line for textures(42)?

No, just follow your method to change line41 in soft_rasterize.py

RenyunLi0116 avatar Apr 06 '22 20:04 RenyunLi0116

Hi, I met the same problem: D:\Software\Anaconda3\lib\site-packages\soft_renderer-1.0.0-py3.9-win-amd64.egg\soft_renderer\functional\soft_rasterize.py in forward(ctx, face_vertices, textures, image_size, background_color, near, far, fill_back, eps, sigma_val, dist_func, dist_eps, gamma_val, aggr_func_rgb, aggr_func_alpha, texture_type) RuntimeError: faces must be contiguous I try your method but it didn't work, do you fix it?

Did you also change the line for textures(42)?

No, just follow your method to change line41 in soft_rasterize.py

Try to modify line 42 using the same method as well.

SeVEnMY avatar Apr 06 '22 20:04 SeVEnMY

Hi, I met the same problem: D:\Software\Anaconda3\lib\site-packages\soft_renderer-1.0.0-py3.9-win-amd64.egg\soft_renderer\functional\soft_rasterize.py in forward(ctx, face_vertices, textures, image_size, background_color, near, far, fill_back, eps, sigma_val, dist_func, dist_eps, gamma_val, aggr_func_rgb, aggr_func_alpha, texture_type) RuntimeError: faces must be contiguous I try your method but it didn't work, do you fix it?

Did you also change the line for textures(42)?

No, just follow your method to change line41 in soft_rasterize.py

Try to modify line 42 using the same method as well.

Wow, solved! Thank you!

RenyunLi0116 avatar Apr 06 '22 20:04 RenyunLi0116