From e30e8d4ef699722bccf4d3681677bdb62a565df3 Mon Sep 17 00:00:00 2001 From: alisson-anjos Date: Sat, 3 Oct 2026 00:38:47 +0000 Subject: [PATCH] Duet panels keep the clip's aspect ratio by default (contain, no crop) (1.56.3) Co-Authored-By: Claude Opus 5.5 --- bfs_h3_side_panel.py | 4 ++-- bfs_shot_loop.py | 2 +- pyproject.toml | 2 +- web/docs/BFSH3Duet.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bfs_h3_side_panel.py b/bfs_h3_side_panel.py index d7ce074..b8df1f9 100644 --- a/bfs_h3_side_panel.py +++ b/bfs_h3_side_panel.py @@ -581,7 +581,7 @@ if _io is not None: _io.Int.Input("length", default=0, min=0, max=3600, tooltip="Frames at 24 fps, snapped to 17k+5. 0 = the guide's or panel clip's length."), _io.Combo.Input("position", options=POSITIONS, default="left"), _io.Float.Input("size", default=1.0, min=0.1, max=1.5, step=0.01, tooltip="Panel size against the video (1.0 = two equal halves)."), - _io.Combo.Input("fit", options=FITS, default="cover"), + _io.Combo.Input("fit", options=FITS, default="contain", tooltip="contain keeps the whole clip (smaller, with grey around) so nothing is cropped; cover fills the panel and crops; stretch distorts."), _io.Int.Input("gap", default=0, min=0, max=8, tooltip="Grey separator in 32 px patches (pixels, held)."), _io.Float.Input("panel_noise", default=0.0, min=0.0, max=1.0, step=0.01, tooltip= "0 copies the panel exactly (swaps, light). 0.1-0.2 gives room for big changes (style, creatures)."), @@ -656,7 +656,7 @@ class BFSShotH3Duet: "per-shot or global prompt in the Planner)."}), "instruction": ("STRING", {"default": "", "tooltip": "What changes, in a few seen words (see BFS H3 Duet)."}), "use_ref_2": ("BOOLEAN", {"default": True}), - "position": panel_req["position"], "size": panel_req["size"], "fit": (FITS, {"default": "cover"}), + "position": panel_req["position"], "size": panel_req["size"], "fit": (FITS, {"default": "contain", "tooltip": "contain keeps the whole clip (smaller, with grey around) so nothing is cropped"}), "gap": panel_req["gap"], "panel_noise": panel_req["panel_noise"], "ref_image_size": (["match", "max"], {"default": "match"}), "steps": ("INT", {"default": 20, "min": 1, "max": 200}), diff --git a/bfs_shot_loop.py b/bfs_shot_loop.py index 55e308b..1c14d00 100644 --- a/bfs_shot_loop.py +++ b/bfs_shot_loop.py @@ -1429,7 +1429,7 @@ class BFSShotH3Conditioning: # the guide goes straight onto the canvas (guides added above are moved onto it by the panel step) guide = shot["frames"] if aligned and audio is None else None positive, latent, info, _, _ = BFSH3SidePanel().apply( - positive, latent, vae, shot["frames"], panel_position, panel_size, "cover", 0, "all frames", + positive, latent, vae, shot["frames"], panel_position, panel_size, "contain", 0, "all frames", panel_noise, guide, 0) shot["panel"] = info # BFS Shot Join crops the decoded canvas back to the video if duet == "shifted RoPE": diff --git a/pyproject.toml b/pyproject.toml index 0b9d260..2b2bd14 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "bfsnodes" description = "Custom ComfyUI nodes for reference-guided video: BFS Sampler (guide-driven IC-LoRAs with auto crop, mask inpainting and temporal chunking), LTX Multiple Controls and Identity Transfer, LTXV Edit Anything, Head-Swap/Anime2Real conditioning, AMV Guide Builder, MiniMax-H3 downscaled latent guides with training-matched geometry, overlap/sidecar source-phase RoPE, single-frame/video targets and VAE loaders, LoRA Surgery (scale or drop a LoRA's layers live to find a defect, save the result), and Shot Planner / Shot Loop (split long videos into model-sized shots at camera cuts with PySceneDetect, YOLO person/face filters, face-tracked cast with a reference per person, a reference and prompt per shot, run any workflow per shot, join with the original timing and audio), and H3 Duet (pin a source clip or reference beside the video, training-free, cropped off before decoding)." -version = "1.56.2" +version = "1.56.3" license = {file = "LICENSE"} dependencies = [ "torch", diff --git a/web/docs/BFSH3Duet.md b/web/docs/BFSH3Duet.md index 4d7bf00..7ed944b 100644 --- a/web/docs/BFSH3Duet.md +++ b/web/docs/BFSH3Duet.md @@ -93,7 +93,7 @@ None. | setting | effect | |---|---| | position / size | side of the strip and its size relative to the video (1.0 = two equal halves) | -| fit | contain (whole panel on grey), cover (fill and crop), stretch | +| fit | contain (default: the whole clip, smaller, with grey around, nothing cropped), cover (fill and crop), stretch | | gap | grey separator between panel and video, in 32 px patches | | panel_noise | 0 pins the panel exactly; 0.05-0.15 loosens it when the result copies too much of it | | hold | pin the panel for the whole clip, or only its first latent frame |