Genfocus Deblur (Native)
All-in-focus from a blurry photo, trained LoRA included
- pipeline
- image
- deblurred
This is the node that actually does what the Genfocus paper demo does: take a blurry, defocused photo and restore it to a sharp, everything-in-focus version - using the trained DeblurNet LoRA, not a prompt approximation. If you came to Refocus to unblur your photos, this is the one you want. (Yes, that's a real and popular use case - the paper's release thread got multiple people asking exactly "can it make a blurry picture sharp?" before anyone had even shipped ComfyUI nodes.)
The name has "(Native)" to mark it as part of the diffusers-based family. That matters because of the pack's central quirk: the Genfocus LoRAs were trained on diffusers FLUX's separate Q/K/V attention layers, so the native nodes run a real diffusers FluxPipeline under the hood rather than ComfyUI's fused-QKV sampling. That's the price of getting the trained weights actually applied - the lighter DeblurNetApply utility node, by contrast, loads the LoRA and then ignores it.
What it does under the hood
Feed it a pipeline from a Genfocus loader and an image, and it builds the exact condition setup from the original demo.py:
- Condition 0: a black image with a vertical position offset - this supplies structure.
- Condition 1: your input image - this supplies content.
Both conditions carry the deblurring adapter, and only the deblurring LoRA is activated (the bokeh adapter is explicitly switched off to avoid interference). The standard deblur prompt, "a sharp photo with everything in focus", runs at the original's guidance of 3.5. Output is the deblurred IMAGE.
The inputs you'll set
- pipeline - GENFOCUS_PIPELINE from Genfocus Model Loader or Genfocus Model Loader (Components).
- image - the blurry input.
- steps (28) - the tooltip's recommendation. More steps = slightly cleaner, with diminishing returns.
- seed (42) - reproducibility.
- use_custom_prompt / custom_prompt - the escape hatch if you want to steer the deblur beyond the stock prompt. Off by default; the standard prompt is well matched to the LoRA, so only touch this if you know why.
Workflow order and quality tips
The README is emphatic about ordering: deblur first, then depth-estimate and refocus. The bokeh network expects a sharp input, and if you skip deblurring, the original blur mixes with the generated bokeh unpredictably and everything comes out softer than intended. A couple of quality notes worth keeping:
- Run deblur before bokeh, always.
- 32–50 steps give a bit more refinement if you're patient.
- FLUX is happiest at ~1024² or a bit above - the node auto-pads to multiples of 16 anyway.
- For extra crispness after upscaling, the README suggests a Richardson-Lucy deconvolution node as a final post-process.
Install
Same pack, same prerequisites: pip install diffusers transformers accelerate peft, the Genfocus LoRAs in models/genfocus/, and a FLUX-dev-architecture model loaded via one of the two Genfocus loaders. Then the usual FLUX realities - ~24GB VRAM at bf16 or offload_to_cpu, and don't even think about FLUX.1-schnell, whose timestep distillation is incompatible with these LoRAs. If you have the VRAM budget, this is the deblur you're looking for.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| pipeline | GENFOCUS_PIPELINE | — | |
| image | IMAGE | — | |
| steps | INT | 281–100 | Denoising steps (28 recommended) |
| seed | INT | 420–4294967295 | — |
| use_custom_promptopt | BOOLEAN | false | Use custom prompt instead of standard deblur prompt |
| custom_promptopt | STRING | Custom prompt (only used if use_custom_prompt is True) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| deblurred | IMAGE | — |