Nodes/ComfyUI_PHRenderFormerWrapper/RenderFormer Scene Builder
ComfyUI Node

RenderFormer Scene Builder

The assembly point where your 3D scene becomes data the transformer can eat

By paulh4x·Created about a year ago·Updated about a year ago· 37
RenderFormer Scene Builder
  • mesh
  • lighting
  • camera
  • camera_sequence
  • lighting_sequence
  • mesh_sequence
  • SCENE
  • SCENE_SEQUENCE
num_frames1
add_default_backgroundfalse

This is the hub of the whole pack. Everything you've built so far - the mesh (or combined meshes), the camera, the lights - converges here, and the node turns it into a SCENE (or a whole SCENE_SEQUENCE for animation) that the RenderFormerGenerator sampler can render. If you're staring at a workflow and wondering where the "render the scene" magic happens, it's split between this node and the Sampler: Scene Builder composes, Sampler executes.

It's part of paulh4x/ComfyUI_PHRenderFormerWrapper, the "100% vibecoded" wrapper around Microsoft's RenderFormer (SIGGRAPH 2025). Keep expectations calibrated: it genuinely works, but it's a first-project codebase with no official support, so treat the rough edges as part of the experience.

What it does

The node takes your components, bakes them into RenderFormer's in-memory scene representation (it patches trimesh and h5py to keep intermediate meshes in memory instead of on disk - a big speedup over the early versions), and returns:

  • SCENE - a single static scene, for one image.
  • SCENE_SEQUENCE - a list of per-frame scenes, for video. It's returned alongside SCENE; one of the two will be None depending on what you built.

The required inputs are the ones you'd expect:

  • mesh - your MESH (from LoadMesh, or the combined output of MeshCombine).
  • lighting - LIGHTING. Note: this is now required and is always treated as the start-frame lighting. Earlier versions had an end_lighting input; that was removed in 0.3.3 in favor of the sequence input below.
  • camera - your CAMERA, treated as the start-frame view.

The optional inputs are where animation lives:

  • camera_sequence, lighting_sequence, mesh_sequence - the outputs of the Camera/Lighting/Mesh Target nodes. Provide any of these and set num_frames > 1 and the node switches into animation mode.
  • num_frames - default 1. This is the trigger: with num_frames > 1 and a sequence connected, it builds a start frame and an end frame and interpolates the rest, emitting a SCENE_SEQUENCE.
  • add_default_background - default off. Flips on to add RenderFormer's plane + three walls as background geometry. If you've loaded a background mesh yourself, leave it off - the node skips the default to avoid duplicates anyway.

How the animation path works

The scene builder treats the camera, lighting, and mesh inputs as frame zero, and the corresponding *_sequence inputs as the end state. It builds start and end keyframe scenes in isolated temp dirs, then interpolates between them frame by frame (it's clever about meshes: if a mesh is being animated, it filters the animated object out of the static list so nothing doubles up). A progress bar keeps you informed on long builds.

Installing it

It ships with the pack, so install the pack to get it:

# ComfyUI Manager: search "ComfyUI_PHRenderFormerWrapper"
cd ComfyUI/custom_nodes/
git clone https://github.com/paulh4x/ComfyUI_PHRenderFormerWrapper.git
cd ComfyUI_PHRenderFormerWrapper
git clone https://github.com/microsoft/renderformer.git renderformer
pip install -r requirements.txt
python -c "import imageio; imageio.plugins.freeimage.download()"

Restart ComfyUI afterward. The renderformer subdirectory clone is required - the conversion code lives there.

Common issues

  • Nothing comes out of the Sampler - check that you've wired a mesh, lighting, and camera into this node; with the lighting input now required, a missing LIGHTING wire is the classic silent failure.
  • Animation doesn't animate - num_frames must be greater than 1 and at least one sequence input must be connected. A camera alone at num_frames = 1 gives you a still.
  • Flickering video - acknowledged limitation with glossy materials and per-frame precision variance. It's the model/wrapper, not your graph.

It's the one node in this pack that you'll have in every single workflow, static or animated.

CategoryPHRenderFormer

Inputs (8)

NameTypeDefaultDescription
meshMESH
lightingLIGHTING
cameraCAMERA
camera_sequenceoptCAMERA_SEQUENCE
lighting_sequenceoptLIGHTING
mesh_sequenceoptMESH
num_framesoptINT11–1000
add_default_backgroundoptBOOLEANfalse

Outputs (2)

NameTypeDescription
SCENESCENE
SCENE_SEQUENCESCENE_SEQUENCE