Comfy-Org/ComfyUI · error · ValueError
Unknown output mode: {output}
Error message
Unknown output mode: {output} What it means
The render node's mode dispatch covers depth/depth_colored/normal_*/mask; any other output string falls through to this error. It protects against combo desynchronization where the frontend sends a value the installed node version does not know.
Source
Thrown at comfy_extras/nodes_moge.py:305
# Pick the input tensor for the chosen mode and validate availability.
if output in ("depth", "depth_colored"):
if "depth" not in moge_geometry:
raise ValueError("moge_geometry has no depth output.")
src = moge_geometry["depth"]
elif is_normal:
if "normal" in moge_geometry:
src = moge_geometry["normal"]
elif "points" in moge_geometry:
src = moge_geometry["points"]
else:
raise ValueError("moge_geometry has neither normals nor points to derive normals from.")
elif output == "mask":
if "mask" not in moge_geometry:
raise ValueError("moge_geometry has no mask output.")
src = moge_geometry["mask"]
else:
raise ValueError(f"Unknown output mode: {output}")
B = src.shape[0]
pbar = comfy.utils.ProgressBar(B)
out: list[torch.Tensor] = []
with tqdm(total=B, desc=f"MoGe render: {output}") as tq:
for i in range(B):
slc = src[i:i + 1].float()
if output in ("depth", "depth_colored"):
d = _normalize_disparity(slc)
out.append(_turbo(d) if output == "depth_colored"
else d.unsqueeze(-1).expand(*d.shape, 3).contiguous())
elif is_normal:
n = slc if "normal" in moge_geometry else _normals_from_points(slc)
# MoGe is OpenCV (Z+ into scene); normal-map convention is Z+ out of surface, so flip Z.
y_sign = -1.0 if opengl else 1.0
n = n * n.new_tensor([1.0, y_sign, -1.0])
out.append((n * 0.5 + 0.5).clamp(0.0, 1.0))
elif output == "mask":View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Set output to one of the supported values: 'depth', 'depth_colored', 'normal_directx', 'normal_opengl', 'mask'.
- Refresh/re-add the node in the UI so the combo list resynchronizes with the installed version.
- If running via API, validate the string against the node's INPUT_TYPES before submitting the prompt.
Example fix
// before
node_inputs = {"output": "disparity"} # unsupported
// after
node_inputs = {"output": "depth"} # supported mode Defensive patterns
Strategy: validation
Validate before calling
VALID = {'depth', 'depth_colored', 'normal_directx', 'normal_opengl', 'mask'}
if output not in VALID:
raise UserFacingError(f'unsupported output mode: {output}') Type guard
def is_valid_render_mode(output: str) -> bool:
return output in {'depth', 'depth_colored', 'normal_directx', 'normal_opengl', 'mask'} Prevention
- Re-add the node in the UI after updates to resync combo lists.
- Validate API prompt strings against the node's INPUT_TYPES.
- Avoid editing workflow JSON output values by hand.
When it happens
Trigger: output is a stale or future combo value (e.g. 'point_cloud', 'disparity', a renamed mode) sent from a workflow saved against a different node version.
Common situations: Loading old workflows after a node update renamed modes; hand-written API prompts with typos in the output field; frontend cache serving outdated combo lists.
Related errors
- moge_geometry has no depth output.
- moge_geometry has neither normals nor points to derive norma
- moge_geometry has no mask output.
- Unknown context_schedule '{context_schedule}'.
- Unknown fuse_method '{fuse_method}'.
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/a5e56366b2ea59c5.
Report an issue: GitHub.