@sogni-ai/sogni-creative-agent-skill 3.43.0 → 3.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/sogni-creative-agent-skill/SKILL.md +4 -1
- package/.agents/skills/sogni-creative-agent-skill/references/models.md +40 -0
- package/.agents/skills/sogni-creative-agent-skill/references/object-selection.md +41 -0
- package/.agents/skills/sogni-creative-agent-skill/references/video-prompting.md +34 -0
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +35 -0
- package/README.md +2 -0
- package/SKILL.md +4 -4
- package/desktop-extension/manifest.json +1 -1
- package/generated/creative-agent-runtime.mjs +6 -3
- package/openclaw.plugin.json +1 -1
- package/package.json +5 -4
- package/plugin-skills/sogni-creative-agent/SKILL.md +1 -0
- package/references/models.md +40 -0
- package/references/object-selection.md +41 -0
- package/references/video-prompting.md +34 -0
- package/sam-segmentation.mjs +40 -0
- package/scripts/sync-hermes-skill.mjs +1 -0
- package/skill-package.json +1 -1
- package/skills/sogni-creative-agent/SKILL.md +1 -1
- package/sogni-agent.mjs +118 -4
- package/version.mjs +1 -1
|
@@ -3,7 +3,7 @@ name: sogni-creative-agent-skill
|
|
|
3
3
|
description: "Generate and edit images, upscale images, create video and music, animate image folders into seamless reels, and manage reusable personas with Sogni AI. Use when a Hermes user asks to draw, render, upscale, edit or restyle an image, animate an image, make a video, create music or lyrics, build a media workflow, apply a saved identity, or refine an earlier Sogni result."
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
|
-
version: "3.
|
|
6
|
+
version: "3.46.0"
|
|
7
7
|
author: Sogni AI
|
|
8
8
|
hermes:
|
|
9
9
|
category: creative
|
|
@@ -20,6 +20,9 @@ metadata:
|
|
|
20
20
|
|
|
21
21
|
Generate images, video, and music through Sogni AI's decentralized GPU network.
|
|
22
22
|
|
|
23
|
+
For SAM 3 object masks, read [references/object-selection.md](references/object-selection.md).
|
|
24
|
+
Use `--segment` with an original still and normalized points or an object description.
|
|
25
|
+
|
|
23
26
|
Invoke `sogni-agent-hermes` for every command in this skill. Fall back to
|
|
24
27
|
`sogni-agent` only when the Hermes launcher is not on `PATH`. The two commands
|
|
25
28
|
have identical flags and output; the Hermes launcher adds host attribution.
|
|
@@ -5,6 +5,24 @@ answering "which model should I use for X". For everyday generation prefer
|
|
|
5
5
|
`-Q fast|hq|pro` and automatic workflow routing instead of memorizing IDs.
|
|
6
6
|
`sogni-agent --help` is the canonical flag reference.
|
|
7
7
|
|
|
8
|
+
## Contents
|
|
9
|
+
|
|
10
|
+
- Live model discovery
|
|
11
|
+
- Quality presets (images)
|
|
12
|
+
- Image models
|
|
13
|
+
- Utility and 3D models
|
|
14
|
+
- Music models
|
|
15
|
+
- Video models — current selectors
|
|
16
|
+
- Seedance 2.5
|
|
17
|
+
- HappyHorse 1.1 models
|
|
18
|
+
- Alibaba Wan 3
|
|
19
|
+
- Wan 3.0 Enhanced
|
|
20
|
+
- MiniMax H3 models
|
|
21
|
+
- LTX-2 / LTX-2.3 models
|
|
22
|
+
- Recommended model selectors by need
|
|
23
|
+
- Video sizing & aspect ratios
|
|
24
|
+
- GPT Image 2.5 controls (as of 2026-09)
|
|
25
|
+
|
|
8
26
|
## Live model discovery
|
|
9
27
|
|
|
10
28
|
The static tables below are recommendations, not the complete changing
|
|
@@ -52,6 +70,8 @@ dimensions. "high quality" / "best quality" / "pro" → `-Q pro`; quick drafts
|
|
|
52
70
|
|-------|-------|----------|
|
|
53
71
|
| `z_image_turbo_bf16` | Fast (~5-10s) | General purpose, default |
|
|
54
72
|
| `gpt-image-2` | Variable | OpenAI GPT Image 2 text-to-image and edit, strong prompt and text rendering |
|
|
73
|
+
| `gpt-image-2.5-sunburst` | Variable | GPT Image 2.5 Sunburst; explicit selection, edits, masks and transparency |
|
|
74
|
+
| `gpt-image-2.5-flare` | Variable | GPT Image 2.5 Flare; explicit selection, edits, masks and transparency |
|
|
55
75
|
| `flux1-schnell-fp8` | Very fast | Quick iterations |
|
|
56
76
|
| `qwen_image_2512_fp8` | Medium (~30s) | High quality |
|
|
57
77
|
| `krea2_turbo_fp8_scaled` | Fast | Krea 2 Turbo text-to-image, fast high-quality generations with strong prompt adherence |
|
|
@@ -934,3 +954,23 @@ model recommendations.
|
|
|
934
954
|
- Natural-language aspect requests like "portrait", "square", "16:9", or "9:16" are inferred when width/height aren't explicitly set. Combined requests like "720p 9:16" keep the requested short side while applying the requested shape.
|
|
935
955
|
- For i2v (and any workflow using `--ref` / `--ref-end`), the client wrapper resizes the reference image with strict aspect-fit (`fit: inside`) and uses the *resized* dimensions as the final video size. Because that resize uses rounding, a "valid" requested size can still produce an invalid final size (example: `1024×1536` requested, but the ref becomes `1024×1535`). The CLI detects this for local refs and auto-adjusts to a nearby safe size.
|
|
936
956
|
- Pass `--strict-size` to fail instead — the CLI prints a suggested size.
|
|
957
|
+
|
|
958
|
+
## GPT Image 2.5 controls (as of 2026-09)
|
|
959
|
+
|
|
960
|
+
Use `-m gpt-image-2.5-sunburst` or `-m gpt-image-2.5-flare` explicitly.
|
|
961
|
+
`--image-quality low|medium|high|xhigh|max` preserves the exact quality;
|
|
962
|
+
default is medium. Sogni never uses provider-chosen (auto) quality.
|
|
963
|
+
`--image-background transparent` requires PNG or WebP. JPEG/WebP accept
|
|
964
|
+
`--image-output-compression 0..100`; omit compression for PNG.
|
|
965
|
+
For editing, repeat `--context` in source order (up to 16 total). `--image-mask`
|
|
966
|
+
accepts an original PNG alpha mask of the first context image; it must match
|
|
967
|
+
that image's dimensions (the image itself may be JPEG, PNG or WebP) and be
|
|
968
|
+
smaller than 50 MB. Transparent
|
|
969
|
+
mask regions identify edits; the model can also change pixels outside them.
|
|
970
|
+
The image mask flag is separate from video `--mask` semantics.
|
|
971
|
+
|
|
972
|
+
Dimensions default to 1024×1024: multiples of 16, at most 3840 per edge,
|
|
973
|
+
3:1 maximum aspect ratio, 655,360–8,294,400 pixels. Above 3,686,400 pixels is
|
|
974
|
+
experimental. Transparency is integrated but clean cutout edges failed the
|
|
975
|
+
initial Flare canaries; inspect native output against a contrasting background.
|
|
976
|
+
These source changes still require the coordinated package release and server rollout.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# SAM 3 object selection
|
|
2
|
+
|
|
3
|
+
Use SAM 3 when a task needs an object mask from an existing still, for example
|
|
4
|
+
selecting a door before directing an edit. Coordinates refer to the original
|
|
5
|
+
image, normalized from 0 to 1, with the origin at the top left.
|
|
6
|
+
Use an upright original under 24 MB with each edge between 256 and 2560 pixels.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
sogni-agent --segment original.png --segment-point 0.45,0.6 --segment-exclude 0.1,0.1 -o mask.png
|
|
10
|
+
sogni-agent --segment original.png --segment-text "the red backpack" --segment-box 0.2,0.2,0.8,0.9 -o mask.png
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
These commands submit one paid SAM 3 project using the configured account.
|
|
14
|
+
Include points identify the object; exclude points remove unwanted areas.
|
|
15
|
+
The result is one lossless binary PNG at the original dimensions. White selects
|
|
16
|
+
the object. Inspect the full-size mask before paying for a downstream edit.
|
|
17
|
+
|
|
18
|
+
The command selects `sam3_image_segment_bf16`, uses one inference step and no
|
|
19
|
+
previews, and keeps the content filter enabled. Do not supply output dimensions,
|
|
20
|
+
generation prompts, or another generation mode. It requires client 5.31.0 or later;
|
|
21
|
+
the package pins the compatible runtime. `--segment-box` accepts normalized
|
|
22
|
+
left,top,right,bottom bounds. A point may select only a flame, window, or other
|
|
23
|
+
subpart. To select a complete object, refine with a short text label and a box,
|
|
24
|
+
then inspect the actual SAM mask. Never use the box itself as a substitute mask.
|
|
25
|
+
Text and points cannot be combined. Limits: 240 text characters, 32 points,
|
|
26
|
+
16 boxes; point prompts accept at most one box.
|
|
27
|
+
|
|
28
|
+
Keep the original still as the edit reference. When the edit model supports only
|
|
29
|
+
context images, a binary mask is a visual selection guide, not a strict inpainting
|
|
30
|
+
constraint. Review what changed outside the selection as well as inside it.
|
|
31
|
+
A registered character needs its saved reference images; an object label or
|
|
32
|
+
character name cannot preserve identity.
|
|
33
|
+
|
|
34
|
+
For a branching world, create a destination **still** from the original and
|
|
35
|
+
selection, then animate between the original parent and destination stills at
|
|
36
|
+
matching aspect ratios. Every subsequent node starts from that generated still.
|
|
37
|
+
Never promote an extracted video frame or a screenshot into the canonical scene.
|
|
38
|
+
|
|
39
|
+
The CLI capability is separate from hosted chat tool discovery. Do not invent a
|
|
40
|
+
hosted `segment_image` tool: inspect the connected tool catalog before dispatching
|
|
41
|
+
through chat. Use the CLI or SDK when segmentation is absent there.
|
|
@@ -263,6 +263,40 @@ do and never deviate from:
|
|
|
263
263
|
`detailed_description` targets 350–500. Long is fine when every sentence is a
|
|
264
264
|
visible or audible event.
|
|
265
265
|
|
|
266
|
+
### Beats and voices (2026-09-11 review lessons)
|
|
267
|
+
|
|
268
|
+
Tested on a branching horror route the same day, on top of the rules above:
|
|
269
|
+
|
|
270
|
+
- **One continuous shot is still the default.** In most cases it is preferred
|
|
271
|
+
and the shot count stays as low as the content allows. What made the slow
|
|
272
|
+
takes boring was emptiness, not the lack of cuts: something new should
|
|
273
|
+
happen every 1.5–2.5 seconds inside the shot (an action, a reaction, a
|
|
274
|
+
reveal, a line), never walking or waiting.
|
|
275
|
+
- **Beats and multi-shot are tools for when the context calls for them.** A
|
|
276
|
+
chase, a reveal that needs a new viewpoint, an exchange of lines, a jump in
|
|
277
|
+
space or time: then cut (`[Shot 2] At 00:01.500, the camera cuts to …`),
|
|
278
|
+
keep continuous motion inside each shot, and let the final shot cut to the
|
|
279
|
+
Picture 2 composition and hold with a live action, which lands cleanly where
|
|
280
|
+
a long interpolation would crossfade. Never cut a simple movement into
|
|
281
|
+
pieces, and if both pictures share one camera position the camera does not
|
|
282
|
+
move at all (a curtain dropping needs a static shot, not a tracking shot
|
|
283
|
+
away).
|
|
284
|
+
- **Write physical acts as acts.** A fall is the rail giving, the wall of
|
|
285
|
+
windows streaking upward, the ground rushing in. A bite is the jaws snapping
|
|
286
|
+
shut over the picture. A shove is two palms filling the frame. "His lips
|
|
287
|
+
part as he bends closer" produced no bite; "You brought it back" followed by
|
|
288
|
+
a cut to an aftermath still produced no fall.
|
|
289
|
+
- **Describe the voice, not just the mood.** At a speaker's first line give
|
|
290
|
+
accent, pitch, timbre and speaking rate: `The woman (S1), speaking in a
|
|
291
|
+
plain American accent with a light, mid-pitched voice at a quick, breathless
|
|
292
|
+
pace, says: <d>[English] …</d>`. "A bright, breathless voice" alone drifted
|
|
293
|
+
to a British accent between takes.
|
|
294
|
+
- **Dialogue after the action that motivates it.** She says "That's my dad"
|
|
295
|
+
after she has picked the photograph up, in the shot where she holds it.
|
|
296
|
+
- **Whose hands.** In first-person coverage say whose hands are in frame
|
|
297
|
+
("both his palms fill the frame as he shoves"); "hands seizing the front of
|
|
298
|
+
the cardigan" was rendered as the attacker's own point of view.
|
|
299
|
+
|
|
266
300
|
### Worked example — first frame → last frame
|
|
267
301
|
|
|
268
302
|
```text
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sogni-creative-agent",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.46.0",
|
|
4
4
|
"description": "Sogni Creative Agent: image, video, and music generation via Sogni AI's decentralized GPU network. Supports personas, persistent memories, style transfer, and multi-step creative workflows.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Sogni AI",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,38 @@
|
|
|
1
|
+
## [3.46.0](https://github.com/Sogni-AI/sogni-creative-agent-skill/compare/v3.43.0...v3.46.0) (2026-09-11)
|
|
2
|
+
|
|
3
|
+
3.44.0 and 3.45.0 were prepared but never published to npm; this release carries their changes too, so 3.43.0 is the last version npm actually shipped.
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* Add `--segment` with `--segment-point`, `--segment-exclude`, `--segment-box` and `--segment-text`, returning a SAM 3 mask for an original still. Text and point prompts never combine, point prompts take at most one box, and the limits are 32 points, 16 boxes and 240 text characters.
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Align the public runtime with Intelligence Client 3.31.1 and Sogni Client 5.44.1, moving the exact pin, `skill-package.json` and the sogni-client override together.
|
|
12
|
+
* The bundled creative-agent runtime (1.63.1) adds `detailPreference`, `processingSpeed` and `seed` to `upscale_video`; none of them changes the price.
|
|
13
|
+
|
|
14
|
+
## [3.45.0](https://github.com/Sogni-AI/sogni-creative-agent-skill/compare/v3.43.0...v3.45.0) (2026-09-11)
|
|
15
|
+
|
|
16
|
+
3.44.0 was prepared but never published to npm; this release carries its changes too.
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* Add GPT Image 2.5 Sunburst and Flare (`-m gpt-image-2.5-sunburst`, `-m gpt-image-2.5-flare`) for text-to-image and edits with up to 16 ordered `--context` references.
|
|
21
|
+
* Add `--image-quality low|medium|high` for every GPT Image model, plus `xhigh|max` on 2.5. Auto quality is rejected: Sogni never lets the provider choose the quality.
|
|
22
|
+
* Add `--image-background` (transparent on 2.5, PNG or WebP), `--image-output-compression 0-100` (JPEG or WebP) and `--image-mask`, a PNG alpha mask of the first `--context` image for edits.
|
|
23
|
+
* GPT Image defaults to 1024x1024 and a 10-minute timeout, and rejects sizes outside the provider's bounds before submitting.
|
|
24
|
+
* The MiniMax H3 reference keeps one continuous shot as the default, with beats and multi-shot sequences for when the context calls for them.
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* Align the public runtime with Intelligence Client 3.30.1 and Sogni Client 5.42.0.
|
|
29
|
+
|
|
30
|
+
## [3.44.0](https://github.com/Sogni-AI/sogni-creative-agent-skill/compare/v3.43.0...v3.44.0) (2026-09-11)
|
|
31
|
+
|
|
32
|
+
### Features
|
|
33
|
+
|
|
34
|
+
* Add the beats-and-voices lessons to the MiniMax H3 reference: pace dramatic requests by beats with a final shot that may cut to the closing frame's composition, keep continuous motion for continuous action, write a fall or a bite as the physical act, describe each voice with accent, pitch, timbre and speaking rate, place dialogue after the action that motivates it, and say whose hands are in a first-person frame.
|
|
35
|
+
|
|
1
36
|
## [3.43.0](https://github.com/Sogni-AI/sogni-creative-agent-skill/compare/v3.42.0...v3.43.0) (2026-09-10)
|
|
2
37
|
|
|
3
38
|
### Features
|
package/README.md
CHANGED
|
@@ -27,6 +27,7 @@ It ships four ways:
|
|
|
27
27
|
With this skill, an agent can:
|
|
28
28
|
|
|
29
29
|
- generate images from prompts and edit/restyle existing images
|
|
30
|
+
- select an object in an original image and return its SAM 3 mask (`--segment`; see the [object selection guide](references/object-selection.md))
|
|
30
31
|
- create videos from text, images, first/last frames, audio, or source video (LTX-2.5), with LTX-2.3 retained for voice ID, transition, and 10Eros workflows
|
|
31
32
|
- turn an image folder into a visually deduplicated, music-backed seamless loop with one plugin skill invocation
|
|
32
33
|
- generate instrumental music or full songs with lyrics
|
|
@@ -670,6 +671,7 @@ Prefer `-Q fast|hq|pro` for images and automatic workflow routing for video. Pas
|
|
|
670
671
|
| Image editing | `qwen_image_edit_2511_fp8_lightning` |
|
|
671
672
|
| Deterministic image upscaling through 16K | `rtx_vsr_pro` via `--upscale` |
|
|
672
673
|
| Promptless video upscaling to 1080p/1440p | `flashvsr_v1.1_tiny_long_bf16` via `--upscale-video` |
|
|
674
|
+
| Object masks from points, boxes, or a description | `sam3_image_segment_bf16` via `--segment` |
|
|
673
675
|
| Dark Beast Krea 2 images | `dark_beast_krea2_fp8` |
|
|
674
676
|
| Identity-preserving Krea image edits | `krea2_identity_edit_v1_2` |
|
|
675
677
|
| Uncensored identity-preserving Krea edits | `dark_beast_krea2_identity_edit_v1_2` |
|
package/SKILL.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sogni-creative-agent-skill
|
|
3
|
-
description: "Sogni Creative Agent Skill: agent skill and CLI for image, video, and music generation using Sogni AI's decentralized GPU network. Supports promptless RTX VSR image upscaling through 16K, promptless FlashVSR video upscaling to 1080p/1440p, one-click image-folder loop reels, personas (named people with saved reference photos and voice clips), persistent memories, custom personality, style transfer, angle synthesis, MiniMax H3/H3 Balanced/LightX2V Turbo/FastH3 Turbo/Seedance/HappyHorse/LTX/WAN video, music/lyrics, hosted chat, durable workflows, replay records, and multi-step creative workflows. Ask the agent to \"draw\", \"generate\", \"create an image\", \"upscale an image\", \"upscale a video\", \"make a video/animate\", \"turn this image folder into a loop\", \"make music\", \"apply a style\", or \"generate me as a superhero\"."
|
|
3
|
+
description: "Sogni Creative Agent Skill: agent skill and CLI for image, video, and music generation using Sogni AI's decentralized GPU network. Supports SAM 3 object selection, promptless RTX VSR image upscaling through 16K, promptless FlashVSR video upscaling to 1080p/1440p, one-click image-folder loop reels, personas (named people with saved reference photos and voice clips), persistent memories, custom personality, style transfer, angle synthesis, MiniMax H3/H3 Balanced/LightX2V Turbo/FastH3 Turbo/Seedance/HappyHorse/LTX/WAN video, music/lyrics, hosted chat, durable workflows, replay records, and multi-step creative workflows. Ask the agent to \"draw\", \"generate\", \"create an image\", \"upscale an image\", \"upscale a video\", \"make a video/animate\", \"turn this image folder into a loop\", \"make music\", \"apply a style\", or \"generate me as a superhero\"."
|
|
4
4
|
metadata:
|
|
5
|
-
version: "3.
|
|
5
|
+
version: "3.46.0"
|
|
6
6
|
homepage: https://sogni.ai
|
|
7
7
|
openclaw:
|
|
8
8
|
emoji: "🎨"
|
|
@@ -323,8 +323,8 @@ sogni-agent doctor --json
|
|
|
323
323
|
|
|
324
324
|
### Segmentation and 3D reconstruction
|
|
325
325
|
|
|
326
|
-
- To isolate an object in an image — a mask, or the subject cut out on transparency — use `sam3_image_segment_bf16` with a `sam3Prompt`. It is promptless in the ordinary sense: the selection comes from `text`, click `points`, or `boxes`, never from `positivePrompt`. Never route a "remove the background" or "select the X" request through `edit_image` or `refine_result`, which regenerate pixels instead of selecting them.
|
|
327
|
-
-
|
|
326
|
+
- To isolate an object in an image — a mask, or the subject cut out on transparency — use `sam3_image_segment_bf16` with a `sam3Prompt`. In direct CLI mode that is `--segment <original> --segment-point x,y` (repeat; `--segment-exclude` refines) or `--segment-text "<object>"` with optional `--segment-box x0,y0,x1,y1`, returning one binary PNG mask — read [`references/object-selection.md`](./references/object-selection.md) first. It is promptless in the ordinary sense: the selection comes from `text`, click `points`, or `boxes`, never from `positivePrompt`. Never route a "remove the background" or "select the X" request through `edit_image` or `refine_result`, which regenerate pixels instead of selecting them.
|
|
327
|
+
- SDK callers: set `applyMask: true` when the result feeds a composite; leave it off when you need the black-and-white mask itself. If a text prompt matches more instances than intended, the result's `maskSelections` reports each one's score and bounds — re-run with `maxInstances: 1` or a box around the intended one rather than accepting a merged shape.
|
|
328
328
|
- To turn one image into a textured 3D model, use `pixal3d_int8_i23d` with a `startingImage` and **no prompt** — the default graph isolates the subject on its own. Only the `templateVariant: 'i23d'` variant takes a `positivePrompt`, and there the prompt names which object to pull out of a busy scene. The artifact is a binary GLB, not a picture; never display or post-process it as an image. Set `meshTargetFaces` well below the 700000 default for anything headed into a real-time engine.
|
|
329
329
|
- `birefnet_image_background_removal_fp16` (prompt-free background removal) is **not yet routable** — it still needs a Comfy Worker release, so do not offer it. Remove backgrounds with SAM 3 and `applyMask: true` in the meantime.
|
|
330
330
|
- All are flat-priced per request, so resolution and step count change neither cost nor result. Details and full option ranges in [`references/models.md`](./references/models.md).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifest_version": "0.3",
|
|
3
3
|
"name": "sogni-creative-agent",
|
|
4
4
|
"display_name": "Sogni Creative Agent",
|
|
5
|
-
"version": "3.
|
|
5
|
+
"version": "3.46.0",
|
|
6
6
|
"description": "Generate images, video, and music on Sogni AI's decentralized GPU network — with personas, memories, and safe video editing tools.",
|
|
7
7
|
"author": { "name": "Sogni AI", "url": "https://sogni.ai" },
|
|
8
8
|
"homepage": "https://sogni.ai",
|
|
@@ -2451,12 +2451,15 @@ const PROMPT_CONTRACTS = [
|
|
|
2451
2451
|
},
|
|
2452
2452
|
{
|
|
2453
2453
|
"contractId": "upscale_video_v1",
|
|
2454
|
-
"version": "1.
|
|
2454
|
+
"version": "1.1.0",
|
|
2455
2455
|
"toolName": "upscale_video",
|
|
2456
|
-
"baseDescription": "upscale_video performs promptless, deterministic FlashVSR super-resolution of exactly one\nuploaded or generated video. Use it when the user asks to upscale, enlarge, sharpen, or increase\nthe resolution of an existing video, or wants a 1080p, 1440p, 2K, or HD copy of it. The output\nkeeps every source frame, the exact frame rate, the full aspect ratio, and the original audio.\n\nDo not invent a prompt and do not route a pure video upscale through video_to_video,\ngenerate_video, extend_video, or replace_video_segment; those tools re-render or edit content.\nUse video_to_video only when the user explicitly names a generative model such as Seedance for\nthe re-render. Do not use upscale_image for videos.\n\nOmit sourceVideoIndex to use the latest generated video, falling back to the most recent upload.\nUse zero-based non-negative indices for generated videos; -1 selects the first uploaded video\nand -2 the second. targetResolution is the output short edge: omit it for 1440p (or 1080p when\nthe source is too small for 1440p), and set 1080 when the user asks for 1080p or Full HD.\nThe output is at most twice the source size, so 1440p needs a source short edge of 720-768px\nand 1080p needs 540-768px. Sources must also be at most about 1344x768 pixels (768x1344 in\nportrait), 1-60 fps, and 100 MB. The server sets the maximum clip length and rejects a source\nthat is too long; never quote a length limit yourself. If the tool reports that the source is too\nlong or outside these limits, relay that error to the user instead of switching to a generative\nvideo tool. It cannot produce 4K or any size above 1440p: when the user asks for one, say so and\noffer 1440p instead of silently delivering less.",
|
|
2456
|
+
"baseDescription": "upscale_video performs promptless, deterministic FlashVSR super-resolution of exactly one\nuploaded or generated video. Use it when the user asks to upscale, enlarge, sharpen, or increase\nthe resolution of an existing video, or wants a 1080p, 1440p, 2K, or HD copy of it. The output\nkeeps every source frame, the exact frame rate, the full aspect ratio, and the original audio.\n\nDo not invent a prompt and do not route a pure video upscale through video_to_video,\ngenerate_video, extend_video, or replace_video_segment; those tools re-render or edit content.\nUse video_to_video only when the user explicitly names a generative model such as Seedance for\nthe re-render. Do not use upscale_image for videos.\n\nOmit sourceVideoIndex to use the latest generated video, falling back to the most recent upload.\nUse zero-based non-negative indices for generated videos; -1 selects the first uploaded video\nand -2 the second. targetResolution is the output short edge: omit it for 1440p (or 1080p when\nthe source is too small for 1440p), and set 1080 when the user asks for 1080p or Full HD.\nThe output is at most twice the source size, so 1440p needs a source short edge of 720-768px\nand 1080p needs 540-768px. Sources must also be at most about 1344x768 pixels (768x1344 in\nportrait), 1-60 fps, and 100 MB. The server sets the maximum clip length and rejects a source\nthat is too long; never quote a length limit yourself. If the tool reports that the source is too\nlong or outside these limits, relay that error to the user instead of switching to a generative\nvideo tool. It cannot produce 4K or any size above 1440p: when the user asks for one, say so and\noffer 1440p instead of silently delivering less.\n\nThe defaults give the most stable result. Set detailPreference to sharper only when the user\nasks for a sharper, crisper, or more detailed upscale, and processingSpeed to faster only when\nthey ask for a quicker one. Leave seed out unless the user gives a seed or asks for a different\nor random variation (-1 is random). None of these options changes the price.",
|
|
2457
2457
|
"parameterDocs": {
|
|
2458
2458
|
"sourceVideoIndex": "Omit for the latest generated video, then the most recent upload. Generated videos are zero-based; -1/-2 select uploaded videos.",
|
|
2459
|
-
"targetResolution": "Output short edge in pixels: 1440 or 1080. Omit for the default (1440, or 1080 for sources under 720px); set 1080 when the user asks for 1080p or Full HD."
|
|
2459
|
+
"targetResolution": "Output short edge in pixels: 1440 or 1080. Omit for the default (1440, or 1080 for sources under 720px); set 1080 when the user asks for 1080p or Full HD.",
|
|
2460
|
+
"detailPreference": "stable (default) or sharper. Set sharper only when the user asks for a sharper, crisper, or more detailed result.",
|
|
2461
|
+
"processingSpeed": "stable (default) or faster. Set faster only when the user asks for a quicker upscale.",
|
|
2462
|
+
"seed": "Omit for the repeatable default 0. -1 is random; otherwise an integer 0-4294967295 the user gave."
|
|
2460
2463
|
}
|
|
2461
2464
|
},
|
|
2462
2465
|
{
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "sogni-creative-agent-skill",
|
|
3
3
|
"name": "Sogni Creative Agent Skill — Image, Video & Music Generation",
|
|
4
4
|
"description": "Agent skill and CLI for Sogni AI image, video, and music generation.",
|
|
5
|
-
"version": "3.
|
|
5
|
+
"version": "3.46.0",
|
|
6
6
|
"skills": [
|
|
7
7
|
"."
|
|
8
8
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sogni-ai/sogni-creative-agent-skill",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.46.0",
|
|
4
4
|
"description": "Sogni Creative Agent Skill: agent skill and CLI for Sogni AI image, video, and music generation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "sogni-agent.mjs",
|
|
@@ -95,16 +95,17 @@
|
|
|
95
95
|
"update-check.mjs",
|
|
96
96
|
"node-version-check.mjs",
|
|
97
97
|
"generated/creative-agent-runtime.mjs",
|
|
98
|
-
"sogni-agent.mjs"
|
|
98
|
+
"sogni-agent.mjs",
|
|
99
|
+
"sam-segmentation.mjs"
|
|
99
100
|
],
|
|
100
101
|
"dependencies": {
|
|
101
|
-
"@sogni-ai/sogni-intelligence-client": "3.
|
|
102
|
+
"@sogni-ai/sogni-intelligence-client": "3.31.1",
|
|
102
103
|
"execa": "^10.0.1",
|
|
103
104
|
"json5": "^2.2.3",
|
|
104
105
|
"sharp": "0.35.4"
|
|
105
106
|
},
|
|
106
107
|
"overrides": {
|
|
107
|
-
"@sogni-ai/sogni-client": "5.
|
|
108
|
+
"@sogni-ai/sogni-client": "5.44.1"
|
|
108
109
|
},
|
|
109
110
|
"openclaw": {
|
|
110
111
|
"extensions": [
|
|
@@ -35,6 +35,7 @@ Honor requests to wait for user input; model-specific policies still apply.
|
|
|
35
35
|
|
|
36
36
|
- Image: `sogni-agent "a cat on the moon, cinematic"`
|
|
37
37
|
- Image edit: `sogni-agent -c <path> "make it night, add fireflies"`
|
|
38
|
+
- Object mask: `sogni-agent --segment <path> --segment-point 0.5,0.5 -o mask.png` (SAM 3; see `../../references/object-selection.md`)
|
|
38
39
|
- Video (image-to-video): `sogni-agent --video --ref <path> "gentle camera pan"` (defaults to `wan_v2.2-14b-fp8_i2v_lightx2v`)
|
|
39
40
|
- Animate two images (first frame → last frame): `sogni-agent --video --ref <first> --ref-end <last> "smooth morph into the final frame"` (defaults to `ltx25-22b-int8_i2v_distilled` and the standard FLF template; no transition LoRA is attached)
|
|
40
41
|
- MiniMax H3 reference-to-video: `sogni-agent --video -m minimax-h3-r2v --ref <identity> -c <wardrobe> --ref-video <motion> --ref-audio <voice> "<Picture 1> controls identity; <Picture 2> controls wardrobe; <Video 1> controls motion; <Audio 1> controls voice."`
|
package/references/models.md
CHANGED
|
@@ -5,6 +5,24 @@ answering "which model should I use for X". For everyday generation prefer
|
|
|
5
5
|
`-Q fast|hq|pro` and automatic workflow routing instead of memorizing IDs.
|
|
6
6
|
`sogni-agent --help` is the canonical flag reference.
|
|
7
7
|
|
|
8
|
+
## Contents
|
|
9
|
+
|
|
10
|
+
- Live model discovery
|
|
11
|
+
- Quality presets (images)
|
|
12
|
+
- Image models
|
|
13
|
+
- Utility and 3D models
|
|
14
|
+
- Music models
|
|
15
|
+
- Video models — current selectors
|
|
16
|
+
- Seedance 2.5
|
|
17
|
+
- HappyHorse 1.1 models
|
|
18
|
+
- Alibaba Wan 3
|
|
19
|
+
- Wan 3.0 Enhanced
|
|
20
|
+
- MiniMax H3 models
|
|
21
|
+
- LTX-2 / LTX-2.3 models
|
|
22
|
+
- Recommended model selectors by need
|
|
23
|
+
- Video sizing & aspect ratios
|
|
24
|
+
- GPT Image 2.5 controls (as of 2026-09)
|
|
25
|
+
|
|
8
26
|
## Live model discovery
|
|
9
27
|
|
|
10
28
|
The static tables below are recommendations, not the complete changing
|
|
@@ -52,6 +70,8 @@ dimensions. "high quality" / "best quality" / "pro" → `-Q pro`; quick drafts
|
|
|
52
70
|
|-------|-------|----------|
|
|
53
71
|
| `z_image_turbo_bf16` | Fast (~5-10s) | General purpose, default |
|
|
54
72
|
| `gpt-image-2` | Variable | OpenAI GPT Image 2 text-to-image and edit, strong prompt and text rendering |
|
|
73
|
+
| `gpt-image-2.5-sunburst` | Variable | GPT Image 2.5 Sunburst; explicit selection, edits, masks and transparency |
|
|
74
|
+
| `gpt-image-2.5-flare` | Variable | GPT Image 2.5 Flare; explicit selection, edits, masks and transparency |
|
|
55
75
|
| `flux1-schnell-fp8` | Very fast | Quick iterations |
|
|
56
76
|
| `qwen_image_2512_fp8` | Medium (~30s) | High quality |
|
|
57
77
|
| `krea2_turbo_fp8_scaled` | Fast | Krea 2 Turbo text-to-image, fast high-quality generations with strong prompt adherence |
|
|
@@ -934,3 +954,23 @@ model recommendations.
|
|
|
934
954
|
- Natural-language aspect requests like "portrait", "square", "16:9", or "9:16" are inferred when width/height aren't explicitly set. Combined requests like "720p 9:16" keep the requested short side while applying the requested shape.
|
|
935
955
|
- For i2v (and any workflow using `--ref` / `--ref-end`), the client wrapper resizes the reference image with strict aspect-fit (`fit: inside`) and uses the *resized* dimensions as the final video size. Because that resize uses rounding, a "valid" requested size can still produce an invalid final size (example: `1024×1536` requested, but the ref becomes `1024×1535`). The CLI detects this for local refs and auto-adjusts to a nearby safe size.
|
|
936
956
|
- Pass `--strict-size` to fail instead — the CLI prints a suggested size.
|
|
957
|
+
|
|
958
|
+
## GPT Image 2.5 controls (as of 2026-09)
|
|
959
|
+
|
|
960
|
+
Use `-m gpt-image-2.5-sunburst` or `-m gpt-image-2.5-flare` explicitly.
|
|
961
|
+
`--image-quality low|medium|high|xhigh|max` preserves the exact quality;
|
|
962
|
+
default is medium. Sogni never uses provider-chosen (auto) quality.
|
|
963
|
+
`--image-background transparent` requires PNG or WebP. JPEG/WebP accept
|
|
964
|
+
`--image-output-compression 0..100`; omit compression for PNG.
|
|
965
|
+
For editing, repeat `--context` in source order (up to 16 total). `--image-mask`
|
|
966
|
+
accepts an original PNG alpha mask of the first context image; it must match
|
|
967
|
+
that image's dimensions (the image itself may be JPEG, PNG or WebP) and be
|
|
968
|
+
smaller than 50 MB. Transparent
|
|
969
|
+
mask regions identify edits; the model can also change pixels outside them.
|
|
970
|
+
The image mask flag is separate from video `--mask` semantics.
|
|
971
|
+
|
|
972
|
+
Dimensions default to 1024×1024: multiples of 16, at most 3840 per edge,
|
|
973
|
+
3:1 maximum aspect ratio, 655,360–8,294,400 pixels. Above 3,686,400 pixels is
|
|
974
|
+
experimental. Transparency is integrated but clean cutout edges failed the
|
|
975
|
+
initial Flare canaries; inspect native output against a contrasting background.
|
|
976
|
+
These source changes still require the coordinated package release and server rollout.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# SAM 3 object selection
|
|
2
|
+
|
|
3
|
+
Use SAM 3 when a task needs an object mask from an existing still, for example
|
|
4
|
+
selecting a door before directing an edit. Coordinates refer to the original
|
|
5
|
+
image, normalized from 0 to 1, with the origin at the top left.
|
|
6
|
+
Use an upright original under 24 MB with each edge between 256 and 2560 pixels.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
sogni-agent --segment original.png --segment-point 0.45,0.6 --segment-exclude 0.1,0.1 -o mask.png
|
|
10
|
+
sogni-agent --segment original.png --segment-text "the red backpack" --segment-box 0.2,0.2,0.8,0.9 -o mask.png
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
These commands submit one paid SAM 3 project using the configured account.
|
|
14
|
+
Include points identify the object; exclude points remove unwanted areas.
|
|
15
|
+
The result is one lossless binary PNG at the original dimensions. White selects
|
|
16
|
+
the object. Inspect the full-size mask before paying for a downstream edit.
|
|
17
|
+
|
|
18
|
+
The command selects `sam3_image_segment_bf16`, uses one inference step and no
|
|
19
|
+
previews, and keeps the content filter enabled. Do not supply output dimensions,
|
|
20
|
+
generation prompts, or another generation mode. It requires client 5.31.0 or later;
|
|
21
|
+
the package pins the compatible runtime. `--segment-box` accepts normalized
|
|
22
|
+
left,top,right,bottom bounds. A point may select only a flame, window, or other
|
|
23
|
+
subpart. To select a complete object, refine with a short text label and a box,
|
|
24
|
+
then inspect the actual SAM mask. Never use the box itself as a substitute mask.
|
|
25
|
+
Text and points cannot be combined. Limits: 240 text characters, 32 points,
|
|
26
|
+
16 boxes; point prompts accept at most one box.
|
|
27
|
+
|
|
28
|
+
Keep the original still as the edit reference. When the edit model supports only
|
|
29
|
+
context images, a binary mask is a visual selection guide, not a strict inpainting
|
|
30
|
+
constraint. Review what changed outside the selection as well as inside it.
|
|
31
|
+
A registered character needs its saved reference images; an object label or
|
|
32
|
+
character name cannot preserve identity.
|
|
33
|
+
|
|
34
|
+
For a branching world, create a destination **still** from the original and
|
|
35
|
+
selection, then animate between the original parent and destination stills at
|
|
36
|
+
matching aspect ratios. Every subsequent node starts from that generated still.
|
|
37
|
+
Never promote an extracted video frame or a screenshot into the canonical scene.
|
|
38
|
+
|
|
39
|
+
The CLI capability is separate from hosted chat tool discovery. Do not invent a
|
|
40
|
+
hosted `segment_image` tool: inspect the connected tool catalog before dispatching
|
|
41
|
+
through chat. Use the CLI or SDK when segmentation is absent there.
|
|
@@ -263,6 +263,40 @@ do and never deviate from:
|
|
|
263
263
|
`detailed_description` targets 350–500. Long is fine when every sentence is a
|
|
264
264
|
visible or audible event.
|
|
265
265
|
|
|
266
|
+
### Beats and voices (2026-09-11 review lessons)
|
|
267
|
+
|
|
268
|
+
Tested on a branching horror route the same day, on top of the rules above:
|
|
269
|
+
|
|
270
|
+
- **One continuous shot is still the default.** In most cases it is preferred
|
|
271
|
+
and the shot count stays as low as the content allows. What made the slow
|
|
272
|
+
takes boring was emptiness, not the lack of cuts: something new should
|
|
273
|
+
happen every 1.5–2.5 seconds inside the shot (an action, a reaction, a
|
|
274
|
+
reveal, a line), never walking or waiting.
|
|
275
|
+
- **Beats and multi-shot are tools for when the context calls for them.** A
|
|
276
|
+
chase, a reveal that needs a new viewpoint, an exchange of lines, a jump in
|
|
277
|
+
space or time: then cut (`[Shot 2] At 00:01.500, the camera cuts to …`),
|
|
278
|
+
keep continuous motion inside each shot, and let the final shot cut to the
|
|
279
|
+
Picture 2 composition and hold with a live action, which lands cleanly where
|
|
280
|
+
a long interpolation would crossfade. Never cut a simple movement into
|
|
281
|
+
pieces, and if both pictures share one camera position the camera does not
|
|
282
|
+
move at all (a curtain dropping needs a static shot, not a tracking shot
|
|
283
|
+
away).
|
|
284
|
+
- **Write physical acts as acts.** A fall is the rail giving, the wall of
|
|
285
|
+
windows streaking upward, the ground rushing in. A bite is the jaws snapping
|
|
286
|
+
shut over the picture. A shove is two palms filling the frame. "His lips
|
|
287
|
+
part as he bends closer" produced no bite; "You brought it back" followed by
|
|
288
|
+
a cut to an aftermath still produced no fall.
|
|
289
|
+
- **Describe the voice, not just the mood.** At a speaker's first line give
|
|
290
|
+
accent, pitch, timbre and speaking rate: `The woman (S1), speaking in a
|
|
291
|
+
plain American accent with a light, mid-pitched voice at a quick, breathless
|
|
292
|
+
pace, says: <d>[English] …</d>`. "A bright, breathless voice" alone drifted
|
|
293
|
+
to a British accent between takes.
|
|
294
|
+
- **Dialogue after the action that motivates it.** She says "That's my dad"
|
|
295
|
+
after she has picked the photograph up, in the shot where she holds it.
|
|
296
|
+
- **Whose hands.** In first-person coverage say whose hands are in frame
|
|
297
|
+
("both his palms fill the frame as he shoves"); "hands seizing the front of
|
|
298
|
+
the cardigan" was rendered as the attacker's own point of view.
|
|
299
|
+
|
|
266
300
|
### Worked example — first frame → last frame
|
|
267
301
|
|
|
268
302
|
```text
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export const SAM3_MODEL_ID = 'sam3_image_segment_bf16';
|
|
2
|
+
|
|
3
|
+
export function segmentPoint(value, label) {
|
|
4
|
+
const parts = value.split(',');
|
|
5
|
+
const coordinates = parts.map(Number);
|
|
6
|
+
if (parts.length !== 2 || parts.some(part => !part.trim()) || coordinates.some(n => !Number.isFinite(n) || n < 0 || n > 1)) {
|
|
7
|
+
throw new Error('Selection points use normalized x,y coordinates between 0 and 1.');
|
|
8
|
+
}
|
|
9
|
+
return { x: coordinates[0], y: coordinates[1], label };
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function segmentBox(value) {
|
|
13
|
+
const parts = value.split(','); const [x0, y0, x1, y1] = parts.map(Number);
|
|
14
|
+
if (parts.length !== 4 || parts.some(part => !part.trim()) || [x0, y0, x1, y1].some(n => !Number.isFinite(n) || n < 0 || n > 1) || x0 >= x1 || y0 >= y1) {
|
|
15
|
+
throw new Error('Selection boxes use normalized x0,y0,x1,y1 coordinates, with x0 < x1 and y0 < y1.');
|
|
16
|
+
}
|
|
17
|
+
return { x0, y0, x1, y1 };
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function validateSegmentationPrompts(points, text, boxes = []) {
|
|
21
|
+
const label = text?.trim();
|
|
22
|
+
if (points.length > 32 || boxes.length > 16 || (label?.length ?? 0) > 240 || (!points.some(point => point.label === 'positive') && !label && !boxes.length)) {
|
|
23
|
+
throw new Error('Supply a positive point, box or object description; use at most 32 points, 16 boxes and 240 text characters.');
|
|
24
|
+
}
|
|
25
|
+
if (label && points.length) throw new Error('Text and point prompts cannot be combined; use text with optional boxes, or points with at most one box.');
|
|
26
|
+
if (points.length && boxes.length > 1) throw new Error('Point prompts support at most one box.');
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function segmentationConfig(bytes, dimensions, points, text, tokenType = 'spark', boxes = []) {
|
|
30
|
+
if (!dimensions || !Number.isSafeInteger(dimensions.width) || !Number.isSafeInteger(dimensions.height)
|
|
31
|
+
|| dimensions.width < 256 || dimensions.height < 256 || dimensions.width > 2560 || dimensions.height > 2560
|
|
32
|
+
|| bytes.length > 24 * 1024 * 1024) throw new Error('Choose an original still under 24 MB, with each edge between 256 and 2560 pixels.');
|
|
33
|
+
validateSegmentationPrompts(points, text, boxes);
|
|
34
|
+
return {
|
|
35
|
+
modelId: SAM3_MODEL_ID, positivePrompt: 'Select the indicated object.', negativePrompt: '',
|
|
36
|
+
startingImage: bytes, sam3Prompt: { ...(points.length ? { points } : {}), ...(boxes.length ? { boxes } : {}), ...(text?.trim() ? { text: text.trim() } : {}), threshold: 0.5, multimask: points.length > 0 },
|
|
37
|
+
...dimensions, sizePreset: 'custom', numberOfMedia: 1, numberOfPreviews: 0, steps: 1, guidance: 1,
|
|
38
|
+
outputFormat: 'png', disableNSFWFilter: false, tokenType, waitForCompletion: false,
|
|
39
|
+
};
|
|
40
|
+
}
|
package/skill-package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sogni-creative-agent
|
|
3
|
-
description: Generate and edit images, video, and music using Sogni AI's decentralized GPU network. Use for image generation or editing, first-frame/last-frame animation, video generation, music and soundtrack creation, personas, style transfer, and other Sogni Creative Agent workflows.
|
|
3
|
+
description: Generate and edit images, video, and music using Sogni AI's decentralized GPU network. Use for image generation or editing, SAM 3 object masks, first-frame/last-frame animation, video generation, music and soundtrack creation, personas, style transfer, and other Sogni Creative Agent workflows.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Sogni Creative Agent
|
package/sogni-agent.mjs
CHANGED
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
semanticWorkloadAttribution,
|
|
29
29
|
} from './attribution.mjs';
|
|
30
30
|
import { assertSafeUrl, fetchSafeUrl } from './ssrf-guard.mjs';
|
|
31
|
+
import { SAM3_MODEL_ID, segmentPoint, segmentBox, validateSegmentationPrompts, segmentationConfig } from './sam-segmentation.mjs';
|
|
31
32
|
import {
|
|
32
33
|
INTERNAL_FLAG as UPDATE_CHECK_INTERNAL_FLAG,
|
|
33
34
|
runForegroundCheck as runUpdateCheckForeground,
|
|
@@ -89,6 +90,10 @@ import {
|
|
|
89
90
|
} from '@sogni-ai/sogni-intelligence-client/chatRun';
|
|
90
91
|
import {
|
|
91
92
|
buildImageEditExecutionControls,
|
|
93
|
+
normalizeGptImageModelAlias,
|
|
94
|
+
normalizeGptImageQuality,
|
|
95
|
+
getGptImageRequestOptions,
|
|
96
|
+
isGptImageModel,
|
|
92
97
|
isKreaIdentityEditModel,
|
|
93
98
|
SEEDANCE_R2V_REFERENCE_AUDIO_MAX_DURATION_SECONDS,
|
|
94
99
|
prepareSeedanceV2VSourceVideo as prepareSharedSeedanceV2VSourceVideo
|
|
@@ -1766,8 +1771,20 @@ function isWanAnimateVideoModelId(modelId) {
|
|
|
1766
1771
|
}
|
|
1767
1772
|
|
|
1768
1773
|
function isGptImage2ModelSelection(modelId) {
|
|
1769
|
-
|
|
1770
|
-
|
|
1774
|
+
return isGptImageModel(normalizeGptImageModelAlias(modelId));
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
function imageOptionsFromCli() {
|
|
1778
|
+
if (!isGptImage2ModelSelection(options.model)) return {};
|
|
1779
|
+
return {
|
|
1780
|
+
...getGptImageRequestOptions({
|
|
1781
|
+
gptImageBackground: options.imageBackground ?? undefined,
|
|
1782
|
+
gptImageOutputCompression: options.imageOutputCompression ?? undefined,
|
|
1783
|
+
outputFormat: options.outputFormat ?? 'png'
|
|
1784
|
+
}, options.model),
|
|
1785
|
+
gptImageQuality: normalizeGptImageQuality(options.imageQuality ??
|
|
1786
|
+
(options.quality === 'pro' ? 'high' : options.quality === 'fast' ? 'low' : 'medium'), options.model)
|
|
1787
|
+
};
|
|
1771
1788
|
}
|
|
1772
1789
|
|
|
1773
1790
|
const SEEDANCE_TASK_TYPES = new Set(['reference', 'edit', 'extend']);
|
|
@@ -2834,6 +2851,10 @@ const options = {
|
|
|
2834
2851
|
steps: null,
|
|
2835
2852
|
guidance: null,
|
|
2836
2853
|
outputFormat: null,
|
|
2854
|
+
imageQuality: null,
|
|
2855
|
+
imageBackground: null,
|
|
2856
|
+
imageOutputCompression: null,
|
|
2857
|
+
imageMask: null,
|
|
2837
2858
|
sampler: null,
|
|
2838
2859
|
scheduler: null,
|
|
2839
2860
|
loras: [],
|
|
@@ -2893,6 +2914,10 @@ const options = {
|
|
|
2893
2914
|
outpaintAspectRatio: null, // Optional target aspect ratio for outpaint canvas growth
|
|
2894
2915
|
contextImages: [], // Context images for image editing
|
|
2895
2916
|
upscaleImage: null, // Source image for promptless RTX VSR upscaling
|
|
2917
|
+
segmentImage: null,
|
|
2918
|
+
segmentPoints: [],
|
|
2919
|
+
segmentBoxes: [],
|
|
2920
|
+
segmentText: null,
|
|
2896
2921
|
upscaleScale: 2,
|
|
2897
2922
|
upscaleTargetLongestEdge: null,
|
|
2898
2923
|
upscaleVideo: null, // Source video for promptless FlashVSR upscaling
|
|
@@ -3186,6 +3211,14 @@ for (let i = 0; i < args.length; i++) {
|
|
|
3186
3211
|
i++;
|
|
3187
3212
|
options.outputFormat = raw;
|
|
3188
3213
|
cliSet.outputFormat = true;
|
|
3214
|
+
} else if (arg === '--image-quality') {
|
|
3215
|
+
options.imageQuality = requireFlagValue(args, i++, arg);
|
|
3216
|
+
} else if (arg === '--image-background') {
|
|
3217
|
+
options.imageBackground = requireFlagValue(args, i++, arg);
|
|
3218
|
+
} else if (arg === '--image-output-compression') {
|
|
3219
|
+
options.imageOutputCompression = parseNumberValue(requireFlagValue(args, i++, arg), arg);
|
|
3220
|
+
} else if (arg === '--image-mask') {
|
|
3221
|
+
options.imageMask = requireFlagValue(args, i++, arg);
|
|
3189
3222
|
} else if (arg === '--sampler') {
|
|
3190
3223
|
const raw = requireFlagValue(args, i, arg);
|
|
3191
3224
|
i++;
|
|
@@ -3466,6 +3499,16 @@ for (let i = 0; i < args.length; i++) {
|
|
|
3466
3499
|
i++;
|
|
3467
3500
|
options.contextImages.push(raw);
|
|
3468
3501
|
cliSet.context = true;
|
|
3502
|
+
} else if (arg === '--segment') {
|
|
3503
|
+
options.segmentImage = expandHomePath(requireFlagValue(args, i++, arg));
|
|
3504
|
+
} else if (arg === '--segment-point' || arg === '--segment-exclude') {
|
|
3505
|
+
try { options.segmentPoints.push(segmentPoint(requireFlagValue(args, i++, arg), arg === '--segment-point' ? 'positive' : 'negative')); }
|
|
3506
|
+
catch (error) { fatalCliError(error.message, { code: 'INVALID_ARGUMENT' }); }
|
|
3507
|
+
} else if (arg === '--segment-box') {
|
|
3508
|
+
try { options.segmentBoxes.push(segmentBox(requireFlagValue(args, i++, arg))); }
|
|
3509
|
+
catch (error) { fatalCliError(error.message, { code: 'INVALID_ARGUMENT' }); }
|
|
3510
|
+
} else if (arg === '--segment-text') {
|
|
3511
|
+
options.segmentText = requireFlagValue(args, i++, arg);
|
|
3469
3512
|
} else if (arg === '--upscale') {
|
|
3470
3513
|
const raw = expandHomePath(requireFlagValue(args, i, arg));
|
|
3471
3514
|
i++;
|
|
@@ -4119,7 +4162,11 @@ Image Options:
|
|
|
4119
4162
|
--distance <key> close-up|medium|wide
|
|
4120
4163
|
--angle-strength <n> LoRA strength for multiple_angles (default: 0.9)
|
|
4121
4164
|
--angle-description <text> Optional subject description
|
|
4122
|
-
--output-format <f> Image output format: png|jpg (webp for
|
|
4165
|
+
--output-format <f> Image output format: png|jpg (webp for GPT Image)
|
|
4166
|
+
--image-quality <q> GPT Image: low|medium|high; 2.5 also xhigh|max
|
|
4167
|
+
--image-background <b> auto|opaque; 2.5 also transparent (PNG/WebP)
|
|
4168
|
+
--image-output-compression <n> JPEG/WebP compression, integer 0–100
|
|
4169
|
+
--image-mask <path|url> PNG alpha mask of first --context image, same size
|
|
4123
4170
|
--sampler <name> Sampler (images/music; H3 LightX2V Turbo: euler|er_sde|sa_solver; FastH3: euler)
|
|
4124
4171
|
--scheduler <name> Scheduler (model-dependent)
|
|
4125
4172
|
--lora <id> Image LoRA id (repeatable; order is significant)
|
|
@@ -4128,6 +4175,11 @@ Image Options:
|
|
|
4128
4175
|
--lora-strengths <n> Comma-separated LoRA strengths
|
|
4129
4176
|
-c, --context <path> Context image for editing (can use multiple)
|
|
4130
4177
|
--last-image Use last generated image as context
|
|
4178
|
+
--segment <path|url> SAM 3 object selection; returns one original-size PNG mask
|
|
4179
|
+
--segment-point <x,y> Include point, normalized 0–1; repeat to refine
|
|
4180
|
+
--segment-exclude <x,y> Exclude point, normalized 0–1; repeat to refine
|
|
4181
|
+
--segment-box <x0,y0,x1,y1> Object bounds, normalized 0–1
|
|
4182
|
+
--segment-text <text> Object description; combine with boxes, never points
|
|
4131
4183
|
--upscale <path|url> Promptless NVIDIA RTX VSR upscale, up to 16K (one source image)
|
|
4132
4184
|
--upscale-scale <n> Enlarge longest edge by 2, 3, or 4 (default: 2)
|
|
4133
4185
|
--target-longest-edge <px> Explicit output longest edge, up to 15360 (overrides scale)
|
|
@@ -4346,6 +4398,8 @@ Personas (named people with reference photos):
|
|
|
4346
4398
|
Image Models:
|
|
4347
4399
|
z_image_turbo_bf16 Fast, general purpose (default)
|
|
4348
4400
|
gpt-image-2 OpenAI GPT Image 2 text-to-image and edit (up to 16 context images)
|
|
4401
|
+
gpt-image-2.5-sunburst GPT Image 2.5 Sunburst: edits, masks, 16 references, transparency
|
|
4402
|
+
gpt-image-2.5-flare GPT Image 2.5 Flare: edits, masks, 16 references, transparency
|
|
4349
4403
|
krea2_turbo_fp8_scaled Krea 2 Turbo text-to-image
|
|
4350
4404
|
dark_beast_krea2_fp8 Dark Beast Krea 2 text-to-image
|
|
4351
4405
|
krea2_identity_edit_v1_2 Krea 2 Identity Edit LoRA (up to 2 context images)
|
|
@@ -4818,6 +4872,9 @@ if (options.multiAngle) {
|
|
|
4818
4872
|
}
|
|
4819
4873
|
}
|
|
4820
4874
|
|
|
4875
|
+
if (!options.video && !options.music && options.model) {
|
|
4876
|
+
options.model = normalizeGptImageModelAlias(options.model);
|
|
4877
|
+
}
|
|
4821
4878
|
if (options.outputFormat) {
|
|
4822
4879
|
const normalized = options.outputFormat.toLowerCase();
|
|
4823
4880
|
options.outputFormat = normalized === 'jpeg' ? 'jpg' : normalized;
|
|
@@ -4843,6 +4900,24 @@ if (options.outputFormat) {
|
|
|
4843
4900
|
}
|
|
4844
4901
|
}
|
|
4845
4902
|
|
|
4903
|
+
if (options.imageQuality !== null || options.imageBackground !== null || options.imageOutputCompression !== null || options.imageMask !== null) {
|
|
4904
|
+
try {
|
|
4905
|
+
if (options.video || options.music || !isGptImage2ModelSelection(options.model)) {
|
|
4906
|
+
throw new Error('Image quality, background, compression and mask options require a GPT Image model.');
|
|
4907
|
+
}
|
|
4908
|
+
// Provider-chosen (auto) quality is never used.
|
|
4909
|
+
if (options.imageQuality !== null && !['low', 'medium', 'high', 'xhigh', 'max'].includes(options.imageQuality)) {
|
|
4910
|
+
throw new Error('--image-quality must be low, medium, high, xhigh, or max.');
|
|
4911
|
+
}
|
|
4912
|
+
imageOptionsFromCli();
|
|
4913
|
+
if (options.imageMask && options.contextImages.length === 0) {
|
|
4914
|
+
throw new Error('--image-mask requires a first --context source image.');
|
|
4915
|
+
}
|
|
4916
|
+
} catch (error) {
|
|
4917
|
+
fatalCliError(error.message, { code: 'INVALID_ARGUMENT' });
|
|
4918
|
+
}
|
|
4919
|
+
}
|
|
4920
|
+
|
|
4846
4921
|
if (options.video) {
|
|
4847
4922
|
options.model = resolveSkillVideoModelAlias(options.model);
|
|
4848
4923
|
if (options.model === LTX23_10EROS_MODEL_ID && !options.noFilter) {
|
|
@@ -5348,6 +5423,10 @@ if (options.music) {
|
|
|
5348
5423
|
if (!cliSet.timeout && !timeoutFromConfig && options.timeout === 30000) {
|
|
5349
5424
|
options.timeout = 1800000; // 30 min for queued video work
|
|
5350
5425
|
}
|
|
5426
|
+
} else if (options.segmentImage) {
|
|
5427
|
+
if (options.model && options.model !== SAM3_MODEL_ID) fatalCliError(`--segment requires model ${SAM3_MODEL_ID}.`, { code: 'INVALID_ARGUMENT' });
|
|
5428
|
+
options.model = SAM3_MODEL_ID;
|
|
5429
|
+
if (!cliSet.timeout && !timeoutFromConfig) options.timeout = 180000;
|
|
5351
5430
|
} else if (options.upscaleImage) {
|
|
5352
5431
|
if (options.model && options.model !== RTX_VSR_MODEL_ID) {
|
|
5353
5432
|
fatalCliError(`--upscale requires model ${RTX_VSR_MODEL_ID}.`, {
|
|
@@ -5377,6 +5456,17 @@ if (options.music) {
|
|
|
5377
5456
|
options.model = options.model || openclawConfig?.defaultImageModel || 'z_image_turbo_bf16';
|
|
5378
5457
|
}
|
|
5379
5458
|
|
|
5459
|
+
if (!options.video && !options.music && isGptImage2ModelSelection(options.model)) {
|
|
5460
|
+
options.model = normalizeGptImageModelAlias(options.model);
|
|
5461
|
+
if (!cliSet.width && !widthFromConfig && !widthFromPrompt) options.width = 1024;
|
|
5462
|
+
if (!cliSet.height && !heightFromConfig && !heightFromPrompt) options.height = 1024;
|
|
5463
|
+
const { width, height } = options;
|
|
5464
|
+
if (width % 16 || height % 16 || Math.max(width, height) > 3840 || Math.max(width, height) / Math.min(width, height) > 3 || width * height < 655360 || width * height > 8294400) {
|
|
5465
|
+
fatalCliError('GPT Image dimensions must be multiples of 16, at most 3840 per edge, within 3:1 and 655360–8294400 pixels.', { code: 'INVALID_ARGUMENT' });
|
|
5466
|
+
}
|
|
5467
|
+
if (!cliSet.timeout && !timeoutFromConfig) options.timeout = 600000;
|
|
5468
|
+
}
|
|
5469
|
+
|
|
5380
5470
|
if (options.music) {
|
|
5381
5471
|
const musicDefaults = getMusicModelDefaults(options.model);
|
|
5382
5472
|
if (options.duration < MUSIC_DURATION_LIMITS.min || options.duration > MUSIC_DURATION_LIMITS.max) {
|
|
@@ -5473,6 +5563,7 @@ const commandUsesGenerationSeed = !options.apiChat &&
|
|
|
5473
5563
|
!options.remixAudio &&
|
|
5474
5564
|
!options.upscaleImage &&
|
|
5475
5565
|
!options.upscaleVideo &&
|
|
5566
|
+
!options.segmentImage &&
|
|
5476
5567
|
!options.listMedia &&
|
|
5477
5568
|
!options.memoryAction &&
|
|
5478
5569
|
!options.personalityAction &&
|
|
@@ -5511,7 +5602,7 @@ const wan3HasMediaInput = isWan3ModelLocal(options.model) && Boolean(
|
|
|
5511
5602
|
|| options.wan3ReferenceFileUrl
|
|
5512
5603
|
|| options.wan3ReferenceLinkUrl
|
|
5513
5604
|
);
|
|
5514
|
-
if (!options.prompt && !wan3HasMediaInput && !options.upscaleImage && !options.upscaleVideo && !options.apiChat && !apiWorkflowUtilityAction && !apiWorkflowStartAction && !apiModelUtilityAction && !liveModelUtilityAction && !loraCatalogUtilityAction && !apiReplayUtilityAction && !contractUtilityAction && !storyboardPlanUtilityAction && !options.estimateVideoCost && !options.multiAngle && !options.showBalance && !options.showVersion && !options.doctor && !options.extractLastFrame && !options.extractFirstFrame && !options.extractFrameAt && !options.trimVideo && !options.verifyVideo && !options.concatVideos && !options.sourceReelDir && !options.remixAudio && !options.listMedia && !options.memoryAction && !options.personalityAction && !personaUtilityAction) {
|
|
5605
|
+
if (!options.prompt && !wan3HasMediaInput && !options.segmentImage && !options.upscaleImage && !options.upscaleVideo && !options.apiChat && !apiWorkflowUtilityAction && !apiWorkflowStartAction && !apiModelUtilityAction && !liveModelUtilityAction && !loraCatalogUtilityAction && !apiReplayUtilityAction && !contractUtilityAction && !storyboardPlanUtilityAction && !options.estimateVideoCost && !options.multiAngle && !options.showBalance && !options.showVersion && !options.doctor && !options.extractLastFrame && !options.extractFirstFrame && !options.extractFrameAt && !options.trimVideo && !options.verifyVideo && !options.concatVideos && !options.sourceReelDir && !options.remixAudio && !options.listMedia && !options.memoryAction && !options.personalityAction && !personaUtilityAction) {
|
|
5515
5606
|
fatalCliError('No prompt provided. Use --help for usage.', { code: 'INVALID_ARGUMENT' });
|
|
5516
5607
|
}
|
|
5517
5608
|
|
|
@@ -5526,6 +5617,17 @@ if (options.apiChat && !options.prompt && getApiModeMediaReferences().length ===
|
|
|
5526
5617
|
fatalCliError('--api-chat requires a prompt or media reference for planning.', { code: 'INVALID_ARGUMENT' });
|
|
5527
5618
|
}
|
|
5528
5619
|
|
|
5620
|
+
if (options.segmentImage) {
|
|
5621
|
+
if (options.prompt || options.video || options.music || options.upscaleImage || options.upscaleVideo || options.photobooth || options.contextImages.length || options.refImage || options.refImageEnd
|
|
5622
|
+
|| options.apiChat || options.apiWorkflowAction || options.multiAngle || options.noFilter || options.count !== 1 || cliSet.width || cliSet.height) {
|
|
5623
|
+
fatalCliError('--segment requires one original image with selection points or --segment-text; omit generation prompts, resize, other generation modes and --no-filter.', { code: 'INVALID_ARGUMENT' });
|
|
5624
|
+
}
|
|
5625
|
+
try { validateSegmentationPrompts(options.segmentPoints, options.segmentText, options.segmentBoxes); }
|
|
5626
|
+
catch (error) { fatalCliError(error.message, { code: 'INVALID_ARGUMENT' }); }
|
|
5627
|
+
} else if (options.segmentPoints.length || options.segmentBoxes.length || options.segmentText !== null) {
|
|
5628
|
+
fatalCliError('Selection prompts require --segment <path|url>.', { code: 'INVALID_ARGUMENT' });
|
|
5629
|
+
}
|
|
5630
|
+
|
|
5529
5631
|
if (options.upscaleImage) {
|
|
5530
5632
|
if (options.prompt) {
|
|
5531
5633
|
fatalCliError('--upscale is promptless and does not accept a prompt.', { code: 'INVALID_ARGUMENT' });
|
|
@@ -7935,6 +8037,7 @@ function buildGeneratedKeyframeVideoWorkflowInput() {
|
|
|
7935
8037
|
}
|
|
7936
8038
|
|
|
7937
8039
|
function storyboardWorkflowImageQualityFromCli() {
|
|
8040
|
+
if (options.imageQuality) return options.imageQuality;
|
|
7938
8041
|
if (!cliSet.quality || !options.quality) return undefined;
|
|
7939
8042
|
if (options.quality === 'pro') return 'high';
|
|
7940
8043
|
if (options.quality === 'fast') return 'low';
|
|
@@ -13361,6 +13464,14 @@ async function main() {
|
|
|
13361
13464
|
if (upscaleVideoResult?.error || upscaleVideoResult?.message) {
|
|
13362
13465
|
throw annotateVideoUpscaleError(buildProjectResultError(upscaleVideoResult));
|
|
13363
13466
|
}
|
|
13467
|
+
} else if (options.segmentImage) {
|
|
13468
|
+
log('Selecting the object with SAM 3...');
|
|
13469
|
+
const bytes = await fetchMediaBuffer(options.segmentImage);
|
|
13470
|
+
const dimensions = getImageDimensionsFromBuffer(bytes);
|
|
13471
|
+
const config = segmentationConfig(bytes, dimensions, options.segmentPoints, options.segmentText, options.tokenType || 'spark', options.segmentBoxes);
|
|
13472
|
+
options.width = config.width; options.height = config.height; options.outputFormat = 'png';
|
|
13473
|
+
const result = trackProjectResult(await client.createImageProject(withBillingMode(config)));
|
|
13474
|
+
if (result?.error || result?.message) throw buildProjectResultError(result);
|
|
13364
13475
|
} else if (options.upscaleImage) {
|
|
13365
13476
|
log(`Upscaling with ${RTX_VSR_MODEL_ID}...`);
|
|
13366
13477
|
const sourceBuffer = await fetchMediaBuffer(options.upscaleImage);
|
|
@@ -13459,6 +13570,8 @@ async function main() {
|
|
|
13459
13570
|
if (gptImageQuality) {
|
|
13460
13571
|
editConfig.gptImageQuality = gptImageQuality;
|
|
13461
13572
|
}
|
|
13573
|
+
Object.assign(editConfig, imageOptionsFromCli());
|
|
13574
|
+
if (options.imageMask) editConfig.gptImageMask = await fetchMediaBuffer(options.imageMask);
|
|
13462
13575
|
if (options.loras.length > 0) {
|
|
13463
13576
|
editConfig.loras = options.loras;
|
|
13464
13577
|
}
|
|
@@ -13574,6 +13687,7 @@ async function main() {
|
|
|
13574
13687
|
if (gptImageQuality) {
|
|
13575
13688
|
projectConfig.gptImageQuality = gptImageQuality;
|
|
13576
13689
|
}
|
|
13690
|
+
Object.assign(projectConfig, imageOptionsFromCli());
|
|
13577
13691
|
if (options.sampler) {
|
|
13578
13692
|
projectConfig.sampler = options.sampler;
|
|
13579
13693
|
}
|
package/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PACKAGE_VERSION = '3.
|
|
1
|
+
export const PACKAGE_VERSION = '3.46.0';
|