Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

functional/soft_rasterize.py bug: lagacy branch #101

Open
SeVEnMY opened this issue Apr 5, 2022 · 5 comments
Open

functional/soft_rasterize.py bug: lagacy branch #101

SeVEnMY opened this issue Apr 5, 2022 · 5 comments

Comments

@SeVEnMY
Copy link

SeVEnMY commented Apr 5, 2022

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()

@RenyunLi0116
Copy link

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?

@SeVEnMY
Copy link
Author

SeVEnMY commented Apr 6, 2022

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)?

@RenyunLi0116
Copy link

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

@SeVEnMY
Copy link
Author

SeVEnMY commented Apr 6, 2022

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.

@RenyunLi0116
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants