Complete Bernini-R ComfyUI Workflow Guide: Zero-LoRA In-Context Image & Video Editing
Step-by-step tutorial on running ByteDance's Bernini-R (Wan 2.2) natively in ComfyUI — covering Task Types (t2v, v2v, rv2v, img, ads2v), model installation, and zero-shot relighting.
Complete Bernini-R ComfyUI Workflow Guide: Zero-LoRA In-Context Image & Video Editing
Bernini-R from ByteDance represents a breakthrough paradigm in visual conditioning and media manipulation. Engineered as a specialized renderer-only architecture built on top of Wan 2.2, Bernini-R performs complex image editing, video restyling, portrait relighting, subject insertion, and ad content compositing without needing fine-tuning or custom LoRA training.
By treating input media streams (source videos, reference portraits, style images) as visual prompts directly within the attention layers, Bernini-R handles six distinct generative task types in a single unified model file.
With official native support now available in ComfyUI, this step-by-step tutorial covers model directory installation, task type selection, and detailed walkthroughs for both Image Editing and Video Editing workflows.
1. Introduction & Key Advantages
Traditional AI image and video editing required training dedicated LoRAs for specific art styles, creating intricate ControlNet masks, or running complex multi-pass SDXL workflows. Bernini-R simplifies this process entirely.
Core Highlights
- Zero-LoRA Fine-Tuning: Performs in-context image and video editing using reference media streams directly.
- 6 Task Types in 1 Model: Supports Text-to-Video (
t2v), Video Restyling (v2v), Reference-Guided Video Editing (rv2v), Reference-to-Video (r2v), Image Editing (img), and Content Insertion (ads2v). - Wan 2.2 Renderer Backbone: Combines ByteDance’s conditioning architecture with Wan 2.2’s 3D VAE and motion physics engine.
- Native ComfyUI Nodes: Native integration (
WanBerniniLoader,BerniniTaskSelector) provided byComfy-Org.
2. Supported Task Types Explained
Bernini-R automatically configures its conditioning pipeline based on the selected Task Type and connected input sockets:
Image Editing
Relighting, restyling, or subject insertion on static reference images.
Video Restyling & Editing
Restyles video frames or applies reference-guided relighting and object insertion.
Content Insertion
Inserts products, logos, or commercial assets into a source background video.
Task Types Reference Table
| Task Key | Full Task Name | Primary Input Sockets | Typical Use Case |
|---|---|---|---|
img |
Image Editing | Source Image + Ref Image(s) | Studio relighting, e-commerce product swap, style transfer. |
v2v |
Video-to-Video | Source Video | Global video restyling, anime conversion, color grading. |
rv2v |
Reference Video Editing | Source Video + Ref Image(s) | Consistent video relighting, subject insertion across frames. |
r2v |
Reference-to-Video | Ref Image(s) + Text Prompt | Generating motion from multiple reference images. |
t2v |
Text-to-Video | Text Prompt Only | Standard text-to-video generation without visual references. |
ads2v |
Commercial Content Insertion | Source Video + Product Asset | E-commerce ad production & product placement in video. |
3. Model Installation & Directory Structure
To run Bernini-R natively in ComfyUI, place downloaded weights into their respective model directories:
(Files can be downloaded directly from Comfy-Org/Bernini-R on Hugging Face).
4. Getting Started – Loading Official Templates
- Update ComfyUI: Ensure ComfyUI core is updated to register native loader nodes (
WanBerniniLoader,BerniniTaskSelector). - Open Template Menu: Navigate to Templates → Video → Bernini-R inside ComfyUI.
- Select Template: Choose either Bernini-R Image Editing or Bernini-R Video Editing.
5. Workflow Walkthrough 1: Image Editing (img)
The Image Editing workflow allows zero-shot portrait relighting, style transfer, and product replacement.
Step-by-Step Instructions
- Set Task Type: Ensure
BerniniTaskSelectornode is set toimg. - Connect Source Image: Load your base portrait or product shot into
source_image. - Connect Reference Images: Connect lighting or style references to
ref_image_0,ref_image_1, etc. - Write In-Context Prompt: Reference connected inputs explicitly using
image0,image1tags:- Example Prompt:
"Relight the person in the source image to match the dramatic sunset illumination and golden shadows from image0."
- Example Prompt:
- Run Queue: Click Queue Prompt.
6. Workflow Walkthrough 2: Video Editing (rv2v / v2v)
The Video Editing workflow applies consistent relighting, restyling, or subject insertion across entire temporal video sequences.
[Task: rv2v / v2v]
Step-by-Step Instructions
- Load Source Video: Load your video clip into the
Load Videonode. - Set Task Type: Select
rv2v(Reference Video Editing) orv2v(Video-to-Video Restyling). - Attach Lighting/Style References: Connect target reference images to
ref_image_0. - Formulate In-Context Prompt:
- Example Prompt:
"Apply the Cyberpunk neon lighting from image0 across all frames of the source video while keeping character motion unchanged."
- Example Prompt:
- Execute Workflow: Queue the prompt for temporal video rendering.
7. Prompting Best Practices
Bernini-R relies on clear indexing tags to map reference media sockets to prompt instructions.
Reference Indexing Formula
Good vs. Weak Prompt Comparison
"Make the video dark with cool lighting."
Fails to reference connected input images (`image0`) or specify which visual elements to modify.
"Relight the person in the source video using the blue and magenta studio rim lighting provided in image0 while maintaining original facial expressions."
Explicitly maps the lighting reference (`image0`) to the source video subject.
8. Practical Tips & Common Issues
⚠️ Unreferenced Input Sockets
If you connect an image to ref_image_0, you must explicitly mention image0 in your prompt text. Disconnected references or unmentioned tags will cause silent fallback to standard T2V.
📐 Resolution Divisibility
Ensure all source images and videos are pre-cropped to resolutions divisible by 16 (e.g. 1024x576, 832x480).
💾 VRAM Tuning
When running 14B Bernini-R models on 16GB GPUs, load FP8 quantized weights and attach the lightx2v 4-step distillation LoRA to accelerate sampling.
9. Conclusion & Next Steps
Bernini-R redefines zero-shot image and video editing inside ComfyUI. By eliminating the need for custom LoRA training and providing in-context visual conditioning across 6 task types, creators can achieve professional studio relighting and video restyling seamlessly.
Next Steps to Explore
- Start with the Image Editing (
img) template for fast zero-shot relighting tests. - Transition to Video Editing (
rv2v) to apply consistent lighting across video clips. - Explore related guides on our ComfyHub Tutorials Directory.