RenderFormer Sampler
The sampler that turns a scene description into an actual image
- model
- scene
- scene_sequence
- IMAGE
- IMAGES
This is where it pays off. After you've loaded a model, built a mesh, framed a camera, and assembled a scene, the RenderFormerGenerator - displayed as "RenderFormer Sampler" - is the node that actually runs Microsoft's RenderFormer transformer and hands you an image. Everything upstream is data preparation; this is the render.
It's part of paulh4x/ComfyUI_PHRenderFormerWrapper, the "100% vibecoded" wrapper around RenderFormer (SIGGRAPH 2025). It's experimental, it's the author's first coding project, and it still works impressively well - the community thread that introduced it showed off 1024² renders at about 1.15s per frame on a 4090 in fp32.
How it works
RenderFormer isn't a rasterizer or a ray tracer. It's a transformer that takes your scene's triangle mesh, material texture data, mask, camera, and FOV, and predicts the rendered image - including global illumination - in one pass. That's why the pack calls it a "sampler": like a diffusion sampler, it's executing a neural model, not doing classic 3D math.
The node's job is to feed that model and convert its output into something ComfyUI can display:
- The pipeline returns a log-space HDR image (
10^x - 1), which needs tone mapping. - If
tone_mapperis anything butnone, it runs the HDR image through OCIO (simple-ocio) tone mapping. Your choices:agx(default - the modern, filmic look),filmic,pbr_neutral(Khronos PBR Neutral, the physically-based standard), ornonefor a raw clamped HDR. Defaultagxis a safe place to start.
The inputs that matter
model- theMODELoutput fromRenderFormerModelLoader. Required.resolution- default512, range 64–4096 in steps of 64. This controls the single-image render. Sweet spot per the author: 512² to 1024². The model can do 2048² but quality visibly degrades past 1024 - you'll see it in the comparison image in the README.tone_mapper- discussed above.scene- a singleSCENEfrom the Scene Builder, for a still.scene_sequence- aSCENE_SEQUENCE, for video. Provide one or the other (or both - if you feed a sequence, the first frame also becomes the still).resolution_vid- separate resolution control for the video/sequence path (default512). Nice touch: you can render a still at 1024 and the animation at 512 to save time.
The outputs
IMAGE- a single rendered frame.IMAGES- a batch of frames when rendering a sequence. The README's video workflow feedsIMAGESstraight into ComfyUI's nativeCreate Video→Save Videochain, so your camera/light/mesh animation becomes an actual mp4 without leaving the graph. If you only rendered a still,IMAGEScomes back as an empty tensor.
Installing 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, then load the model through the Model Loader (it downloads from Hugging Face on first use).
Common issues
- Grainy or noisy output - check your resolution isn't past 1024², and that you're not tone-mapping a scene that needed the lights cranked. Lighting strength defaults are in the thousands because RenderFormer expects physical-ish units.
- Video looks washed out or flat - switch
tone_mapperfromagxtofilmicorpbr_neutral; HDR-to-LDR mapping has a big say in the look, and it's the cheapest knob to try. - Slow at high res - drop to
resolution 512for iteration and only push to 1024 for final shots. The 4090 timing above was fp32 at 1024²; fp16 on the loader cuts memory.
It's the payoff node - the one you wire Save Image to and finally see whether your scene was any good.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| resolution | INT | 51264–4096 | — |
| tone_mapper | COMBO | agx | 4 options: none, agx, filmic, pbr_neutral |
| sceneopt | SCENE | — | |
| scene_sequenceopt | SCENE_SEQUENCE | — | |
| resolution_vidopt | INT | 51264–4096 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| IMAGES | IMAGE | — |