fixup: address review feedback (default=Black, honest Save Video caveat)

- Move 'Transparent' to the end of the dropdown and set explicit default='Black' so
  newly-added nodes preserve prior behavior (review warning).
- Reword node + tooltip descriptions to be honest that Save Video drops the alpha
  plane when its default .mp4 extension is used; direct users to the IMAGE+MASK
  node for any workflow that needs to persist alpha to disk today.
- Update the dispatch comment with the same caveat.
This commit is contained in:
Glary-Bot 2026-06-09 17:39:58 +00:00
parent 1abab1d81e
commit ab952395d7

View File

@ -252,16 +252,16 @@ class BriaRemoveVideoBackground(IO.ComfyNode):
display_name="Bria Remove Video Background", display_name="Bria Remove Video Background",
category="partner/video/Bria", category="partner/video/Bria",
description="Remove the background from a video using Bria. Pick a color to composite " description="Remove the background from a video using Bria. Pick a color to composite "
"the foreground over a solid background (returns an MP4), or pick 'Transparent' to " "the foreground over a solid background (returns an MP4), or pick 'Transparent' to get "
"get a WebM/VP9 video with a real alpha channel. Connect Transparent output directly " "a WebM/VP9 video with a real alpha channel. For per-frame compositing (images + mask "
"to Save Video to write the alpha-channel WebM to disk; for per-frame compositing " "sockets) or saving the transparent result to disk with alpha preserved, use 'Bria "
"(images + mask sockets), use 'Bria Remove Video Background (Transparent)' instead.", "Remove Video Background (Transparent)' instead -- Save Video currently writes to .mp4 "
"by default, which drops the VP9 alpha plane.",
inputs=[ inputs=[
IO.Video.Input("video"), IO.Video.Input("video"),
IO.Combo.Input( IO.Combo.Input(
"background_color", "background_color",
options=[ options=[
"Transparent",
"Black", "Black",
"White", "White",
"Gray", "Gray",
@ -272,12 +272,13 @@ class BriaRemoveVideoBackground(IO.ComfyNode):
"Cyan", "Cyan",
"Magenta", "Magenta",
"Orange", "Orange",
"Transparent",
], ],
tooltip="Background color for the output video. 'Transparent' returns a " default="Black",
"WebM/VP9 video with an alpha channel (best paired with Save Video); other " tooltip="Background color for the output video. Colors composite the "
"options composite the foreground over the chosen solid color and return an MP4. " "foreground over a solid background and return an MP4. 'Transparent' returns "
"For per-frame compositing (images + mask sockets) use 'Bria Remove Video " "a WebM/VP9 video with an alpha channel; for per-frame compositing or saving "
"Background (Transparent)' instead.", "the alpha to disk, use 'Bria Remove Video Background (Transparent)' instead.",
), ),
IO.Int.Input( IO.Int.Input(
"seed", "seed",
@ -311,8 +312,9 @@ class BriaRemoveVideoBackground(IO.ComfyNode):
) -> IO.NodeOutput: ) -> IO.NodeOutput:
validate_video_duration(video, max_duration=60.0) validate_video_duration(video, max_duration=60.0)
# Bria returns 422 if background_color="Transparent" is paired with mp4_h264 # Bria returns 422 if background_color="Transparent" is paired with mp4_h264
# (no alpha plane). VP9-in-WebM carries the alpha; downstream VIDEO handling # (no alpha plane), so request webm_vp9 instead. VP9 carries the alpha in a side
# preserves it as long as Save Video uses auto/auto (stream-copy) settings. # layer; the bytes pass through ComfyUI's VIDEO type as a file reference but
# SaveVideo's default .mp4 extension currently drops it on mux -- see PR notes.
output_container_and_codec = "webm_vp9" if background_color == "Transparent" else "mp4_h264" output_container_and_codec = "webm_vp9" if background_color == "Transparent" else "mp4_h264"
response = await sync_op( response = await sync_op(
cls, cls,