ComfyUI-FL-BerniniR
Bernini-R omni video generation nodes for ComfyUI
Nodes (4)
FL Bernini-R
Omni video generation nodes for ComfyUI powered by ByteDance's Bernini-R model. The pack runs the official Bernini source in-process inside the ComfyUI Python environment and exposes a compact loader/generate workflow with modality-aware controls, live node progress, image preview output, and saved image/video files.
Features
- Standalone node pack - Installs as
ComfyUI-FL-BerniniRwithout depending on another FL pack. - ComfyUI-native runtime - Uses the active ComfyUI Python environment and model folders.
- Modality-aware generation - One generate node supports Bernini-R text, image, video, reference, and ads-style task modes.
- Model loader cache - Load Bernini-R once and reuse it across prompts, with a dedicated unload node and
unload_after_runoption. - Live visibility - Sends structured progress events to the ComfyUI frontend and displays the current stage on the node.
- Image and video outputs - Returns an image preview plus output path, final prompt, and debug JSON.
- Comfy-safe attention fallback - Defaults to PyTorch SDPA to avoid incompatible FlashAttention bindings in mixed Comfy environments.
Nodes
| Node | Description |
|------|-------------|
| FL Bernini-R Environment Check | Reports Python, CUDA, GPU, dependency, and Bernini import status. |
| FL Bernini-R Loader | Loads ByteDance/Bernini-R-Diffusers from the ComfyUI model folder or an override path. |
| FL Bernini-R Generate | Runs Bernini-R generation for image/video modalities with prompt, resolution, frame, guidance, and seed controls. |
| FL Bernini-R Unload | Clears the cached Bernini-R pipeline and releases memory. |
Installation
ComfyUI Manager
Search for ComfyUI-FL-BerniniR and install.
Manual
cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI-FL-BerniniR.git
cd ComfyUI-FL-BerniniR
pip install -r requirements.txt
Restart ComfyUI after installation.
Model Setup
The default model path is:
ComfyUI/models/BerniniR/Bernini-R-Diffusers
Recommended model:
ByteDance/Bernini-R-Diffusers
The model is very large, roughly 117 GB. For first setup, either place the Hugging Face snapshot at the default path or enable download_if_missing on FL Bernini-R Loader. A large system RAM and VRAM budget is expected.
Quick Start
Text to Image
- Add FL Bernini-R Loader.
- Add FL Bernini-R Generate and connect the loader output to
pipeline. - Set
task_typetot2i. - Set
num_framesto1. - Start with a small resolution and low step count for the first smoke test.
- Queue the prompt and watch the node progress widget for the current stage.
Text to Video
- Use the same loader/generate connection.
- Set
task_typetot2v. - Set
num_frames,fps,width, andheight. - Leave
output_formatonautoto save MP4. - Use FL Bernini-R Unload or
unload_after_runwhen finished to reclaim memory.
Image or Video Conditioned Modes
Connect a ComfyUI image batch to image for image-conditioned tasks, connect reference_images for reference modes, or provide video_path for video-conditioned tasks.
Modes
| Mode | Inputs | Output | Notes |
|------|--------|--------|-------|
| t2i | Prompt | PNG | Text-to-image smoke path. |
| i2i | Prompt + image | PNG | Image-conditioned image generation. |
| t2v | Prompt | MP4 | Text-to-video generation. |
| v2v | Prompt + video_path | MP4 | Video-conditioned generation. |
| mv2v | Prompt + video_path | MP4 | Multi-view/video-conditioned mode from Bernini. |
| r2v | Prompt + reference_images | MP4 | Reference-image to video. |
| rv2v | Prompt + video_path + reference_images | MP4 | Reference plus video-conditioned generation. |
| ads2v | Prompt + references/video as needed | MP4 | Ads-oriented Bernini mode. |
Key Parameters
- width / height - Output dimensions. Bernini-R is heavy; test smaller sizes before long renders.
- num_frames - Number of output frames for video modes. Image modes force one frame.
- num_inference_steps - Diffusion step count. Higher usually improves quality and increases runtime.
- guidance_mode - Use
autofor task-aware defaults or choose a Bernini guidance mode directly. - max_image_size - Caps conditioning image size before Bernini receives it.
- seed - Set
-1for random seed. - unload_after_run - Clears the model cache after generation to reclaim memory.
Attention Backend
This pack defaults Bernini-R attention to PyTorch SDPA because some ComfyUI environments have FlashAttention 3 packages with incompatible custom-op signatures. Advanced users can opt into FlashAttention by setting:
set FL_BERNINI_ATTENTION_BACKEND=auto
Supported values are sdpa, auto, fa3, and fa2.
Requirements
- Python 3.10+
- NVIDIA GPU strongly recommended
- Large disk space for the model snapshot, roughly 117 GB
- High system RAM and VRAM; Bernini-R is substantially heavier than typical ComfyUI image nodes
- ComfyUI with recent
torch,diffusers,transformers,accelerate,decord, andimageio
Validation
This pack has been smoke-tested in ComfyUI with:
- Node registration through
/object_info - Environment check prompt
t2igeneration at128x128, one frame, one inference step
Credits
Based on ByteDance's Bernini project and ByteDance/Bernini-R-Diffusers model release.
License
Apache-2.0. See ByteDance/Bernini for the upstream project license and model terms.