Nodes/ComfyUI-ReNoise/ReNoise Model Pred
ComfyUI Node

ReNoise Model Pred

The Quiet Node That Makes ReNoise Inversion Actually Work

By logtd·Created 2 years ago·Updated 2 years ago· 6
ReNoise Model Pred
  • model
  • MODEL

ReNoiseModelSamplingPred is the least exciting node in this pack, and it's the one you'll silently break if you leave it out. You feed it a model and it hands the same model back, patched so ReNoise's inversion math actually lines up. No sliders, no preview, nothing visibly happens - and that's exactly the point. It's a quiet enabler: wire it between your checkpoint and the ReNoise Sampler, forget it exists, and get inversions that reconstruct instead of melting.

Why a patch is even needed

Normal image-to-image does a naive "inversion": it adds noise to your input image and then denoises it back, and the reconstruction drifts. ReNoise fixes that drift with an iterative approach, but it relies on getting the model's raw prediction back from the UNet. Standard ComfyUI models don't give you that. In ComfyUI's apply_model, the model's output goes through model_sampling.calculate_denoised, which for a vanilla epsilon-prediction model returns input − sigma × noise - i.e. you get the decoded image estimate, not the noise.

This node's source swaps that: it subclasses the epsilon sampling and overrides calculate_denoised to return the model output unchanged. So a patched model now hands back the raw prediction, and the ReNoiseSampler's custom step functions do their own reconstruction math on top of it. It also just clones your model (model.clone()) and patches the clone, so your checkpoint isn't mutated - you can keep a separate unpatched copy for the actual generation pass.

That's the whole thing. The node takes one model (MODEL) input, outputs one model (MODEL), and its category is tellingly "reference" - it's reference plumbing, not a tool you fiddle with.

Where it goes in the workflow

CheckpointLoaderSimple ──MODEL──▶ ReNoiseModelSamplingPred ──MODEL──▶ ReNoiseSampler

The example workflow that ships with the pack does exactly this: the patched model feeds the inversion side, while the generation/denoise pass runs against the plain checkpoint. If you skip this node and hook the raw checkpoint into ReNoiseSampler, the inversion computes against the wrong interpretation of the model output and the reconstruction falls apart - the whole "real image inversion" trick is gone.

Install and gotchas

It installs with the rest of the pack, which needs diffusers on top of ComfyUI's own dependencies:

python -m pip install diffusers

Then either grab it via ComfyUI Manager (search "ReNoise") or:

cd ComfyUI/custom_nodes
git clone https://github.com/logtd/ComfyUI-ReNoise

Restart ComfyUI after. If the nodes show up as failed after an update, the usual culprit is diffusers vanishing from your environment - reinstall it and reload. And one honest warning: this pack is marked WIP and hasn't been touched in a long while. It's built for the SD 1.5 / SDXL era and assumes a single CUDA GPU with fp16 latents hardcoded. If you're on a newer architecture or a Mac, expect friction that isn't your fault.

Categoryreference

Inputs (1)

NameTypeDefaultDescription
modelMODEL

Outputs (1)

NameTypeDescription
MODELMODEL