{"record":{"id":"a5e56366b2ea59c5","repo":"Comfy-Org/ComfyUI","slug":"unknown-output-mode-output","errorCode":null,"errorMessage":"Unknown output mode: {output}","messagePattern":"Unknown output mode: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_extras/nodes_moge.py","lineNumber":305,"sourceCode":"\n        # Pick the input tensor for the chosen mode and validate availability.\n        if output in (\"depth\", \"depth_colored\"):\n            if \"depth\" not in moge_geometry:\n                raise ValueError(\"moge_geometry has no depth output.\")\n            src = moge_geometry[\"depth\"]\n        elif is_normal:\n            if \"normal\" in moge_geometry:\n                src = moge_geometry[\"normal\"]\n            elif \"points\" in moge_geometry:\n                src = moge_geometry[\"points\"]\n            else:\n                raise ValueError(\"moge_geometry has neither normals nor points to derive normals from.\")\n        elif output == \"mask\":\n            if \"mask\" not in moge_geometry:\n                raise ValueError(\"moge_geometry has no mask output.\")\n            src = moge_geometry[\"mask\"]\n        else:\n            raise ValueError(f\"Unknown output mode: {output}\")\n\n        B = src.shape[0]\n        pbar = comfy.utils.ProgressBar(B)\n        out: list[torch.Tensor] = []\n        with tqdm(total=B, desc=f\"MoGe render: {output}\") as tq:\n            for i in range(B):\n                slc = src[i:i + 1].float()\n                if output in (\"depth\", \"depth_colored\"):\n                    d = _normalize_disparity(slc)\n                    out.append(_turbo(d) if output == \"depth_colored\"\n                               else d.unsqueeze(-1).expand(*d.shape, 3).contiguous())\n                elif is_normal:\n                    n = slc if \"normal\" in moge_geometry else _normals_from_points(slc)\n                    # MoGe is OpenCV (Z+ into scene); normal-map convention is Z+ out of surface, so flip Z.\n                    y_sign = -1.0 if opengl else 1.0\n                    n = n * n.new_tensor([1.0, y_sign, -1.0])\n                    out.append((n * 0.5 + 0.5).clamp(0.0, 1.0))\n                elif output == \"mask\":","sourceCodeStart":287,"sourceCodeEnd":323,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_extras/nodes_moge.py#L287-L323","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nnode_inputs = {\"output\": \"disparity\"}   # unsupported\n\n// after\nnode_inputs = {\"output\": \"depth\"}        # supported mode","handlingStrategy":"validation","validationCode":"VALID = {'depth', 'depth_colored', 'normal_directx', 'normal_opengl', 'mask'}\nif output not in VALID:\n    raise UserFacingError(f'unsupported output mode: {output}')","typeGuard":"def is_valid_render_mode(output: str) -> bool:\n    return output in {'depth', 'depth_colored', 'normal_directx', 'normal_opengl', 'mask'}","tryCatchPattern":null,"preventionTips":["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."],"tags":["moge","combo-value","enum","render"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}