DiffBIR Restoration (Eric)
The diffusion-powered restorer in a mostly non-generative pack
- image
- restored_image
Every other restorer in this pack repairs an image. DiffBIR regenerates parts of it. That's a real distinction the wider ComfyUI community draws constantly between "more pixels" tools like ESRGAN and "more detail" tools like SUPIR or SeedVR2 - the second category can invent plausible content that was never actually in the source, and DiffBIR sits firmly in that camp. It's the heaviest, most parameter-dense node in this pack by a wide margin, and it's the one to reach for only once SwinIR, Restormer, and the classical filters have genuinely failed you.
How it works
DiffBIR is a two-stage pipeline. Stage one is a "cleaner" network that strips out obvious degradation - compression, noise, blur - the same job a non-generative restorer does. Stage two hands that cleaned image to a diffusion model, conditioned via ControlNet on the stage-one output, and lets it regenerate detail through the normal denoising-diffusion sampling process. That's why this node's parameter list looks like a Stable Diffusion sampler rather than a restoration filter: it is one, wired into a restoration pipeline. version picks between DiffBIR's checkpoint generations (v1 through v2.1, with real quality/speed differences between them), and sampler offers a long list of diffusion samplers because stage two is genuinely sampling from noise, not doing a single forward pass.
The inputs and outputs that matter
Beginners should focus on a handful and leave the rest at defaults:
image- required.task-sr,denoise,face, orunaligned_face. The face tasks matter enough to flag on their own: this is a generative model regenerating detail, and the KB-documented "face problem" that follows every generative restorer applies here too - it can shift identity, not just clean up a photo. Don't runface/unaligned_faceon something where getting the actual person's likeness right matters, without checking the result carefully.version(defaultv2.1) - the newest checkpoint family; older versions exist for compatibility but v2.1 is the one to start with.upscale(0.5 steps, default 4) andsteps(4–200, default 12) - output scale and diffusion step count. More steps generally means better quality at the cost of time; 12 is already a reasonable default.cfg_scale(default 6) - standard diffusion classifier-free guidance. Higher pushes harder toward the conditioning, lower gives the model more freedom.captioner(optional, defaultnone) - an automatic image captioner (llavaorram) that can improve results by giving the diffusion stage a text description of what it's looking at, but it needs its own extra weights.- Everything else -
noise_aug,start_point_type,rescale_cfg,strength, thecleaner_tiled/cldm_tiledtiling pairs, theguidance*loss-guided sampling fields,seed,device_preference,precision, and the prompt overrides - are there for when you need fine control, not for a first run. - Output:
restored_image.
How to install it
Search Eric_Image_Processing_Nodes in ComfyUI Manager, or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/Eric_Image_Processing_Nodes
cd Eric_Image_Processing_Nodes
pip install -r requirements.txt
Restart ComfyUI. This is the node in the pack where the download and VRAM story is genuinely different from the rest: under the hood it's running a Stable-Diffusion-scale pipeline (stage-one cleaner plus a ControlNet-conditioned diffusion model), so expect several gigabytes of checkpoint downloads the first time you run it - not the couple-hundred-MB downloads the pack's other AI nodes need - and meaningfully more VRAM and time per image than SwinIR or Restormer. If you also want the optional captioner, that's yet another model download (llava or ram) on top.
Common issues & troubleshooting
First run is very slow or seems stuck. That's the checkpoint downloads, plural - stage-one cleaner plus the diffusion weights, and the captioner if you enabled one. Give it real time and disk space before assuming it's hung.
Out of memory even after the other nodes in this pack ran fine. This is a genuinely heavier pipeline than anything else here. Enable cleaner_tiled and cldm_tiled and bring their tile sizes down before you give up on the image size - the two stages tile independently, so you may need to tune both.
Result looks like a different image, not a restored one. That's the generative-restoration trade-off, not a malfunction - at high cfg_scale/steps with a heavily degraded source, the diffusion stage has more freedom to invent. Drop cfg_scale, use fewer steps, or reduce strength if you want the output to stay closer to the input.
Face task changed who the person looks like. Expected behavior for this class of model, not a bug specific to this node - every generative restorer in the community carries this risk. If identity fidelity matters, prefer real_denoise-style non-generative restoration elsewhere in this pack, or treat DiffBIR's face output as a starting point to compare against the original rather than a final answer.
sampler choice doesn't seem to matter much. For most images the differences between the DPM++ variants here are subtle; it's more of a quality/speed lever than a correctness one. Don't spend too much tuning time here before adjusting steps and cfg_scale first.
Inputs (29)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| task | COMBO | sr | Select DiffBIR task |
| version | COMBO | v2.1 | Choose DiffBIR checkpoint family |
| sampler | COMBO | edm_dpm++_3m_sde | Sampling strategy for the diffusion stage |
| steps | INT | 124–200 | Number of diffusion steps |
| upscale | FLOAT | 4.01–8 | Output scaling factor (used for SR and face modes) |
| cfg_scale | FLOAT | 6.000–12 | Classifier-free guidance scale |
| captioneropt | COMBO | none | Automatic captioner (requires extra weights for llava/ram) |
| noise_augopt | INT | 00–40 | Noise augmentation level |
| start_point_typeopt | COMBO | noise | Initial latent for sampling (cond recommended for v1/v2 when stability is needed) |
| rescale_cfgopt | BOOLEAN | false | Gradually ramp the CFG scale |
| strengthopt | FLOAT | 1.000.1–1.5 | ControlNet conditioning strength |
| cleaner_tiledopt | BOOLEAN | false | Enable tiling for the stage-1 cleaner |
| cleaner_tile_sizeopt | INT | 512128–1024 | Tile size for cleaner when tiling is enabled |
| cleaner_tile_strideopt | INT | 25664–512 | Overlap between cleaner tiles |
| cldm_tiledopt | BOOLEAN | false | Enable tiling for the diffusion U-Net |
| cldm_tile_sizeopt | INT | 512256–1024 | Tile size for diffusion tiles |
| cldm_tile_strideopt | INT | 25664–512 | Overlap between diffusion tiles |
| guidanceopt | BOOLEAN | false | Enable restoration guidance loss |
| guidance_scaleopt | FLOAT | 0.000–1 | Strength of restoration guidance |
| guidance_lossopt | COMBO | w_mse | Guidance loss variant |
| guidance_spaceopt | COMBO | rgb | Color space for guidance loss |
| guidance_startopt | FLOAT | 0.000–1 | Fraction of steps before guidance activates |
| guidance_stopopt | FLOAT | 1.000–1 | Fraction of steps after which guidance stops |
| seedopt | INT | 2310–2147483647 | Random seed |
| device_preferenceopt | COMBO | auto | Device override |
| precisionopt | COMBO | fp16 | Computation precision |
| positive_prompt_overrideopt | STRING | Optional positive prompt override | |
| negative_prompt_overrideopt | STRING | Optional negative prompt override |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| restored_image | IMAGE | — |