Image-to-Image
Diffusers
image-editing
bokeh-editing
LoRA

AnyBokeh: Physics-Guided Any-to-Any Bokeh Editing with Optical Fingerprint Transfer

Paper | Project Page | Code

Input | Output

AnyBokeh transforms an image from an arbitrary source optical state to a desired target focus and aperture setting. It consists of two LoRAs on top of FLUX.1-Fill-dev:

  • stage1/: estimates the circle-of-confusion (CoC) map and the disparity map of the input image.
  • stage2/: re-renders the image with the target focus point and aperture.

Each folder also contains the precomputed text embeddings of the stage prompt, so the text encoders are not needed at inference.

Usage

git clone https://github.com/itsmag11/AnyBokeh.git
cd AnyBokeh
python inference_full.py --image_path examples/127_f5.0.JPG --focus_x 904 --focus_y 613 --source_aperture 5.0 --target_aperture 2.8 --output_path outputs/127_f5.0_to_f2.8.jpg

The weights in this repo are downloaded automatically. See the GitHub repo for more details.

Citation

@inproceedings{hou2026anybokeh,
  title     = {AnyBokeh: Physics-Guided Any-to-Any Bokeh Editing with Optical Fingerprint Transfer},
  author    = {Hou, Xinyu and Li, Xiaoming and Yue, Zongsheng and Loy, Chen Change},
  booktitle = {Advances in Neural Information Processing Systems (NeurIPS)},
  year      = {2026}
}
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for itsmag11/AnyBokeh

Finetuned
(34)
this model

Paper for itsmag11/AnyBokeh