ComfyUI Node

RenderFormer Sampler

The sampler that turns a scene description into an actual image

By paulh4x·Created about a year ago·Updated about a year ago· 37
RenderFormer Sampler
  • model
  • scene
  • scene_sequence
  • IMAGE
  • IMAGES
resolution512
tone_mapperagx
resolution_vid512

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_mapper is anything but none, 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), or none for a raw clamped HDR. Default agx is a safe place to start.

The inputs that matter

  • model - the MODEL output from RenderFormerModelLoader. Required.
  • resolution - default 512, 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 single SCENE from the Scene Builder, for a still.
  • scene_sequence - a SCENE_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 (default 512). 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 feeds IMAGES straight into ComfyUI's native Create VideoSave Video chain, so your camera/light/mesh animation becomes an actual mp4 without leaving the graph. If you only rendered a still, IMAGES comes 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_mapper from agx to filmic or pbr_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 512 for 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.

CategoryPHRenderFormer

Inputs (6)

NameTypeDefaultDescription
modelMODEL
resolutionINT51264–4096
tone_mapperCOMBOagx4 options: none, agx, filmic, pbr_neutral
sceneoptSCENE
scene_sequenceoptSCENE_SEQUENCE
resolution_vidoptINT51264–4096

Outputs (2)

NameTypeDescription
IMAGEIMAGE
IMAGESIMAGE