Small fixes

This commit is contained in:
kijai 2026-06-22 23:59:05 +03:00
parent 0f3bdf5078
commit 49b106ec91
2 changed files with 3 additions and 3 deletions

View File

@ -94,7 +94,7 @@ def batch6DFromXYZ(r, return_9D=False):
sy = rs[..., 1]
sz = rs[..., 2]
result = torch.empty(list(r.shape[:-1]) + [3, 3], dtype=r.dtype).to(r.device)
result = torch.empty(list(r.shape[:-1]) + [3, 3], dtype=r.dtype, device=r.device)
result[..., 0, 0] = cy * cz
result[..., 0, 1] = -cx * sz + sx * sy * cz

View File

@ -959,8 +959,8 @@ class SAM3DBody_Render(io.ComfyNode):
person_palette_falloff = float(render_style.get("person_palette_falloff", 0.6))
region = str(render_style.get("region", "full_body"))
if region == "hands_only":
hand_mask = pose_data["hand_vert_mask"]
hand_mask = pose_data.get("hand_vert_mask")
if region == "hands_only" and hand_mask is not None:
faces_full = np.asarray(pose_data["faces"])
keep = hand_mask[faces_full].all(axis=1)
pose_data = dict(pose_data)