RecGen Load Example Inputs
The demo loader that spares you the intrinsics headache
- image
- depth
- mask
- fx
- fy
- cx
- cy
The kaili-yang/ComfyUI-Recgen pack has exactly two nodes, and this is the boring half - on purpose. RecGen Load Example Inputs exists so you can prove the whole RGB-D-to-3D pipeline works before you point it at your own photos. Instead of hunting down an aligned depth map, an object mask, and camera intrinsics that all agree with each other, you pick an example from a dropdown and it hands you all seven things the RecGen node needs, pre-synced.
Use it as your first smoke test after installing the pack, or as a way to sanity-check that your ComfyUI setup can actually run the model. It's also the honest answer to "what does this even output" - you see the example RGB, its depth map, and its mask all lined up in one glance.
The one input, the seven outputs
The entire input surface is a single dropdown: example, listing ex0 through ex5 (the loader scans the RecGen repo's examples/ folder and lists whatever's actually there, so you may see a couple more). Pick one and you get:
- image - RGB tensor
[1, H, W, 3] - depth - depth map in metres
- mask - the object mask, normalized 0–1
- fx / fy / cx / cy - the camera intrinsics as FLOATs
That's the whole trick: the loader reads examples/ex{n}_rgb.png, _depth.png, _mask.png plus an intrinsics.yaml (keys fu/fv/pu/pv) from the sibling RecGen repo and converts them into proper ComfyUI tensors. Depth is divided by 1000 if it looks like millimeters, and cx/cy come through as -1 (the auto-center sentinel). Wire every output straight into RecGen 2D to 3D and you have a zero-config demo workflow - the pack ships a prebuilt recgen_smoke.json in its workflows/ folder that does exactly this.
Installing it
Same story as the rest of the pack - this node only loads files from the upstream RecGen repo, so the pack isn't complete without it:
cd ComfyUI/custom_nodes
git clone https://github.com/kaili-yang/ComfyUI-Recgen
git clone https://github.com/TRI-ML/RecGen
pip install -e /path/to/recgen
pip install -e /path/to/ComfyUI/custom_nodes/ComfyUI-Recgen
Restart ComfyUI, find both nodes under RecGen, and run the example loader → RecGen 2D to 3D chain. First inference still pulls the ~10 GB of model weights from HuggingFace, so don't mistake that long wait for a hang.
Gotchas
The one failure mode you'll actually hit: "RecGen not found. Run install.py or place recgen next to ComfyUI-Recgen." This node reads its data from recgen/examples/ - the sibling repo's directory - not from this pack. So if you cloned ComfyUI-Recgen but skipped the TRI-ML/RecGen clone (or Manager's install.py didn't run), the dropdown has nothing to load and the node raises exactly that error. Cloning RecGen and restarting fixes it.
Second gotcha is subtler: the example images are small (256×256), and the intrinsics the loader emits match that resolution. That's fine for a demo, but it's also why copying these numbers into a workflow with 1024×1024 inputs gives you a distorted mesh - the loader is a validation tool, not a source of transferable camera parameters. Once you're past the smoke test, you wire in your own depth, mask, and calibrated intrinsics and this node's job is done.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| example | COMBO | ex0 | 6 options: ex0, ex1, ex2, ex3, ex4, ex5 |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| depth | IMAGE | — |
| mask | MASK | — |
| fx | FLOAT | — |
| fy | FLOAT | — |
| cx | FLOAT | — |
| cy | FLOAT | — |