Same three-layer pipeline. Same Next.js frontend, same FastAPI backend, same local GPU. The only thing that changed was the ComfyUI workflow — swapped for TRELLIS 2's official textured example template. The output is now a fully textured GLB.
The original Forge3D pipeline output an untextured mesh — a raw GLB with geometry only, no surface color or material. Everything worked, but the model looked flat in the viewer.
TRELLIS 2's ComfyUI node package ships with example workflow templates, one of which runs the full textured pipeline: geometry generation followed by a texture pass that bakes the reference image's color onto the mesh surface. Swapping Trellis_2.json for the textured template was the only change required.
The FastAPI backend, the Next.js frontend, the Zustand store, the polling loop, the WebSocket listener, the GLB viewer — none of it changed. The pipeline is identical. The workflow JSON is different.
.glb. The difference is the mesh now carries a baked texture map — visible in the WebGL viewer without any additional setup.TRELLIS 2's ComfyUI node package includes example workflow JSON files. The textured variant runs two stages internally: first the standard geometry generation pass, then a secondary texture baking pass that projects the reference image's color onto the generated mesh surface.
The FastAPI backend patches the same three node IDs as before — image filename, seed, and output filename prefix. The texture nodes are configured inside the workflow JSON itself and don't require additional injection points. The build_prompt() function is unchanged.
build_prompt() node referencesgenerate.py to match the new template. Everything else — the HTTP calls, WebSocket listener, file retrieval — stays the same. 1import json, copy
2
3# Swapped for the textured example template
4with open("Trellis_2_textured.json") as f:
5 base_workflow = json.load(f)
6
7def build_prompt(image_name: str, asset_name: str, seed: int) -> dict:
8 wf = copy.deepcopy(base_workflow)
9
10 # Same three injection points — node IDs updated to match
11 # the textured template's node graph
12 wf["6"]["inputs"]["image"] = image_name
13 wf["214"]["inputs"]["seed"] = seed
14 wf["219"]["inputs"]["filename_prefix"] = asset_name
15
16 return wf
The textured TRELLIS 2 template wires the texture pass directly to the geometry output inside ComfyUI's node graph. The reference image is already flowing through the graph from the load-image node — the texture nodes read from it automatically.
There are no additional parameters to pass in at runtime. The texture quality, resolution, and baking settings are configured in the workflow JSON itself and stay fixed across all jobs.
The textured template adds a second stage to the generation process. Geometry is still generated first. Then a separate texture pass projects color from the reference image onto the mesh surface and bakes it into a UV texture map embedded in the GLB.
Same as the original pipeline. TRELLIS 2 generates the 3D mesh from the reference image — vertices, faces, and normals. No material or color information yet.
TRELLIS 2's texture nodes project the reference image's color information onto the generated mesh. The result is baked into a UV texture map that travels with the mesh inside the GLB file.
The final GLB contains both the geometry and the baked texture. The react-three-fiber viewer renders it with full color — no additional material setup needed on the frontend.
| Aspect | Part 1 — Forge3D | This Update — Textured |
|---|---|---|
| ComfyUI workflow | Geometry-only template | TRELLIS 2 textured example template |
| Output | Untextured mesh GLB | Textured GLB with baked UV map |
| Generation time | Several minutes | Longer — two-stage pipeline |
| Frontend | Next.js + react-three-fiber | Unchanged |
| FastAPI backend | Orchestration + WebSocket | Unchanged |
| Injection points | Image, seed, filename prefix | Same three — node IDs updated |
| VRAM requirement | ~8 GB | Higher — texture pass adds overhead |
This update demonstrates one of the advantages of the workflow-as-JSON approach from Part 1. The entire generation configuration lives in a single file that's loaded and patched at runtime. Switching from untextured to textured output meant replacing one JSON file and updating three node ID strings — the rest of the stack was untouched.
TRELLIS 2's ComfyUI package ships with example templates specifically because these workflows are designed to be used this way — run them in the UI first to verify they work, then wire them into your API layer. The textured template follows the same pattern: load image, generate geometry, bake texture, export GLB.
The output quality depends heavily on the reference image. Clear single-subject images with good lighting produce cleaner textures. Complex backgrounds or multiple subjects will confuse the texture baking pass.