Watch the full video first if you want to understand how this Bernini-R reference background replacement workflow works in practice. The video shows how a source video and a reference background image can be combined into a controlled video editing pipeline, where the original subject, motion, pose, clothing, and camera framing are preserved while the surrounding environment is replaced with a new reference-based background.
This ComfyUI workflow is designed for Bernini-R reference background video replacement. Its main purpose is to take an existing video, keep the main person or subject unchanged, and replace the background with a new scene provided by a reference image. Instead of generating a completely new video or changing the entire frame, this workflow focuses on controlled background transformation: the dancer or foreground subject remains consistent, while the environment, furniture, lighting atmosphere, and spatial style are rebuilt around them.
The workflow is built around the Bernini-R video editing model route. It uses Bernini_HIGH_fp8_e4m3fn_scaled.safetensors and Bernini_LOW_fp8_e4m3fn_scaled.safetensors as the high-noise and low-noise model branches. It also uses UMT5 XXL fp8 text encoding, Wan 2.1 VAE, BerniniConditioning, LoadVideo, GetVideoComponents, BatchImagesNode, KSamplerAdvanced, VAEDecode, CreateVideo, SaveVideo, and VHS_VideoCombine. The graph also includes LightX2V-style LoRA acceleration support, helping the workflow run through a more practical video editing path.
The key node is BerniniConditioning. This node receives the source video, reference images, positive and negative text conditioning, VAE, width, height, video length, and reference maximum size. In this workflow, the source video provides the foreground motion and timing, while the reference image provides the new background design. This is the central logic behind background replacement: the video decides what must stay unchanged, and the reference image decides what the new environment should look like.
A major advantage of this workflow is the built-in prompt creation chain. The graph uses RHLLMChatNode to analyze the source video and reference background image, then generate a detailed Bernini editing prompt. The LLM output is passed through a JSON cleanup chain using StringReplace nodes, then automatically connected into the positive prompt encoder. This helps the workflow produce more precise background replacement instructions without requiring the user to manually write a long technical prompt every time.
The example prompt in this workflow focuses on replacing the video background with a warm modern living room while preserving the woman’s appearance, clothing, and dancing motion. It describes large black-framed windows, sheer curtains, beige furniture, sunlight shadows, a wooden coffee table, a sofa, wall art, plants, shelves, ceramics, and natural lighting integration. This shows the workflow’s intended use case clearly: keep the foreground performance stable while rebuilding the environment around it.
Compared with ordinary video-to-video workflows, this Bernini-R background replacement workflow is more specialized. A normal V2V workflow may change the subject, clothing, pose, or camera structure while trying to edit the environment. This workflow is designed to preserve the original performer and motion while changing only the scene context. It is suitable for dance video background replacement, indoor scene conversion, lifestyle video editing, product-style environment staging, advertising backgrounds, creator short videos, Bilibili showcases, YouTube tutorials, RunningHub releases, and Civitai workflow publishing.
Main features:
Bernini-R reference background video replacement workflow
Source video + reference background image input
Replaces the environment while preserving the main subject
Keeps original motion, pose, clothing, and camera framing
Bernini HIGH / LOW fp8 dual-model route
UMT5 XXL fp8 text encoder
Wan 2.1 VAE decoding
BerniniConditioning video editing control
Multiple reference images batched in
RHLLMChatNode automatic prompt generation
JSON cleanup chain for LLM prompt output
KSamplerAdvanced segmented sampling
LightX2V LoRA support
CreateVideo / SaveVideo / VHS output
Suggested workflow:
Prepare a clean source video first. The foreground subject should be clearly visible, and the motion should be readable. Then prepare a reference background image with the environment you want to transfer into the video. Use a reference image with clear lighting, strong spatial structure, and enough background detail. Load the source video and reference image into the workflow, then let the LLM prompt chain generate the background replacement instruction. Check the cleaned prompt before rendering. If the subject changes too much, strengthen the preservation rules for appearance, clothing, motion, pose, and camera framing. If the new background is weak, describe the room layout, lighting, shadows, furniture, and atmosphere more explicitly. Start with a short clip first, confirm the background replacement quality, then move into longer output.
⚙️ RunningHub Workflow
Try the workflow online right now — no installation required.
👉 Workflow: https://www.runninghub.ai/post/2062503708742733826?inviteCode=rh-v1111
If the results meet your expectations, you can later deploy it locally for customization.
🎁 Fan Benefits: Register to get 1000 points + daily login 100 points — enjoy 4090 performance and 48 GB super power!
📺 Bilibili Updates (Mainland China & Asia-Pacific)
If you’re in the Asia-Pacific region, you can watch the video below to see the workflow demonstration and creative breakdown.
📺 Bilibili Video: https://www.bilibili.com/video/BV1yLEc6dEJc/
☕ Support Me on Ko-fi
If you find my content helpful and want to support future creations, you can buy me a coffee ☕.
Every bit of support helps me keep creating — just like a spark that can ignite a blazing flame.
👉 Ko-fi: https://ko-fi.com/aiksk
💼 Business Contact
For collaboration or inquiries, please contact aiksk95 on WeChat.
⚙️打开下方链接即可在线体验,无需安装。
👉 工作流: https://www.runninghub.ai/post/2062503708742733826?inviteCode=rh-v1111
如果觉得效果理想,你也可以在本地进行自定义部署。
🎁 粉丝福利: 注册即送 1000 积分,每日登录 100 积分,畅玩 4090 体验 48 G 超级性能!
📺 Bilibili 更新(中国大陆及南亚太地区)
如果你在中国大陆或南亚太地区,可以通过下方视频查看该工作流的实测效果与构思讲解。
📺 B站视频: https://www.bilibili.com/video/BV1yLEc6dEJc/
我会在 夸克网盘 持续更新模型资源:
👉 https://pan.quark.cn/s/20c6f6f8d87b
这些资源主要面向本地用户,方便进行创作与学习。
