Back to All Tutorials
Intermediate23 min read

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.

By CGFlowStudio
2026-08-20

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.

💡
Why Renderer-Only In-Context Editing Changes Everything: Rather than forcing you to train weights or adjust LoRA strength parameters, Bernini-R reads reference images as living visual prompts. To change lighting or swap a product in a video, simply connect the reference image and describe the edit.

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 by Comfy-Org.

2. Supported Task Types Explained

Bernini-R automatically configures its conditioning pipeline based on the selected Task Type and connected input sockets:

img Image Task

Image Editing

Relighting, restyling, or subject insertion on static reference images.

v2v / rv2v Video Task

Video Restyling & Editing

Restyles video frames or applies reference-guided relighting and object insertion.

ads2v Ad Compositing

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:

📂 Bernini-R Model Component Directory Map ComfyUI/models/
📂 ComfyUI/models/
📁 diffusion_models/
📄 wan2.2_bernini_r_fp16.safetensors (Core Bernini-R Model)
📁 text_encoders/
📄 umt5_xxl_fp8_e4m3fn_scaled.safetensors
📁 vae/
📄 Wan2_1_VAE_bf16.safetensors
📁 loras/
📄 lightx2v_T2V_14B_cfg_step_distill_v2_lora_rank64_bf16.safetensors (4-Step Acceleration)

(Files can be downloaded directly from Comfy-Org/Bernini-R on Hugging Face).


4. Getting Started – Loading Official Templates

  1. Update ComfyUI: Ensure ComfyUI core is updated to register native loader nodes (WanBerniniLoader, BerniniTaskSelector).
  2. Open Template Menu: Navigate to Templates → Video → Bernini-R inside ComfyUI.
  3. 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.

Image Editing Flow
Source Image + Ref Image(s) BerniniTaskSelector (img) Bernini KSampler Edited Image Output

Step-by-Step Instructions

  1. Set Task Type: Ensure BerniniTaskSelector node is set to img.
  2. Connect Source Image: Load your base portrait or product shot into source_image.
  3. Connect Reference Images: Connect lighting or style references to ref_image_0, ref_image_1, etc.
  4. Write In-Context Prompt: Reference connected inputs explicitly using image0, image1 tags:
    • Example Prompt: "Relight the person in the source image to match the dramatic sunset illumination and golden shadows from image0."
  5. 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.

Video Editing Routing Flow
Load Video (Source)
Load Image (Ref 0)
BerniniTaskSelector
[Task: rv2v / v2v]
Wan VAE Decode → Edited Video Output

Step-by-Step Instructions

  1. Load Source Video: Load your video clip into the Load Video node.
  2. Set Task Type: Select rv2v (Reference Video Editing) or v2v (Video-to-Video Restyling).
  3. Attach Lighting/Style References: Connect target reference images to ref_image_0.
  4. 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."
  5. 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

In-Context Indexing Blueprint
[Source Media Action] + [Edit Action: Relight / Restyle] + [Reference Tag: image0 / image1]

Good vs. Weak Prompt Comparison

❌ Weak Prompt

"Make the video dark with cool lighting."

Fails to reference connected input images (`image0`) or specify which visual elements to modify.

✅ Strong In-Context Prompt

"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.