ComfyUI Node

USD Viewer

Actually see the stage you're editing

By cjhosken·Created 3 months ago·Updated 2 months ago· 9
USD Viewer
  • USD
  • USD

The ComfyUI-OpenUSD pack is pure Python - there's no renderer anywhere in it, and no DCC hiding behind the scenes. So after you've been transforming prims and setting colors, how do you actually see what you built? That's the USD Viewer. It drops an interactive 3D viewport widget right onto the node: orbit, pan, and zoom your USD stage in the browser without ever leaving ComfyUI. It's the pack's answer to the native Preview3D node, except for the whole scene graph instead of a single mesh.

Why you'd reach for it

You can operate on a stage blind - USD to Text will happily show you the ASCII, and SetUSD* nodes will happily edit a prim whose path you guessed. But scene work is visual work. The viewer is your eyes: confirm the transform you applied actually moved the mesh where you thought, check that your display color landed, catch the mistake before it reaches SaveUSD. And because it passes its USD input straight through, you can drop it in the middle of a chain as a mid-graph checkpoint instead of only at the end.

How it works

The clever part: the node never sends the mesh over the wire. It exports the stage's root layer to USDA text, registers it in a hash-addressed in-memory stage store, and hands the frontend that hash plus a path. The browser then fetches the text through the pack's /usd/view endpoint and parses it - in the browser - using OpenUSD compiled to WebAssembly (openusd_pxr_wasm.wasm), rendered into a WebGL canvas via three.js. For in-memory stages the server flattens the USDA before serving it, so sublayers and references resolve correctly.

Two infrastructure side effects come with that design, and they're worth knowing before they confuse you:

  • It needs the internet at runtime. three.js is loaded from the esm.sh CDN when the viewer opens. Fine on a normal desktop; a fully offline or heavily firewalled ComfyUI install will show an empty viewport.
  • It changes your server's headers. To make the WASM work, the pack injects Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp onto ComfyUI's HTTP responses. That's cross-origin isolation, and require-corp can occasionally break other nodes that pull cross-origin resources without the right CORP headers. If you install this pack and a web-based node that used to work stops loading things, this is why.

The one input

Just USD - the stage to display. Outputs the same USD straight through, so it's a viewport with a passthrough, not a terminal.

Install

ComfyUI Manager, search "ComfyUI-OpenUSD", or:

cd ComfyUI/custom_nodes
git clone https://github.com/cjhosken/ComfyUI-OpenUSD

Restart. The backend dependency is usd-core==26.5 plus numpy, trimesh, and pygltflib - no models to download, but that first usd-core install is the slow bit. The WASM and web viewer ship with the pack; only three.js comes from the CDN.

Troubleshooting

  • Blank viewport - no internet (three.js from the CDN), or WebGL is unavailable. The viewer needs a real GPU context; a headless remote setup has no canvas to show you.
  • Other nodes start failing to load remote images - the require-corp header side effect described above. It's global to the server once the pack is loaded, and it's the pack's most likely way to surprise you.
  • Slow on huge stages - USD in the browser via WASM is impressive but not a match for a native viewer. For a 100k-triangle production asset, expect it to chug; it's a preview, not a renderer.

And the standing caveat: this pack is v0.1.1 with no community track record. The viewer is the flashiest thing in it and the most likely to have rough edges - the WASM/header approach is ambitious, and "ambitious" at version 0.1 means "keep the repo issues tab open."

Category3d/usd/view

Inputs (1)

NameTypeDefaultDescription
USDUSD

Outputs (1)

NameTypeDescription
USDUSD