SoftRas
SoftRas copied to clipboard
functional/soft_rasterize.py bug: lagacy branch
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()
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?
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)?
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
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.
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!