Comfy-Org / Comfy-Org/ComfyUI

Add a core FILE_3D / uploaded GLB to MESH loader for mesh post-processing workflows

Open
#16,022 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Summary

Please add a core, API-executable conversion/loading path from an uploaded 3D file (`FILE_3D`, especially GLB/GLTF) to the in-memory `MESH` type used by the native mesh post-processing nodes.

### Current limitation

Core supports both sides independently:

- `Load3D` can select/upload GLB, GLTF, OBJ, FBX, and STL files.
- Native post-processing nodes such as `DecimateMesh`, `RemeshMesh`, `WeldVertices`, and `FillHoles` accept `MESH`.
- Saving nodes convert/output mesh data as `FILE_3D`.

However, the current node inventory does not expose a corresponding `FILE_3D → MESH` bridge. This prevents an existing uploaded or previously generated GLB from being passed into `DecimateMesh` in a standalone API workflow.

The limitation is especially visible on Comfy Cloud: an application can upload and preview/download a persisted GLB, and Cloud exposes `DecimateMesh`, but cannot construct a valid graph connecting that uploaded asset to the node.

### Desired workflow

```
Upload/Load GLB (FILE_3D)
→ Load/convert to MESH
→ DecimateMesh / RemeshMesh / WeldVertices / FillHoles
→ SaveGLB
```

The loader should be usable through prompt/API execution without depending on interactive frontend-only preview state.

### Suggested behavior

- Accept core-supported mesh file types, at minimum GLB/GLTF.
- Return `MESH` compatible with the existing native post-processing nodes.
- Preserve vertex colors where supported.
- Clearly define behavior or warnings for UVs, materials, textures, skins, morph targets, and animations that cannot survive conversion.
- Work with files uploaded into the normal Comfy input area and in Comfy Cloud.
- Produce actionable errors for missing files and unsupported formats.

### Why this matters

Without this bridge, native mesh processing works when a generator produces `MESH` within the same graph, but not for persisted assets or independent post-processing jobs. Applications must perform browser-side geometry processing or depend on custom nodes, which prevents portable local/Cloud workflows.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the existing Load3D path and the native DecimateMesh, RemeshMesh, WeldVertices, FillHoles, and SaveGLB nodes, focusing on their FILE_3D and MESH inputs and outputs. Define the API-executable conversion behavior, supported formats, preservation or warning rules, and errors for missing or unsupported files; done means uploaded or generated GLB/GLTF assets can be processed through this workflow locally and in Comfy Cloud.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design, computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.