select_with_ai
AI: select into a NAMED channel, soft-edged. target says what: "subject" the main subject (person, animal, product), "sky" the sky, "object" one object you point at. With layer, selects that layer's own content: for a cut-out, place the photo as a layer, select its subject, then layer_mask op=create from the channel. target=subject only: if the subject is lying on its side or upside down in the photo, set subject_up to the edge its head/top points toward (the model is far more accurate on an upright subject); leave it at top otherwise. target=object only: give a box [x1,y1,x2,y2] in document pixels around it (from find_objects, or your own), or a word to use find_objects's best candidate (the result says which box was used; look at the selection to check it); a second object on the same image is fast, and select mode=channel adds objects together. target=sky: use the channel as add_adjustment's mask for sky-only grades, or invert it with modify_selection. name is the channel to write (replaced); it defaults to Subject, Sky or Object by target. Takes ~5-10 s.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| box | No | target=object only: [x1,y1,x2,y2] in document pixels around the object. | |
| name | No | Channel to write (replaced). Default: Subject, Sky or Object, by target. | |
| word | No | target=object only: alternative to `box`: what to select, e.g. "suit". | |
| image | Yes | Image id, as returned by open_photo. | |
| layer | No | Run on this layer alone (e.g. a placed photo), not the whole image. | |
| target | Yes | What to select: subject, sky or object. | |
| layer_id | No | Layer id (takes priority over `layer`). | |
| subject_up | No | target=subject only: which edge of the image the subject's head/top points toward (default top). |