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

get_xyz_vertex_embedding does not always use the device #5003

Closed
matejsuchanek opened this issue Jun 19, 2023 · 2 comments
Closed

get_xyz_vertex_embedding does not always use the device #5003

matejsuchanek opened this issue Jun 19, 2023 · 2 comments
Labels
invalid/unrelated unrelated to this project or invalid type of issues needs-more-info More info is needed to complete the issue

Comments

@matejsuchanek
Copy link

The code that creates the embedding map for "smpl_27554" mesh does not put tensors to the provided device, unlike all other possible meshes (the else branch):

def get_xyz_vertex_embedding(mesh_name: str, device: torch.device):
if mesh_name == "smpl_27554":
embed_path = PathManager.get_local_path(
"https://dl.fbaipublicfiles.com/densepose/data/cse/mds_d=256.npy"
)
embed_map, _ = np.load(embed_path, allow_pickle=True)
embed_map = torch.tensor(embed_map).float()[:, 0]
embed_map -= embed_map.min()
embed_map /= embed_map.max()
else:
mesh = create_mesh(mesh_name, device)
embed_map = mesh.vertices.sum(dim=1)
embed_map -= embed_map.min()
embed_map /= embed_map.max()
embed_map = embed_map**2
return embed_map

@github-actions github-actions bot added the needs-more-info More info is needed to complete the issue label Jun 19, 2023
@github-actions
Copy link

You've chosen to report an unexpected problem or bug. Unless you already know the root cause of it, please include details about it by filling the issue template.
The following information is missing: "Instructions To Reproduce the Issue and Full Logs"; "Your Environment";

@github-actions
Copy link

Requested information was not provided in 7 days, so we're closing this issue.

Please open new issue if information becomes available. Otherwise, use github discussions for free-form discussions.

@github-actions github-actions bot added the invalid/unrelated unrelated to this project or invalid type of issues label Jun 27, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid/unrelated unrelated to this project or invalid type of issues needs-more-info More info is needed to complete the issue
Projects
None yet
Development

No branches or pull requests

1 participant