{"record":{"id":"ebe321abe762f539","repo":"Comfy-Org/ComfyUI","slug":"unsupported-splat-format-format-r","errorCode":null,"errorMessage":"Unsupported splat format: {format!r}","messagePattern":"Unsupported splat format: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_extras/nodes_gaussian_splat.py","lineNumber":504,"sourceCode":"            category=\"3d/splat\",\n            description=\"Serialize a gaussian splat to a File3D object for Save / Preview 3D nodes. \"\n                        \"Supports one item per batch only.\",\n            inputs=[\n                IO.Splat.Input(\"splat\"),\n                IO.Combo.Input(\"format\", options=list(cls.FORMAT_WRITERS),  # TODO: add \"splat\" when we have a writer for it\n                               tooltip=\"ply: standard 3D Gaussian Splat with full spherical harmonics. \"\n                                       \"ksplat: mkkellogg SplatBuffer (level 0, uncompressed), base color only \"\n                                       \"spz: Niantic gzip-compressed (~10x smaller), base color only \"\n                                       ),\n            ],\n            outputs=[IO.File3DSplatAny.Output(display_name=\"model_3d\")],\n        )\n\n    @classmethod\n    def execute(cls, splat, format=\"ply\") -> IO.NodeOutput:\n        writer = cls.FORMAT_WRITERS.get(format)\n        if writer is None:\n            raise ValueError(f\"Unsupported splat format: {format!r}\")\n\n        if splat.positions.shape[0] > 1:\n            logging.warning(\"SplatToFile3D supports one item per batch only. Got %d; using first.\", splat.positions.shape[0])\n        end = _real_len(splat, 0)\n        data = writer(splat.positions[0, :end], splat.scales[0, :end],\n                      splat.rotations[0, :end], splat.opacities[0, :end], splat.sh[0, :end])\n        return IO.NodeOutput(Types.File3D(BytesIO(data), file_format=format))\n\n\nclass File3DToSplat(IO.ComfyNode):\n    @classmethod\n    def define_schema(cls):\n        return IO.Schema(\n            node_id=\"File3DToSplat\",\n            display_name=\"Get Splat\",\n            search_aliases=[\"load splat\", \"ply to splat\", \"import splat\", \"file to splat\"],\n            category=\"3d/splat\",\n            description=\"Parse a splat File3D into a gaussian splat. Inverse of Create 3D File (from Splat). \"","sourceCodeStart":486,"sourceCodeEnd":522,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_extras/nodes_gaussian_splat.py#L486-L522","documentation":"Raised by SplatToFile3D.execute when the requested format string has no registered writer in FORMAT_WRITERS. The node exposes a combo (ply / ksplat / spz, plus the built-in splat writer) and looks the writer up by exact string; any other value — typo, wrong case, or a format only supported for reading — hits this error.","triggerScenarios":"Calling SplatToFile3D programmatically (or via a hand-built workflow/API request) with a format value outside the combo, e.g. \"splat \" with trailing space, \"PLY\", or a format the node can read but not write. Frontend combo users normally cannot trigger it; JSON-submitted prompts with a stale/edited combo value can.","commonSituations":"Workflows saved with a format value from an older/newer node version; API scripts passing an unvalidated string; combo value edited directly in the workflow JSON.","solutions":["Use one of the exact advertised values: \"ply\", \"ksplat\", or \"spz\".","If loading an old workflow, re-pick the format in the node UI and re-save.","In API scripts, validate the format against the node's combo list before submitting the prompt."],"exampleFix":"// before\nSplatToFile3D().execute(splat, format=\"PLY\")\n\n// after\nSplatToFile3D().execute(splat, format=\"ply\")","handlingStrategy":"validation","validationCode":"VALID = set(SplatToFile3D.FORMAT_WRITERS)  # {'ply','ksplat','spz', ...}\nif format not in VALID:\n    raise ValueError(f'format must be one of {sorted(VALID)}, got {format!r}')","typeGuard":"def is_writable_splat_format(fmt: str) -> bool:\n    return fmt in SplatToFile3D.FORMAT_WRITERS","tryCatchPattern":"try:\n    out = SplatToFile3D().execute(splat, format=format)\nexcept ValueError as e:\n    if 'Unsupported splat format' in str(e):\n        format = 'ply'  # safest default\n        out = SplatToFile3D().execute(splat, format=format)\n    else:\n        raise","preventionTips":["Validate the format string against the node's combo list before submitting API prompts.","Re-save workflows in the UI after node updates so combo values stay valid."],"tags":["gaussian-splatting","invalid-argument","node","enum"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}