makepad/libs/flow/recipes/templates/prompt-to-segment.splash
Arena Agent d8d5ea8b6a Repair integration manifests and port nigig exports onto upstream widget families
Restore missing required asset/flow packages from the pinned nigig revision; retain upstream script isolation, X11 hover, and widget-core fixes. Validated makepad-widgets data feature with Rust 1.97.1.
2026-10-26 11:23:26 +00:00

14 lines
596 B
Text

use mod.flow.*
/** The isolated subject to paint and segment. */
let prompt = Input{ type: @text default: "a red canvas backpack" }
let image = Image{ prompt: prompt.text() width: 512 height: 512 }
let segment = Segment{ prompt: "object:1" image: image.image() model: "sam3-1-multiplex" }
/** Publish the predicted subject mask into the flow asset library. */
let published = Publish{ value: segment.mask() namespace: "flows" tags: ["flow", "segment"] }
Flow{
label: "Prompt to segment"
brief: "Paints one subject and extracts its SAM 3.1 mask."
prompt, image, segment, published
}