Load Bokeh Adapter
A Bokeh Loader That Doesn't Load Anything (Yet)
- adapter
Load Bokeh Adapter is the front door to this whole pack, and its name is a small lie: it doesn't actually pull any weights. It builds a little config object that tells the rest of the pipeline which adapter to use and how hard to push it. The real download happens later, in Apply Bokeh Adapter, on your first generation. Knowing that up front saves you a confused minute staring at an idle network monitor.
You reach for this node first in the four-node chain that gives FLUX.1-dev lens-like defocus control: Load Bokeh Adapter → Apply Bokeh Adapter → Bokeh Level → Bokeh KSampler. It feeds the adapter object that Apply Bokeh Adapter needs, and without it there's nothing to apply.
The inputs that matter
- adapter_name - a HuggingFace model ID, defaulting to
atfortes/BokehDiffusion. That's the research checkpoint from NTU S-Lab that this pack is a ComfyUI port of. You almost certainly want to leave this alone; there isn't a crowd of community-uploaded adapters to shop around yet. - bokeh_scale - strength of the defocus control, 0 to 2, default 1.0. This is the global volume knob. If the effect feels too strong across everything you generate, pull it down toward 0.7–0.8 here rather than fighting it per-image.
- lora_scale - scale for the LoRA components baked into the adapter, 0 to 2, default 1.0. The adapter ships as a mix of an embedding layer plus LoRA-linear projections that steer the attention. Leave it at 1.0 unless you're experimenting.
Output is a single adapter of type BOKEH_ADAPTER, which wires straight into Apply Bokeh Adapter. That's the only thing it connects to.
How it works
Under the hood this node does almost nothing clever: it packs adapter_name, bokeh_scale, and lora_scale into a dict and returns it. adapter is created as None in that dict - a placeholder that says "load me when a model is actually in front of you." Apply Bokeh Adapter is the one that hits HuggingFace, reads those three values, and sets the scales on the real model. So the loader is a config node, not a fetch node, and it's safe to re-run as many times as you like.
Installing the pack
The easiest route is ComfyUI Manager: search for BokehDiffusionComfyUI and install. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/jrabek/BokehDiffusionComfyUI
Restart ComfyUI. This pack pulls in real dependencies beyond ComfyUI's defaults - diffusers>=0.32.2, transformers>=4.53.0, huggingface_hub, opencv-python - so if nothing shows up after restart, install those and restart again:
pip install diffusers transformers huggingface_hub opencv-python
Gotchas
Nothing to troubleshoot at this node specifically, because it fails on the same things as the rest of the pack: it needs a FLUX model downstream, it needs a working HuggingFace connection the first time Apply Bokeh Adapter runs, and there's no community support to lean on - this is a niche research port with essentially zero forum discourse. If something's wrong, the enormous ========== log blocks this pack prints to the console are actually your best documentation.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| adapter_name | STRING | atfortes/BokehDiffusion | — |
| bokeh_scaleopt | FLOAT | 1.00–2 | — |
| lora_scaleopt | FLOAT | 1.00–2 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| adapter | BOKEH_ADAPTER | — |