Comfy-Org/ComfyUI · error · ValueError

File3DToSplat: PLY vertex has list properties (unsupported)

Error message

File3DToSplat: PLY vertex has list properties (unsupported)

What it means

Raised by _parse_ply_gaussian when a vertex-element property is declared as 'property list ...' inside the vertex element. The parser maps each vertex property to one fixed-size numpy dtype field, and list properties have per-vertex variable length, which cannot be represented in a packed record. Face lists (in the face element) are fine; the check only applies to the vertex element actually parsed.

Source

Thrown at comfy_extras/nodes_gaussian_splat.py:231

    if end < 0:
        raise ValueError("File3DToSplat: not a PLY (missing end_header)")
    header = data[:end].decode('ascii', 'replace')
    body = end + len(b'end_header')
    body += 2 if data[body:body + 2] == b'\r\n' else 1
    count, props, in_vertex = 0, [], False
    for line in header.splitlines():
        p = line.split()
        if not p:
            continue
        if p[0] == 'format' and p[1] != 'binary_little_endian':
            raise ValueError(f"File3DToSplat: unsupported PLY format '{p[1]}' (need binary_little_endian)")
        if p[0] == 'element':
            in_vertex = p[1] == 'vertex'
            if in_vertex:
                count = int(p[2])
        elif p[0] == 'property' and in_vertex:
            if p[1] == 'list':
                raise ValueError("File3DToSplat: PLY vertex has list properties (unsupported)")
            props.append((p[2], '<' + _PLY_DTYPES[p[1]]))
    arr = np.frombuffer(data, np.dtype(props), count=count, offset=body)
    names = arr.dtype.names
    c = lambda k: arr[k].astype(np.float32)
    n = count

    xyz = np.stack([c('x'), c('y'), c('z')], 1)
    if 'scale_0' in names:
        scale = np.exp(np.stack([c('scale_0'), c('scale_1'), c('scale_2')], 1))   # 3DGS stores log scale
    else:
        scale = np.full((n, 3), 0.01, np.float32)
    if 'rot_0' in names:
        rot = _norm_quat(np.stack([c('rot_0'), c('rot_1'), c('rot_2'), c('rot_3')], 1))   # wxyz
    else:
        rot = np.tile(np.array([1, 0, 0, 0], np.float32), (n, 1))
    opacity = 1.0 / (1.0 + np.exp(-c('opacity'))) if 'opacity' in names else np.ones(n, np.float32)

    if 'f_dc_0' in names:

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Re-export the file without per-vertex list properties (standard 3DGS PLY writers never emit them).
  2. Strip the offending list properties with a conversion tool (plyfile) and rewrite a clean binary PLY.
  3. If you generated the file yourself, fix the writer to emit only scalar vertex properties.

Example fix

null
Defensive patterns

Strategy: validation

Validate before calling

header = data[:data.find(b'end_header')].decode('ascii', 'replace')
in_vertex = False
for line in header.splitlines():
    p = line.split()
    if not p:
        continue
    if p[0] == 'element':
        in_vertex = p[1] == 'vertex'
    elif p[0] == 'property' and in_vertex and p[1] == 'list':
        raise ValueError('vertex list properties unsupported; re-export the PLY')

Type guard

def ply_vertex_scalar_only(data: bytes) -> bool:
    end = data.find(b'end_header')
    if end < 0:
        return False
    in_vertex = False
    for line in data[:end].decode('ascii', 'replace').splitlines():
        p = line.split()
        if p and p[0] == 'element':
            in_vertex = p[1] == 'vertex'
        elif p and p[0] == 'property' and in_vertex and p[1] == 'list':
            return False
    return True

Try / catch

try:
    result = _parse_ply_gaussian(data)
except ValueError as e:
    if 'list properties' in str(e):
        strip_vertex_lists_with_plyfile(path)
    else:
        raise

Prevention

When it happens

Trigger: File3DToSplat on a PLY whose vertex element contains list properties, e.g. custom exporters writing per-vertex index lists, variable-length extra attributes, or files produced by tools that attach list-typed custom data to vertices.

Common situations: Non-3DGS PLYs from niche tools; a corrupted header where a fixed property line got mangled into a list declaration; hand-generated PLY headers with wrong property syntax.

Related errors


AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14). Data as JSON: /api/errors/17bbd09872ea96cd. Report an issue: GitHub.