ComfyUI Node

Load USD

Where every OpenUSD workflow in ComfyUI starts

By cjhosken·Created 3 months ago·Updated 2 months ago· 9
Load USD
    • USD
    file_pathpath/to/file.usd

    Load USD is the front door of the ComfyUI-OpenUSD pack. It takes a path to a .usd, .usda, .usdc, or .usdz file and hands you a live USD stage you can pipe into every other node in the pack. It doesn't render, it doesn't preview, it doesn't convert - it just loads, and that's exactly the point. Think of it as the Load3D of the USD world, except instead of giving you a mesh to look at, it gives you a full scene graph that the pack's transform, attribute, color, save, and viewer nodes all consume.

    Why you'd reach for it

    Almost nothing else in the pack works without a stage. TransformUSDPrim, SetUSDAttribute, SetUSDPrimDisplayColor, SaveUSD, USDToText - they all take a USD input that is just a stage handle being passed along the wire. LoadUSD is one of three ways to mint that handle (the others are Text to USD for typing a stage and Create USD Stage for building one from scratch), and it's the one you want when you already have an asset on disk. Typical flow:

    LoadUSD → USDToText → (edit the text) → Text to USD → SaveUSD
    

    or, more practically, load, tweak, view:

    LoadUSD → TransformUSDPrim → SetUSDPrimDisplayColor → USD Viewer
    

    How it works

    Mechanically it's a thin wrapper over Pixar's pxr library: Usd.Stage.Open(file_path) followed by stage.Load(). The Load() call is the part that pulls in payloads and references, so what you get out is the stage fully composed, not a lazy stub. The single file_path input is a path widget, so you get a file picker rather than having to hand-type paths.

    Two details are worth knowing. First, the USD output is not a mesh or a file path - it's a Python dict wrapping the stage object, riding on the pack's custom USD socket type. There's nothing to preview at this socket; you can't "see" it until you feed it into the viewer or USD to Text. Second, the node declares IS_CHANGED as NaN, the ComfyUI idiom that makes a node always re-run. In practice that means it re-reads the file on every execution - annoying for cache purists, great if you're editing the file in another program and want each run to pick up the latest version.

    The one input that matters

    • file_path - point it at your USD file. Missing file gives you a clean, prefixed error ([OpenUSD] file not found at ...) instead of a silent empty stage.

    There's a single output, USD, and it feeds every other node in the pack.

    Install

    This ships in the cjhosken/ComfyUI-OpenUSD pack. Easiest is ComfyUI Manager: search "ComfyUI-OpenUSD" and hit install. Or clone it:

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

    The heavy part is the dependency, not a model. requirements.txt pins usd-core==26.5 - Pixar's USD Python bindings, which is a chunky install - plus pygltflib, numpy, and trimesh. There are no model downloads at all; this is pure processing, so nothing to fetch from HuggingFace.

    Troubleshooting

    • [OpenUSD] file not found - the path widget is absolute; a relative path that worked in a shell may not resolve from the node's working directory.
    • First install feels slow / pip churns - that's usd-core building or fetching. It's a one-time cost and the biggest thing this pack installs.
    • The pack is young. It's at version 0.1.1 with a README that's still partly placeholder text, and there's essentially no community discussion about it yet. If a workflow you downloaded uses these nodes, expect rough edges and check the repo's issue tracker before assuming you broke something.
    Category3d/usd/io

    Inputs (1)

    NameTypeDefaultDescription
    file_pathSTRINGpath/to/file.usd

    Outputs (1)

    NameTypeDescription
    USDUSD