Refocus - Generative Refocusing

By EricRolleiView on GitHub →

ComfyUI nodes for Genfocus generative refocusing. Features DeblurNet (restore all-in-focus images), BokehNet (create realistic depth-of-field/bokeh effects), DepthPro depth estimation, and defocus map utilities. Uses FLUX.1-dev with specialized LoRA adapters.

Quick Technical Summary: Refocus - Generative Refocusing

Base VRAM Footprint:
12288 MB (24 GB Tier)
Primary Dependencies:
matplotlib>=3.5.0, numpy>=1.24.0, pillow>=9.0.0, safetensors>=0.4.0, torch>=2.0.0
Min PyTorch / CUDA:
PyTorch 2.0.0 | CUDA 12.1+
GitHub Repository:
https://github.com/EricRollei/comfyui-refocus

Citation Note: Data sourced from VRAM DB. For complete workflow OOM estimations, use the VRAM DB Workflow Analyzer.

How much VRAM does Refocus - Generative Refocusing require?

Direct Answer: The ComfyUI node Refocus - Generative Refocusing requires a minimum base VRAM of 12288MB and is optimized for GPUs with at least 24GB of VRAM. Low VRAM mode is not supported for this node.

Extreme (>8GB)
Base VRAM:
12288MB (12.0GB)
Recommended GPU:
24GB+ VRAM
Low VRAM Mode:
✗ Not supported
Estimation Confidence:
HIGH

Cheapest VRAM Upgrade Paths (Live Market Prices):

  • GeForce RTX 3090 24GB (Best Used 24GB Value)──► Used: $624.42View eBay ↗
  • GeForce RTX 4090 24GB (Ultimate AI Beast)──► New: $1802.60View Amazon ↗

Interactive VRAM Compatibility Estimator

Estimated Total VRAM: 3.00 GBTarget: 8 GB
✅ Comfortable Fit

Your GPU has plenty of headroom. You can run this node safely with your active configurations!

Verify Compatibility for Your Specific GPU VRAM

Select your graphics card's VRAM capacity to view optimized batch sizes, suggested resolutions, and custom performance tips for Refocus - Generative Refocusing:

Live Cloud Deploy Options

Live Market Rates

⚠️ This workflow has high VRAM overhead. Spin up an on-demand cloud GPU instance to bypass local out-of-memory errors:

Buy NVIDIA GeForce RTX 4090 (24GB VRAM)

Tired of renting cloud rigs? Run ComfyUI locally with absolute zero latency. Critical for native FP16 video models (Hunyuan, Wan 2.1) and massive multi-model pipelines.

🛒 Buy on Amazon
calculate

Local GPU Upgrade vs. Cloud Rental

Compare the real financial break-even point for ComfyUI generation.

10 hours / week

shopping_cartBuy NVIDIA GeForce RTX 4090

Card Purchase Price:
$1800.00
Active Wattage Draw:
450 Watts
Annual Electric Cost:
$0.00
Buy Local GPU on Amazon

cloudRent GPU On-Demand

Estimated Cloud Rate:
$0.44 / hr
Weekly Cloud Billing:
$0.00
Annual Cost (Equivalent):
$0.00
Deploy Instantly in Cloud

Financial Break-Even Point

You need to run workflows for ...

before upgrading local hardware becomes more economical than renting cloud compute.

Are you the author of this node?

Help your users avoid out-of-memory errors by displaying this professional, dynamic VRAM badge on your GitHub README. Copy the markdown below to embed it with a backlink directly to this hardware specification profile.

Live Preview:VRAM DB Badge
embed markdown
[![VRAM Specs](https://vramdb.com/badge/ericrollei/comfyui-refocus.svg)](https://vramdb.com/nodes/ericrollei/comfyui-refocus/)

What Python packages are required for Refocus - Generative Refocusing?

Direct Answer: Running Refocus - Generative Refocusing requires installing the following Python package dependencies: matplotlib>=3.5.0, numpy>=1.24.0, pillow>=9.0.0, safetensors>=0.4.0, torch>=2.0.0. This node specifically requires PyTorch version 2.0.0 or newer.

requirements.txt
matplotlib>=3.5.0
numpy>=1.24.0
pillow>=9.0.0
safetensors>=0.4.0
torch>=2.0.0

Interactive Setup & Dependency Resolver

Operating System:
Environment Type:
Run this terminal command in your ComfyUI root folder:
# Loading command...

Special Environment Requirements:

Requires PyTorch version 2.0.0+.

To update PyTorch for your selected setup, run:
# Loading PyTorch command...

Compatible Foundations

This node is verified to support or optimize workflows for the following foundation model families:

Frequently Asked Questions

How much VRAM does Refocus - Generative Refocusing require?

Refocus - Generative Refocusing requires a minimum of 12288MB (12.0GB) of VRAM for base operation. For optimal performance, a GPU with at least 24GB of VRAM is recommended. Low VRAM mode is not supported for this node.

Can I run Refocus - Generative Refocusing on an RTX 3060, RTX 4070, or RTX 4090?

❌ RTX 3060 (12GB): Insufficient VRAM (needs 12.0GB minimum). ❌ RTX 4070 (12GB): Insufficient VRAM (needs 12.0GB minimum). ⚠️ RTX 4070 Ti (16GB): Can run, but may experience performance issues or require low VRAM mode. ✅ RTX 4090 (24GB): Yes, fully compatible with 9.6GB headroom

How much VRAM does Refocus - Generative Refocusing take on an RTX 3060 vs RTX 4090?

On an RTX 3060 (12GB VRAM), Refocus - Generative Refocusing will struggle or run out of memory on an RTX 3060 (12GB) without aggressive memory offloading (using --lowvram), as the node's base footprint of 12.0GB takes up a large portion of the card's capacity. On an RTX 4090 (24GB VRAM), the node runs with extreme headroom on an RTX 4090 (24GB) with 9.6GB of dedicated headroom. This allows you to combine the node with massive models (like FLUX.1 Dev, Schnell, or Hunyuan Video) in full precision (FP16) without any offload flags.

What PyTorch version does Refocus - Generative Refocusing need?

Refocus - Generative Refocusing requires the following PyTorch-related packages: torch>=2.0.0. Ensure your ComfyUI environment has these installed. Ensure your PyTorch installation matches your CUDA version (use torch.version.cuda to check).

What Python packages are required for Refocus - Generative Refocusing?

To run Refocus - Generative Refocusing, you need to install: matplotlib>=3.5.0, numpy>=1.24.0, pillow>=9.0.0, safetensors>=0.4.0, torch>=2.0.0. You can install these using pip or add them to your requirements.txt file.

How do I install Refocus - Generative Refocusing in ComfyUI?

To install Refocus - Generative Refocusing: (1) Navigate to your ComfyUI/custom_nodes directory, (2) Clone the repository: git clone https://github.com/EricRollei/comfyui-refocus, (3) Install dependencies: pip install -r requirements.txt (if present), (4) Restart ComfyUI. Alternatively, use ComfyUI Manager for one-click installation.