Nodes/ComfyUI-BerniniR Wrapper/Bernini-R Conditioning
ComfyUI Node

Bernini-R Conditioning

Creates latent and attaches in-context visual references for Bernini-R. Encodes source_video, reference_video, and reference_images to context_latents with chunked encoding for VRAM efficiency. Supports batch_size > 1 for parallel generation.

By xiaolibai-sys·Created about a month ago·Updated 28 days ago· 8
Bernini-R Conditioning
  • positive
  • negative
  • vae
  • source_video
  • reference_video
  • reference_images
  • mask
  • positive
  • negative
  • latent
width832
height480
length81
batch_size1
ref_max_size848
chunk_frames16
chunk_overlap4
mask_modeanneal
CategoryBernini-R/Conditioning

Inputs (15)

NameTypeDefaultDescription
positiveCONDITIONING
negativeCONDITIONING
vaeVAE
widthINT83264–4096
heightINT48064–4096
lengthINT811–10000
batch_sizeINT11–64
ref_max_sizeINT84864–4096
chunk_framesINT161–256Max pixel frames per VAE encoding chunk. Snapped to nearest multiple of 4 internally.
chunk_overlapINT44–32Pixel frames of overlap between chunks. Prevents temporal boundary artifacts from VAE 3D convolutions.
source_videooptIMAGE
reference_videooptIMAGE
reference_imagesoptIMAGE
maskoptMASKMask of the region to edit. White (1) = regenerate, black (0) = keep source. From a segmenter like SAM2; connect directly without inverting. Connecting enables differential diffusion.
mask_modeoptCOMBOannealanneal = soft background anchoring with natural boundaries (default); freeze = pixel-level freeze, background stays completely still

Outputs (3)

NameTypeDescription
positiveCONDITIONING
negativeCONDITIONING
latentLATENT