feat: v0.2.0 — multi-variant FIBO Generate, mask/spill presets, premultiply flow#2
Merged
Conversation
Walks every image URL the Bria API response contains, in order, handling all the shapes endpoints have used: top-level/result single image_url, list of strings, list of dicts, and the list-shaped result variant. Required for multi-variant FIBO Generate to pull every result back, and generally more robust against API response-shape drift. extract_image_url() (singular) now delegates to the new plural helper. Release-As: 0.2.0
Bria's /v2/image/generate endpoint returns one image per call regardless of batch fields, so true batching is parallel-call style. New "Generate Multiple Images" toggle exposes a Num Images dropdown (2-4), an Image Index slider, and a "Use This Image" button. On Run with the toggle ON the node fires N async calls in parallel via ThreadPoolExecutor; per-variant seed offset gives real variety when a base seed is set. Saved files are suffixed _v01..vNN next to the canonical result_path; the slider switches the internal Read between them without re-running. "Use This Image" promotes the displayed variant to the canonical result_path so downstream nodes consume the locked-in variant. Sidecar JSON records every variant in result_paths.
- Isolate Object with only an object name (no modifier) silently fell back to
the generic prompt instead of using the named target. Multi-target Isolate
Object substituted the wrong placeholder. Both fixed via new _PRESETS_WITHOUT_MOD
set covering delete_object and isolate_object — these presets accept name-only
input; replace/color/material continue to require a modifier.
- Body text retained "the specified object(s)" / "the specified element(s)"
verbatim even after the action line was substituted, leaving the model with
ambiguous targeting. New _substitute_body() helper replaces every variant
(singular, plural, possessive) with the user's joined target phrase, with
a small possessive helper so "the boots" renders as "the boots'" not
"the boots's". _build_comp_prompt now also runs the substitution so
compositing-preset bodies pick up named element(s) too — existing presets
don't use the placeholders so this is a no-op for them.
- Multi-target joining moved from comma-only to natural English ("a, b, and c")
via _join_natural().
…l presets Three new compositing presets, all backed by the existing 5 Element slots — no new UI parms. - Create Mask outputs a clean binary alpha matte (white over named element(s), black elsewhere) suitable as a luminance key. Uses "rotoscope holdout matte" framing with an alignment lock and atmospheric exclusion clause so the result is pixel-aligned with the input and free of incidental smoke/dust/fog. - Create Soft Mask outputs a grayscale density matte for atmospherics — smoke, fire, dust, fog, mist — where solid objects in the same frame remain pure black. Density follows brightness (white = max density, black = absent, gray = partial). Sibling to Create Mask; shares the Premultiply controls. - Remove Greenscreen Spill removes green/blue-screen color contamination, fringing, and edge spill from named element(s) while preserving naturally- occurring greens (foliage, signage, wardrobe). Designed to run after the keyed subject is composited over its new background. A _MASK_PRESETS frozenset gates the upcoming Premultiply with Mask + Mask Edge Softness controls so they only show for the two mask presets.
Adds two new knobs on FIBO Edit Recipes that appear automatically when Create
Mask or Create Soft Mask is the active preset, and are hidden + auto-cleared
otherwise.
- Premultiply with Mask toggle: routes the API-returned mask through an
internal Blur -> FilterErode -> Copy(rgb=input, a=mask.red) -> Premult
chain, producing a clean cutout element. OFF returns the raw API mask
(existing behavior).
- Mask Edge Softness slider: drives the Blur size and a half-size FilterErode
that compensates for the blur's silhouette expansion, so the alpha stays
tight to the named element. Smooths the staircase from the model's coarse
binary output without bleeding the matte.
Visibility is gated on category=compositing AND preset in {create_mask,
create_soft_mask}. Switching preset/category clears the toggle so a stale
ON state cannot affect later non-mask runs.
Bria's /v2/image/edit/enhance endpoint stopped accepting sync=true in May 2026
("sync request is not supported with this endpoint"). adapter.upscale_from_files
now defaults sync=False for the enhance endpoint specifically; other modes
(increase_resolution) keep the prior sync=true default. The Nuke Enhance node
no longer forces sync=true at runtime — BriaClient._poll_status handles the
async response transparently.
- README feature table: multi-variant FIBO Generate, new mask/spill presets in FIBO Edit Recipes, View / Copy Generation Data buttons mentioned. - docs/bria_nuke/README.md: full Multi-variant batch section under FIBO Generate; expanded FIBO Edit Recipes section listing Create Mask, Create Soft Mask, Remove Greenscreen Spill, Premultiply with Mask, and Mask Edge Softness; Enhance sync default updated to reflect async routing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v0.2.0 feature release. Seven per-feature commits.
feat(api):extract_image_urlshelper for multi-image API responses (also carriesRelease-As: 0.2.0)feat(generate): multi-variant FIBO Generate (1–4 parallel async calls with per-variant seed offset;Image Indexslider +Use This Imagebutton to lock in one variant)fix(recipes): targeted-prompt regressions in object/comp presets — Isolate Object name-only, multi-target placeholder, body-text substitution, possessive handlingfeat(recipes): Create Mask, Create Soft Mask, and Remove Greenscreen Spill compositing presetsfeat(recipes): Premultiply with Mask flow + Mask Edge Softness slider — internal Blur → FilterErode → Copy → Premult chain that's hidden + auto-cleared outside the mask presetsfix(enhance): route/v2/image/edit/enhanceto async (Bria started returning 422 forsync=truein May 2026)docs: README + node reference updated for the v0.2.0 feature surfaceCross-platform audit: all new code is stdlib-only or pure Nuke API. No new platform branches required. Patterns match the (confirmed cross-platform) Houdini release.
Test plan
_v01..v04suffixes; sidecar JSON lists all 4 inresult_paths; Image Index slider switches the internal Read between variants; "Use This Image" promotes the displayed variantcc @assaomri @itayamir @filip-bria