mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-24 16:07:30 +08:00
Revert support for DA3Geometry for MoGeRender.
This commit is contained in:
parent
f99c526a33
commit
976ccf43e6
@ -19,9 +19,6 @@ from tqdm.auto import tqdm
|
|||||||
MoGeModelType = io.Custom("MOGE_MODEL")
|
MoGeModelType = io.Custom("MOGE_MODEL")
|
||||||
MoGeGeometry = io.Custom("MOGE_GEOMETRY")
|
MoGeGeometry = io.Custom("MOGE_GEOMETRY")
|
||||||
|
|
||||||
# Redefined (not imported) to avoid a hard dependency on nodes_depth_anything_3;
|
|
||||||
# io.Custom types are matched by string key, so both definitions refer to the same wire type.
|
|
||||||
DA3Geometry = io.Custom("DA3_GEOMETRY")
|
|
||||||
|
|
||||||
# MOGE_GEOMETRY is a dict with these optional keys (absent when the upstream model didn't produce them):
|
# MOGE_GEOMETRY is a dict with these optional keys (absent when the upstream model didn't produce them):
|
||||||
# "points": torch.Tensor (B, H, W, 3)
|
# "points": torch.Tensor (B, H, W, 3)
|
||||||
@ -32,7 +29,6 @@ DA3Geometry = io.Custom("DA3_GEOMETRY")
|
|||||||
# "image": torch.Tensor (B, H, W, 3) in [0, 1], CPU (always present)
|
# "image": torch.Tensor (B, H, W, 3) in [0, 1], CPU (always present)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def _normals_from_points(points: torch.Tensor) -> torch.Tensor:
|
def _normals_from_points(points: torch.Tensor) -> torch.Tensor:
|
||||||
"""Camera-space surface normals from a (B, H, W, 3) point map (v1 fallback)."""
|
"""Camera-space surface normals from a (B, H, W, 3) point map (v1 fallback)."""
|
||||||
finite = torch.isfinite(points).all(dim=-1)
|
finite = torch.isfinite(points).all(dim=-1)
|
||||||
@ -278,10 +274,7 @@ class MoGeRender(io.ComfyNode):
|
|||||||
description="Render a depth map or normal map from geometry data",
|
description="Render a depth map or normal map from geometry data",
|
||||||
category="image/geometry_estimation",
|
category="image/geometry_estimation",
|
||||||
inputs=[
|
inputs=[
|
||||||
io.MultiType.Input("moge_geometry", types=[MoGeGeometry, DA3Geometry],
|
MoGeGeometry.Input("moge_geometry"),
|
||||||
tooltip="Accepts MOGE_GEOMETRY (from MoGe nodes) or DA3_GEOMETRY (from Depth Anything 3). "
|
|
||||||
"Normal render modes require points or normals and will error if those are absent — "
|
|
||||||
"DA3 produces no point cloud, so only 'depth' and 'mask' outputs are supported."),
|
|
||||||
io.Combo.Input("output", options=["depth", "depth_colored", "normal_opengl", "normal_directx", "mask"], default="depth",
|
io.Combo.Input("output", options=["depth", "depth_colored", "normal_opengl", "normal_directx", "mask"], default="depth",
|
||||||
tooltip="DirectX vs OpenGL controls the normal-map green-channel convention. DirectX: green = -Y down (Unreal). OpenGL: green = +Y up (Blender, Substance, Unity, glTF)."),
|
tooltip="DirectX vs OpenGL controls the normal-map green-channel convention. DirectX: green = -Y down (Unreal). OpenGL: green = +Y up (Blender, Substance, Unity, glTF)."),
|
||||||
],
|
],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user