Nodes/ComfyUI-EbSynth/ES Video Transfer
ComfyUI Node

ES Video Transfer

The node that carries your keyframes through the whole video

By FuouM·Created 2 years ago·Updated about a year ago· 111
ES Video Transfer
  • source_video
  • style_images
  • source_mask
  • result_video
  • error_video
style_idxes0
edge_methodClassic
flow_modelsintel
only_modenone
do_maskfalse
pre_maskfalse
feather5
style_weight6.00
edge_weight1.00
warp_weight0.50
pos_weight2.00
uniformity3500.00
patch_size5
pyramid_levels6
search_vote_iters12
patch_match_iters6
extra_pass_3x3true
use_gpu_hist_blendfalse
use_lsqrtrue
use_poisson_cupyfalse
poisson_maxiter0

EbSynth is the old trick that still refuses to die, and this is the node that brings it into ComfyUI properly. You style a handful of frames however you want - img2img, a ControlNet pass, an upscale, or actual hand-painting - drop those frames in as keyframes, and EbSynth propagates the look to every other frame in the clip. No diffusion at inference time, no video model churning for minutes per clip, just fast, shockingly consistent style transfer. If you've ever spent an afternoon fighting temporal flicker with AnimateDiff or a video model, this is the antidote: the motion is whatever your source video already has, so the style warps with it instead of fighting it.

How it works

EbSynth (Jamriska, 2018) is patch-based example synthesis, not a neural network running per-frame. It matches small image patches between your source video and your stylized keyframe, then rebuilds each frame from those matched patches using a multi-scale pyramid - think of it as guided texture transfer rather than generation. The node's real job is feeding that engine good guides: an edge map (so structure doesn't smear), and RAFT optical flow so the style follows motion instead of just diffusing in place.

Two things the author (FuouM, who also wrote the Ezsynth Python library this pack wraps) fixed over the classic app: flow is computed frame-by-frame with correct time orientation, and "blending" runs a forward pass from one style frame and a reverse pass from the next, then merges them. That blending is what makes transitions between keyframes smooth - and also what makes long clips slow.

The inputs that actually matter

  • source_video and style_images - both IMAGE batches. Load your clip with Video Helper Suite (the author built this to interface natively with it), style a few frames, feed both in.
  • style_idxes - a string of absolute frame indices, underscore-separated. 0_30_60 for three keyframes. This is the field people get wrong first: the count must match style_images, or you get a "Style indices mismatch" error.
  • edge_method - Classic (default, the balance), PST (good structure, less detail), PAGE (best detail, slow). Leave it on Classic until you're chasing quality.
  • flow_model - sintel or kitti, both RAFT weights that ship with the pack. No download needed.
  • only_mode - none (default) does the full forward+reverse blend; forward or reverse skips half the work when a clip is taking forever.
  • source_mask (optional) plus do_mask / pre_mask / feather - for limiting the transfer to part of the frame. Keep pre_mask off unless you need it; it roughly doubles per-frame time.
  • The pile of weight floats (style_weight, edge_weight, warp_weight, pos_weight) and the EbSynth params (uniformity, patch_size, pyramid_levels, …) - honestly, the default settings work for most cases. Tweak style_weight first.

Outputs: result_video (the styled frames) and error_video (a per-frame error map - genuinely useful for spotting which cuts are giving the engine trouble). Wire result_video into Video Helper Suite's save-video node.

Install

cd ComfyUI/custom_nodes
git clone --recurse-submodules https://github.com/FuouM/ComfyUI-EbSynth.git
pip install -r requirements.txt

The --recurse-submodules matters - Ezsynth is a git submodule and nothing works without it. ComfyUI Manager also has it if you search "ComfyUI-EbSynth". There's no install.py to run. Dependencies are modest: numpy, opencv-python, torch, torchvision, scipy, Pillow, and phycv (the physics-based edge detector). Cupy/cupyx are optional extras that make histogram blending ~100x faster.

Where people get burned

  • Linux: the bundled binary is ebsynth.dll - Windows only. On Linux you must build ebsynth.so from the Ezsynth library's build script, or every run dies in the ctypes loader. Windows is plug-and-play; macOS isn't supported at all.
  • Style index mismatch - the error tells you exactly how many style frames it found vs. the indices you wrote. Fix the string.
  • Fast motion = smudging. Classic EbSynth weakness. Add more keyframes near the fast sections or nudge style_weight up.
  • Cloned without submodules → import errors. Just re-clone properly.
CategoryEbSynth

Inputs (24)

NameTypeDefaultDescription
source_videoIMAGE
style_imagesIMAGE
style_idxesSTRING0
edge_methodCOMBOClassic3 options: PAGE, PST, Classic
flow_modelCOMBOsintel2 options: sintel, kitti
only_modeCOMBOnone3 options: forward, reverse, none
do_maskBOOLEANfalse
pre_maskBOOLEANfalse
featherINT5
style_weightFLOAT6.00
edge_weightFLOAT1.00
warp_weightFLOAT0.50
pos_weightFLOAT2.00
uniformityFLOAT3500.00500–15000
patch_sizeINT5
pyramid_levelsINT6
search_vote_itersINT12
patch_match_itersINT6
extra_pass_3x3BOOLEANtrue
use_gpu_hist_blendBOOLEANfalse
use_lsqrBOOLEANtrue
use_poisson_cupyBOOLEANfalse
poisson_maxiterINT0
source_maskoptIMAGE

Outputs (2)

NameTypeDescription
result_videoIMAGE
error_videoIMAGE