ComfyUI-AnyToBokeh adds a scripted rack focus and real-looking bokeh to a finished video clip

Any-to-BokehFree (non-commercial weights; runs locally)

ComfyUI-AnyToBokeh is a new, unofficial node pack that brings the Any-to-Bokeh research model (ICLR 2026) into ComfyUI as a refocusing pass on video you already have. You script where the focus sits frame by frame, or lock it to a masked subject, and the model paints depth-aware, steady background blur without regenerating the shot.

What it does

Depth comes from ComfyUI's core Depth Anything 3 node and masks from the core SAM 3.1 detector, so neither is reimplemented. A Focus Control node takes keyframes as frame:depth pairs separated by semicolons, with a curve editor on the node; the bundled example pulls focus from near to far over 200 frames with 0:0.75;75:0.5;200:0.0. Focus From Mask keeps a subject such as "person" sharp, and Preview CoC shows the blur map before you spend GPU time. Two workflows ship in the repo: a keyframed rack focus and a follow-the-subject focus.

Worth knowing

The author tested it on Ubuntu with a 24 GB card. You need the Any-to-Bokeh UNet (7.5 GB) and VAE from the upstream Google Drive link, part of Stable Video Diffusion XT, and Depth Anything 3; optionally SAM 3.1. It uses its own weights loader, so you set the model paths and a Python path by hand. The upstream Any-to-Bokeh code and weights are CC BY-NC-SA 4.0, so personal and research use only, not client work, and the node pack itself has no licence file yet.

Read the primary source >

More coverage

Related entries

< Back to all entries