@sogni-ai/sogni-creative-agent-skill 3.16.0 → 3.17.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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +15 -1
- package/README.md +3 -0
- package/SKILL.md +9 -1
- package/desktop-extension/manifest.json +1 -1
- package/generated/creative-agent-runtime.mjs +4 -4
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/references/models.md +18 -6
- package/references/private-mature-video.md +100 -0
- package/references/video-prompting.md +13 -1
- package/scripts/check-version-sync.mjs +1 -0
- package/scripts/sync-version.mjs +8 -2
- package/sogni-agent.mjs +386 -197
- package/version.mjs +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sogni-creative-agent",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.17.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,4 +1,18 @@
|
|
|
1
|
-
## [
|
|
1
|
+
## [3.17.0] - 2026-07-26
|
|
2
|
+
|
|
3
|
+
### Added
|
|
4
|
+
|
|
5
|
+
* **video:** add LTX-2.3 10Eros image-to-video support for private mature-theme creativity, including
|
|
6
|
+
DR34ML4Y v3 video LoRA support through `--lora dr34ml4y-v3`.
|
|
7
|
+
* **models:** move live model discovery to the public Sogni model catalog API, including API-supplied
|
|
8
|
+
catalog tags, network and media filtering, and five-minute ETag-revalidated caching without requiring
|
|
9
|
+
an API key.
|
|
10
|
+
|
|
11
|
+
## [3.16.1] - 2026-07-25
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
* **release:** stamp and verify the Codex plugin manifest alongside every other package and plugin manifest.
|
|
2
16
|
|
|
3
17
|
## [3.16.0] - 2026-07-25
|
|
4
18
|
|
package/README.md
CHANGED
|
@@ -347,6 +347,8 @@ Defaults live under `~/.config/sogni/` for credentials, last-render metadata, pe
|
|
|
347
347
|
|----------|---------|
|
|
348
348
|
| `SOGNI_CREDENTIALS_PATH` | Custom credentials file |
|
|
349
349
|
| `SOGNI_LAST_RENDER_PATH` | Where last-render state is persisted |
|
|
350
|
+
| `SOGNI_MODEL_CATALOG_URL` | Model catalog API base URL (default: `https://api.sogni.ai/v1/model-catalog`) |
|
|
351
|
+
| `SOGNI_MODEL_CATALOG_CACHE_PATH` | Base path for the five-minute model catalog caches and ETags |
|
|
350
352
|
| `SOGNI_MEDIA_INBOUND_DIR` | Directory used by `--list-media` |
|
|
351
353
|
| `OPENCLAW_CONFIG_PATH` | OpenClaw config file location |
|
|
352
354
|
| `FFMPEG_PATH` | Custom `ffmpeg` binary |
|
|
@@ -586,6 +588,7 @@ Music generation uses `--music` and outputs `mp3` by default. `--audio` remains
|
|
|
586
588
|
- 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.
|
|
587
589
|
- 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 ref becomes `1024×1535`). `sogni-agent` detects this for local refs and auto-adjusts to a nearby safe size.
|
|
588
590
|
- **LTX-2.3 two-keyframe morph:** when the LTX-2.3 i2v model `ltx23-22b-fp8_i2v_distilled` gets **both** a start frame (`--ref`) and an end frame (`--ref-end`), it auto-applies the ValiantCat transition/morph LoRA (lora id `transition`, trigger word `zhuanchang`, strength ~1.0) and morphs the first image into the last in a single render — no bridge clip or `--concat-videos` needed. The sogni-client SDK example feeds the two frames as its `image` / `end-image` arguments and additionally exposes manual `transition` / `transition-strength` SDK arguments.
|
|
591
|
+
- **Private mature-theme creativity:** optional uncensored LTX-2.3 video models are available for adults who explicitly want them. They remain opt-in and are not part of ordinary model recommendations; the agent loads their specialized guidance only for a relevant request.
|
|
589
592
|
- Pass `--strict-size` to fail instead — the script will print a suggested size.
|
|
590
593
|
|
|
591
594
|
V2V defaults mirror Sogni Chat workflow tuning: `canny`, `pose`, and `depth` use ControlNet strength `0.85` with detailer assist; `detailer` uses strength `1.0`. Use `-m seedance2-v2v` for Seedance V2V without ControlNet. Seedance accepts public HTTPS image, video, and audio references that pass CLI URL safety checks; localhost and private-network URLs are rejected before forwarding. Audio references must be paired with an image or video reference.
|
package/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: sogni-creative-agent-skill
|
|
3
3
|
description: "Sogni Creative Agent Skill: agent skill and CLI for image, video, and music generation using Sogni AI's decentralized GPU network. Supports one-click image-folder loop reels, personas (named people with saved reference photos and voice clips), persistent memories, custom personality, style transfer, angle synthesis, 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\", \"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.17.0"
|
|
6
6
|
homepage: https://sogni.ai
|
|
7
7
|
openclaw:
|
|
8
8
|
emoji: "🎨"
|
|
@@ -95,6 +95,8 @@ sogni-agent -o /tmp/cat.png "a cat wearing a hat" # ✗ avoid — user can't
|
|
|
95
95
|
|
|
96
96
|
- API key credentials file (read): `~/.config/sogni/credentials` (`SOGNI_CREDENTIALS_PATH`)
|
|
97
97
|
- Last render metadata (read/write): `~/.config/sogni/last-render.json` (`SOGNI_LAST_RENDER_PATH`)
|
|
98
|
+
- Model catalog: `https://api.sogni.ai/v1/model-catalog` (`SOGNI_MODEL_CATALOG_URL`)
|
|
99
|
+
- Model catalog cache (read/write, 5-minute TTL with ETag revalidation for model parameters and discovery): `~/.config/sogni/model-catalog-cache.json` (`SOGNI_MODEL_CATALOG_CACHE_PATH`)
|
|
98
100
|
- Memories / personality / personas (read/write): `~/.config/sogni/`
|
|
99
101
|
- OpenClaw config (read): `~/.openclaw/openclaw.json` (`OPENCLAW_CONFIG_PATH`)
|
|
100
102
|
- Media listing for `--list-media` (read): `~/.openclaw/media/inbound`, falling back to the legacy `~/.clawdbot/media/inbound` when only it exists (`SOGNI_MEDIA_INBOUND_DIR`)
|
|
@@ -226,6 +228,11 @@ sogni-agent -c photo.jpg -m qwen_image_edit_2511_fp8 "turn this into anime style
|
|
|
226
228
|
|
|
227
229
|
Whenever the chosen video model is in the LTX family (including the default t2v), **do not pass the user's short request through unchanged**. Rewrite it into one unbroken paragraph of 4-8 flowing present-tense sentences describing a single continuous shot — concrete subjects, named light sources, one action thread, dialogue embedded in double quotes with the speaker identified, positive phrasing only, no headers/bullets/negative-prompts. **Read [`references/video-prompting.md`](./references/video-prompting.md) for the full rule, duration pacing, orientation mapping, and camera-language normalization before writing the prompt.**
|
|
228
230
|
|
|
231
|
+
For lawful adult mature-theme video requests, read
|
|
232
|
+
[`references/private-mature-video.md`](./references/private-mature-video.md)
|
|
233
|
+
before choosing a model, LoRA, or specialized prompt token. Keep the exact
|
|
234
|
+
tokens in that scoped reference rather than ordinary model recommendations.
|
|
235
|
+
|
|
229
236
|
### High-res video
|
|
230
237
|
|
|
231
238
|
For "4k" / "uhd" requests where the user accepts the Premium Spark vendor path or asks for Seedance/native audio/multimodal references, use full Seedance: `-m seedance2 --target-resolution 2160`. Do not use `seedance2-mini` or `seedance2-fast` for 4K; both remain capped to the 720p lower-resolution path. For "hd" / "1080p" requests, or when avoiding vendor models, use `-m ltx23-22b-fp8_t2v_distilled` (text) or `-m ltx23-22b-fp8_i2v_distilled` (image), prefer `-w 1920 -h 1088` (or the orientation mapping in the reference), and rewrite the prompt per the LTX rule. For bare "720p" without orientation, prefer `--target-resolution 768`.
|
|
@@ -332,6 +339,7 @@ Uses Spark tokens from the user's Sogni account. 512x512 images are most cost-ef
|
|
|
332
339
|
| Read this | When the task involves |
|
|
333
340
|
|-----------|------------------------|
|
|
334
341
|
| [`references/video-prompting.md`](./references/video-prompting.md) | Writing LTX video prompts; high-res/4K routing; orientation/aspect mapping; camera language |
|
|
342
|
+
| [`references/private-mature-video.md`](./references/private-mature-video.md) | Mature-theme video model, LoRA, frame modes, and prompt tokens |
|
|
335
343
|
| [`references/video-editing.md`](./references/video-editing.md) | Animate between images, continue/bridge videos, 360 turnarounds, concat, audio remix/layering, v2v ControlNet |
|
|
336
344
|
| [`references/loop-maker.md`](./references/loop-maker.md) | One-click image-folder loops with visual deduplication, direct LTX first/last-frame clips, music, and verification |
|
|
337
345
|
| [`references/hosted-api.md`](./references/hosted-api.md) | `--api-chat`, `--durable-chat`, `--api-workflow`, workflow templates, replays, Seedance reference modes, cost controls |
|
|
@@ -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.17.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",
|
|
@@ -2194,7 +2194,7 @@ const PROMPT_CONTRACTS = [
|
|
|
2194
2194
|
"contractId": "edit_image_v1",
|
|
2195
2195
|
"version": "1.0.0",
|
|
2196
2196
|
"toolName": "edit_image",
|
|
2197
|
-
"baseDescription": "edit_image applies instruction-based edits to uploaded or generated images. Use when\nuploaded or reference images must guide identity or likeness.\n\nImage-to-Image prompt order: [IDENTITY LOCK] → [REQUESTED EDIT] → [REFERENCE ROLE\nMAPPING] → [POSE/COMPOSITION] → [STYLE] → [LIGHTING/REALISM] → [PRESERVE ALL\nUNMENTIONED DETAILS]. GOLDEN RULE: When editing a person, state which image owns\nidentity so it is not ambiguous. Describe only the DELTA — what changes. Don't\nrewrite the entire image; the base image already contains most of the truth. Default to minimal\nchange. For multi-image edits, assign one primary role per reference image (identity, pose,\noutfit, style, environment). Do not let a style/pose/clothing reference silently override the face.\nUse positive constraints — \"preserve exact facial likeness, face structure, eye shape, nose\nshape, mouth shape, jawline, skin tone, hairline, apparent age, and overall recognizability\"\n— not vague negatives like \"don't mess up the face\".\n\nUPLOADED IMAGE VARIANT SETS: When the user supplies a photo/portrait/reference image and\nasks for N distinct generated images deriving from that source while changing paired\nper-output details, prefer one edit_image call with sourceImageIndex=-1,\nnumberOfVariations=N, and ONE Dynamic Prompt branch with N complete options. Each option\nmust be a full concrete image prompt for one output, including the uploaded subject/reference\nanchor, requested pose or placement preservation, the specific changed appearance/style/role,\nclothing or surface details when relevant, setting/background, and any requested label text or\nvisual symbol. If one option is a remade original/preserved source and the rest are themed\nvariants, the original option should explicitly say to preserve the original clothing/wardrobe/outfit\nand background/setting, plus any requested added label, flag, logo, symbol, or prop.\nDo not call generate_image, analyze_image, or multiple serial edit_image calls first.\n\nSELECTION-GATED IMAGE STAGES: If the user asks for N image options and says they will pick\none before a later dance/video/animation, prefer one edit_image call with numberOfVariations=N\nand one Dynamic Prompt branch. After images are created, stop and ask the user to choose\nunless the user explicitly asked to run the later stage immediately.\n\nMULTI-PERSONA (COMBINED): When multiple personas must appear in the SAME scene, make\none edit_image call with all persona faces in one prompt and omit personaName.\nPer-persona splits (one call each with personaName set) are RARE — only when the user\nexplicitly asks for solo images of each person individually.\n\nSTORYBOARD IMAGE BATCH RULE: When rendering scene keyframes from a screenplay/storyboard,\nnumberOfVariations is only the count; the prompt should be one Dynamic Prompt branch with one\nfull keyframe prompt per scene:\n{scene 1 full keyframe prompt|scene 2 full keyframe prompt|...|scene N full keyframe prompt}.\nDo not set numberOfVariations=N with only the first scene prompt — that creates N versions of\nscene 1. For full project requests, one edit_image batch for all scene keyframes, then one\nanimate_photo batch for all video clips in parallel.\nException: if the storyboard/shot sheet is already uploaded and the user asks to make a\ntrailer/video/movie/clip from that uploaded board, do not extract panels or redraw keyframes.\nUse generate_video with Seedance references for one continuous clip unless the user explicitly\nasks for separate image keyframes or a storyboard sheet output.\n\nDIRECT UPLOADED GPT IMAGE 2 STORYBOARD SHEETS: If the user uploaded reference images and\nasks for one finished GPT Image 2 storyboard/keyframe sheet now, call edit_image directly\nwith sourceImageIndex=-1, model=\"gpt-image-2\", numberOfVariations=1, and the requested\ncanvas/aspect settings. If the user did not explicitly specify a storyboard page/canvas/sheet\nshape, default the GPT Image 2 storyboard sheet pixel dimensions to a balanced grid that hosts\nthe target cell aspect ratio natively (e.g., 12 cells with 9:16 portrait video target -> ~3:4\nportrait sheet around 1728x2304; 12 cells with 16:9 landscape video target -> ~4:3 landscape\nsheet around 2304x1728; 6 cells with 9:16 target -> ~27:32 portrait sheet around 1840x2176). Do\nNOT default the sheet to 2560x1440 landscape when cells are portrait — a landscape sheet with\na portrait-cell grid physically forces cells to ~4:3 landscape and the model will not render\n9:16 portrait rectangles inside it. Keep individual scene-cell/frame areas at the target video\naspect ratio. Do not call map_assets_for_model, analyze_image, generate_image, or a separate\nplanning tool first. The uploaded files are already available as references; describe their\nroles plainly in the edit_image prompt and generate the sheet in that call.\n\nDO NOT USE edit_image FOR UPLOADED REFERENCE LOOPED VIDEO SEGMENTS: If the user says the\nsame uploaded image/reference should be reused as the first frame and last frame of each\nscripted segment/scene/clip before stitching, they are explicitly asking to animate the\nuploaded image, not to generate new storyboard keyframes. Do not call edit_image for that\nrequest. Call animate_photo once with repeated uploaded source indices and per-scene prompts.",
|
|
2197
|
+
"baseDescription": "edit_image applies instruction-based edits to uploaded or generated images. Use when\nuploaded or reference images must guide identity or likeness.\n\nImage-to-Image prompt order: [IDENTITY LOCK] → [REQUESTED EDIT] → [REFERENCE ROLE\nMAPPING] → [POSE/COMPOSITION] → [STYLE] → [LIGHTING/REALISM] → [PRESERVE ALL\nUNMENTIONED DETAILS]. GOLDEN RULE: When editing a person, state which image owns\nidentity so it is not ambiguous. Describe only the DELTA — what changes. Don't\nrewrite the entire image; the base image already contains most of the truth. Default to minimal\nchange. For multi-image edits, assign one primary role per reference image (identity, pose,\noutfit, style, environment). Do not let a style/pose/clothing reference silently override the face.\nUse positive constraints — \"preserve exact facial likeness, face structure, eye shape, nose\nshape, mouth shape, jawline, skin tone, hairline, apparent age, and overall recognizability\"\n— not vague negatives like \"don't mess up the face\".\n\nKREA IDENTITY EDIT: Use model=\"krea-identity-edit\" for Krea 2 Identity Edit LoRA v1.2,\nidentity-preserving Krea edits, and the krea2_identity_edit_v1_2 model id. Use\nmodel=\"dark-beast-krea2-identity-edit\" for Dark Beast Krea 2 Identity Edit or the\ndark_beast_krea2_identity_edit_v1_2 model id. These models require one reference image,\naccept up to two context images, work best at 512-2048 px, default to 10 steps with\nguidance 1, and do not use negative prompts. Put the primary scene/base image first and\nthe person/detail reference second for scene-plus-person edits; reference them with\ncontext_image_0 and context_image_1 when model_ref tokens are needed.\n\nUPLOADED IMAGE VARIANT SETS: When the user supplies a photo/portrait/reference image and\nasks for N distinct generated images deriving from that source while changing paired\nper-output details, prefer one edit_image call with sourceImageIndex=-1,\nnumberOfVariations=N, and ONE Dynamic Prompt branch with N complete options. Each option\nmust be a full concrete image prompt for one output, including the uploaded subject/reference\nanchor, requested pose or placement preservation, the specific changed appearance/style/role,\nclothing or surface details when relevant, setting/background, and any requested label text or\nvisual symbol. If one option is a remade original/preserved source and the rest are themed\nvariants, the original option should explicitly say to preserve the original clothing/wardrobe/outfit\nand background/setting, plus any requested added label, flag, logo, symbol, or prop.\nDo not call generate_image, analyze_image, or multiple serial edit_image calls first.\n\nSELECTION-GATED IMAGE STAGES: If the user asks for N image options and says they will pick\none before a later dance/video/animation, prefer one edit_image call with numberOfVariations=N\nand one Dynamic Prompt branch. After images are created, stop and ask the user to choose\nunless the user explicitly asked to run the later stage immediately.\n\nMULTI-PERSONA (COMBINED): When multiple personas must appear in the SAME scene, make\none edit_image call with all persona faces in one prompt and omit personaName.\nPer-persona splits (one call each with personaName set) are RARE — only when the user\nexplicitly asks for solo images of each person individually.\n\nSTORYBOARD IMAGE BATCH RULE: When rendering scene keyframes from a screenplay/storyboard,\nnumberOfVariations is only the count; the prompt should be one Dynamic Prompt branch with one\nfull keyframe prompt per scene:\n{scene 1 full keyframe prompt|scene 2 full keyframe prompt|...|scene N full keyframe prompt}.\nDo not set numberOfVariations=N with only the first scene prompt — that creates N versions of\nscene 1. For full project requests, one edit_image batch for all scene keyframes, then one\nanimate_photo batch for all video clips in parallel.\nException: if the storyboard/shot sheet is already uploaded and the user asks to make a\ntrailer/video/movie/clip from that uploaded board, do not extract panels or redraw keyframes.\nUse generate_video with Seedance references for one continuous clip unless the user explicitly\nasks for separate image keyframes or a storyboard sheet output.\n\nDIRECT UPLOADED GPT IMAGE 2 STORYBOARD SHEETS: If the user uploaded reference images and\nasks for one finished GPT Image 2 storyboard/keyframe sheet now, call edit_image directly\nwith sourceImageIndex=-1, model=\"gpt-image-2\", numberOfVariations=1, and the requested\ncanvas/aspect settings. If the user did not explicitly specify a storyboard page/canvas/sheet\nshape, default the GPT Image 2 storyboard sheet pixel dimensions to a balanced grid that hosts\nthe target cell aspect ratio natively (e.g., 12 cells with 9:16 portrait video target -> ~3:4\nportrait sheet around 1728x2304; 12 cells with 16:9 landscape video target -> ~4:3 landscape\nsheet around 2304x1728; 6 cells with 9:16 target -> ~27:32 portrait sheet around 1840x2176). Do\nNOT default the sheet to 2560x1440 landscape when cells are portrait — a landscape sheet with\na portrait-cell grid physically forces cells to ~4:3 landscape and the model will not render\n9:16 portrait rectangles inside it. Keep individual scene-cell/frame areas at the target video\naspect ratio. Do not call map_assets_for_model, analyze_image, generate_image, or a separate\nplanning tool first. The uploaded files are already available as references; describe their\nroles plainly in the edit_image prompt and generate the sheet in that call.\n\nDO NOT USE edit_image FOR UPLOADED REFERENCE LOOPED VIDEO SEGMENTS: If the user says the\nsame uploaded image/reference should be reused as the first frame and last frame of each\nscripted segment/scene/clip before stitching, they are explicitly asking to animate the\nuploaded image, not to generate new storyboard keyframes. Do not call edit_image for that\nrequest. Call animate_photo once with repeated uploaded source indices and per-scene prompts.",
|
|
2198
2198
|
"parameterDocs": {
|
|
2199
2199
|
"sourceImageIndex": "Index of uploaded/generated image. Use -1 for the first uploaded image.",
|
|
2200
2200
|
"numberOfVariations": "Number of output variants. When > 1, use a Dynamic Prompt branch with one complete prompt per output.",
|
|
@@ -2205,7 +2205,7 @@ const PROMPT_CONTRACTS = [
|
|
|
2205
2205
|
"contractId": "generate_image_v1",
|
|
2206
2206
|
"version": "1.1.0",
|
|
2207
2207
|
"toolName": "generate_image",
|
|
2208
|
-
"baseDescription": "generate_image creates images from text descriptions. Use for text-only image generation;\nuse edit_image when uploaded or reference images must guide identity/likeness.\nException: Z-image and Z-image Turbo image-to-image/enhancement requests use generate_image\nwith model=\"z-turbo\" or model=\"z-image\", sourceImageIndex=-1, and starting_image_strength;\ndo not route explicit Z-image Turbo uploaded-image enhancement to edit_image because\nedit_image does not expose Z-image models.\n\nBATCH FAN-OUT DEFAULT (READ BEFORE ANYTHING ELSE BELOW):\nWhen the user explicitly asks for N images in the CURRENT turn, set numberOfVariations=N\nin one call. Avoid multiple serial generate_image calls unless the user explicitly wants\nindependent projects, isolated approvals, or per-output settings that cannot share one project.\nDo not omit numberOfVariations and try to \"generate the next one after this finishes\".\nTrigger phrasings:\n\"draw N\", \"make N\", \"give me N\", \"show me N\", \"render N\", \"create N\", \"generate N\",\n\"N more\", \"another N\", \"N as separate\", \"N separate images\", \"N different images\",\n\"N options\", \"N takes\", \"N versions\", \"N variations\", \"N pictures of\",\n\"all at the same time\", \"in parallel\", \"side by side as separate\".\n\nTHE PRIOR TURN DOES NOT ANCHOR THE CURRENT TURN. If the prior assistant turn used\nnumberOfVariations=1 with a composite \"N subjects in one image\" prompt, and the user\nnow says \"draw N more as separate images\" / \"as separate\" / \"separately\", DO NOT carry\nover numberOfVariations=1 from the prior call. The user is correcting that interpretation;\nset numberOfVariations=N for THIS call with one self-contained prompt per image via {|}\nDynamic Prompt branches. The new turn's count + separation language always wins over the\nprevious turn's pattern.\n\nWHEN BATCH FAN-OUT DOES NOT APPLY: numberOfVariations=1 with multiple subjects packed into\nONE prompt is correct only when the user clearly wants a SINGLE composite image (e.g.\n\"draw 2 goats in a meadow\" with no separation language, or explicit \"in one image\" / \"one\npicture of N\" / \"single image\" / \"composite\" / \"sheet\" / \"side-by-side composition\").\n\nFLUX.2 PROMPT ORDER: [SUBJECT] → [ATTRIBUTES] → [ACTION/POSE] → [CAMERA/FRAMING]\n→ [ENVIRONMENT] → [LIGHTING] → [STYLE/MEDIUM] → [MATERIALS/TEXTURES] →\n[SECONDARY DETAILS]. By default, start with the main subject and concrete observable\nattributes; use mood or atmosphere first only when the user explicitly asks for that shape.\nUse concrete nouns and observable adjectives — \"soft overcast daylight\" not \"nice lighting\".\nGood defaults when user is underspecified: medium shot for portraits, wide shot for\nenvironments, eye-level angle, soft natural light for realism.\n\nDYNAMIC PROMPTS: When numberOfVariations > 1, use Dynamic Prompt syntax to make each\nvariation meaningfully different — not just seed-different. Syntax: {a|b|c} cycles\nsequentially, {@a|b|c} picks randomly, {~a|b} paired cycling across groups. Rules: (1) Vary\nONLY what the user left unspecified — lock in everything they specified. (2) Match option\ncount to numberOfVariations so every result is unique. (3) Briefly tell the user what you're\nvarying without exposing raw {|} syntax unless the user asks to inspect the prompt.\n(4) Skip when: user wants consistency, prompt is fully\nspecified, user typed their own {|} syntax, or iterating on a specific result. (5) Do not put\nthe count or the word \"versions\"/\"variations\" inside the prompt — the prompt always describes\na single image. The multiplicity comes ONLY from numberOfVariations + the {|} syntax.\nLINKED VARIANTS: when multiple attributes must stay paired per result, use ONE top-level\nDynamic Prompt branch with one complete self-contained prompt per output. Do NOT split\nlinked fields into separate Dynamic Prompt groups.\n\nSELECTION-GATED IMAGE STAGES: If the user asks for N image options and says they will pick\none before a later dance/video/animation, call generate_image once with numberOfVariations=N.\nAfter images are created, stop and ask the user to choose unless the user explicitly asked\nto run the later stage immediately.\n\nIMAGE→VIDEO DIMENSION RULE: When generating an image that will feed into a video tool\n(animate_photo, sound_to_video, etc.), the image MUST be generated at the SAME aspect\nratio and dimensions as the target video. Default video aspect ratio is 16:9 landscape —\npass aspectRatio=\"16:9\" (or the user's specified/reference ratio) so the source image\nmatches the video output. Do not generate a square image for a widescreen video. Exception:\na composite GPT Image 2 storyboard/keyframe sheet for a later Seedance video is a board,\nnot a single source frame; unless the user explicitly specifies a storyboard page/canvas/sheet\nshape, default the sheet image dimensions to a balanced grid that hosts the target\nscene-cell/frame aspect natively (portrait video target -> portrait or square sheet whose\ncolumns x rows grid produces ~9:16 cells; landscape video target -> landscape sheet whose\nrows x columns grid produces ~16:9 cells). Each scene-cell/frame area preserves the target\nvideo aspect ratio.\n\nSTORYBOARD IMAGE BATCH RULE: When rendering scene keyframes from a screenplay/storyboard,\nnumberOfVariations is only the count; the prompt should be one Dynamic Prompt branch with one\nfull keyframe prompt per scene:\n{scene 1 full keyframe prompt|scene 2 full keyframe prompt|...|scene N full keyframe prompt}.\nDo not set numberOfVariations=N with only the first scene prompt — that creates N versions of\nscene 1. For full project requests, one generate_image batch for all scene keyframes, then\none animate_photo batch for all video clips in parallel.\n\nSTORYTELLING / BRAND / SOCIAL IMAGE PROMPTS: If generating a storyboard, ad concept,\ntrailer sheet, meme, creator post, or provocative social concept, make the first frame or\npanel immediately legible. Preserve the user's requested tone and audience. Use concrete\ncomposition, persona, product/brand role, caption placement, readable required text, and a\nclear visual transformation or punchline. For provocative adult social content, keep subjects\nclearly adult and consensual, PG-13/non-explicit, and avoid minor-coded styling or school-coded\nsettings while still optimizing visual magnet, persona, caption bait, and replay/comment value.\n\nGPT IMAGE 2 STORYBOARD SHEET → SEEDANCE AUTO-PROCEED: If the user asks to run the whole\nGPT Image 2 storyboard/keyframe sheet plus Seedance workflow without approval, the FIRST\ngenerate_image call must create ONE composite storyboard/keyframe sheet, not loose concept\nart and not separate keyframes. Use model=\"gpt-image-2\", numberOfVariations=1, and a\ncompiled storyboard prompt that literally includes: \"Create exactly N sequential video\nstoryboard frames as one composite storyboard image\", \"Target final video aspect ratio: X\",\na `SCENES:` section, and exactly N concrete scene entries named `SCENE_01`, `SCENE_02`,\netc. Each scene entry must include `Visual/Action:`, `Camera/Motion:`, `Dialogue/VO:`\n(use `[no dialogue]` when silent), `Audio/SFX:`, and any reference/visible-text notes\nneeded for that scene. Do not send only a source brief, storyboard concept, or generic\nlayout instructions as the prompt; malformed compiled storyboard prompts are blocked by\nquality audit instead of being repaired at runtime. If the user does not explicitly specify\na frame count, choose N with the shared storyboard density default: at least one key visual\nbeat about every 2 seconds, rounded up and clamped to 6-16 total storyboard frames\n(for example, a 60 second commercial defaults to N=16). Unless the user explicitly specifies another\nstoryboard page/canvas/sheet shape, default the GPT Image 2 storyboard sheet pixel dimensions\nto a balanced grid that hosts the target cell aspect natively: for a 9:16 portrait video,\npick a portrait-leaning sheet whose columns x rows grid produces ~9:16 cells (e.g., 12 cells\n-> ~3:4 sheet around 1728x2304, 6 cells -> ~27:32 around 1840x2176, 9 cells -> ~9:16 around\n1504x2672); for a 16:9 landscape video, pick a landscape sheet whose rows x columns grid\nproduces ~16:9 cells (e.g., 12 cells -> ~4:3 sheet around 2304x1728). Do not force landscape\n2560x1440 when cells are portrait — a landscape sheet with a portrait-cell grid cannot host\n9:16 cells without crushing them. Preserve the requested final video aspect ratio for every\nframe area. After\nthat image completes, call generate_video once using the generated storyboard board as\n@Image1/referenceImageIndices=[0], with skipPromptProcessing=false only when the user\nexplicitly wants the storyboard text rewritten; otherwise preserve the compiled shot guide\nand use skipPromptProcessing=true, expandPrompt=false.\n\nDO NOT USE generate_image FOR UPLOADED REFERENCE LOOPED VIDEO SEGMENTS: If the user says\nthe same uploaded image/reference should be reused as the first frame and last frame of each\nscripted segment/scene/clip before stitching, they are explicitly asking to animate the\nuploaded image, not to generate new storyboard keyframes. Do not call generate_image for\nthat request. Call animate_photo once with repeated uploaded source indices and per-scene\nprompts.\n\nREUSING RESULTS: When the user asks to redo, retry, or revise (e.g., \"try a new version\",\n\"redo the video with X\"), reuse the existing source images — do NOT regenerate them unless\nthe user explicitly asks for new images or describes changes to the images themselves.\nReference the existing result indices from the prior generation. If unsure whether the user\nwants new images, ask — don't regenerate by default.",
|
|
2208
|
+
"baseDescription": "generate_image creates images from text descriptions. Use for text-only image generation;\nuse edit_image when uploaded or reference images must guide identity/likeness.\nException: Z-image, Z-image Turbo, and Krea 2 Turbo image-to-image/enhancement requests\nuse generate_image with model=\"z-turbo\", model=\"z-image\", or model=\"krea-2-turbo\",\nsourceImageIndex=-1, and starting_image_strength; do not route explicit base-model\nZ-image Turbo or Krea 2 Turbo uploaded-image enhancement to edit_image because edit_image\ndoes not expose those base image-to-image models.\n\nMODEL CHOICE: If the user asks for Krea 2 Turbo, choose model=\"krea-2-turbo\". If they ask\nfor Dark Beast Krea 2, choose model=\"dark-beast-krea2\". If they ask for Dark Beast Z-Image\nTurbo, choose model=\"dark-beast-z-turbo\". If they ask for Chroma 1 HD, choose model=\"chroma1-hd\".\nIf they ask for anime or anime-style output without naming a model, choose model=\"one-obsession-v22\".\nBase Z-image and Krea 2 Turbo image-to-image/enhancement requests stay on generate_image with\nsourceImageIndex and starting_image_strength; identity-preserving Krea edits with reference\nphotos use edit_image instead.\n\nBATCH FAN-OUT DEFAULT (READ BEFORE ANYTHING ELSE BELOW):\nWhen the user explicitly asks for N images in the CURRENT turn, set numberOfVariations=N\nin one call. Avoid multiple serial generate_image calls unless the user explicitly wants\nindependent projects, isolated approvals, or per-output settings that cannot share one project.\nDo not omit numberOfVariations and try to \"generate the next one after this finishes\".\nTrigger phrasings:\n\"draw N\", \"make N\", \"give me N\", \"show me N\", \"render N\", \"create N\", \"generate N\",\n\"N more\", \"another N\", \"N as separate\", \"N separate images\", \"N different images\",\n\"N options\", \"N takes\", \"N versions\", \"N variations\", \"N pictures of\",\n\"all at the same time\", \"in parallel\", \"side by side as separate\".\n\nTHE PRIOR TURN DOES NOT ANCHOR THE CURRENT TURN. If the prior assistant turn used\nnumberOfVariations=1 with a composite \"N subjects in one image\" prompt, and the user\nnow says \"draw N more as separate images\" / \"as separate\" / \"separately\", DO NOT carry\nover numberOfVariations=1 from the prior call. The user is correcting that interpretation;\nset numberOfVariations=N for THIS call with one self-contained prompt per image via {|}\nDynamic Prompt branches. The new turn's count + separation language always wins over the\nprevious turn's pattern.\n\nWHEN BATCH FAN-OUT DOES NOT APPLY: numberOfVariations=1 with multiple subjects packed into\nONE prompt is correct only when the user clearly wants a SINGLE composite image (e.g.\n\"draw 2 goats in a meadow\" with no separation language, or explicit \"in one image\" / \"one\npicture of N\" / \"single image\" / \"composite\" / \"sheet\" / \"side-by-side composition\").\n\nFLUX.2 PROMPT ORDER: [SUBJECT] → [ATTRIBUTES] → [ACTION/POSE] → [CAMERA/FRAMING]\n→ [ENVIRONMENT] → [LIGHTING] → [STYLE/MEDIUM] → [MATERIALS/TEXTURES] →\n[SECONDARY DETAILS]. By default, start with the main subject and concrete observable\nattributes; use mood or atmosphere first only when the user explicitly asks for that shape.\nUse concrete nouns and observable adjectives — \"soft overcast daylight\" not \"nice lighting\".\nGood defaults when user is underspecified: medium shot for portraits, wide shot for\nenvironments, eye-level angle, soft natural light for realism.\n\nDYNAMIC PROMPTS: When numberOfVariations > 1, use Dynamic Prompt syntax to make each\nvariation meaningfully different — not just seed-different. Syntax: {a|b|c} cycles\nsequentially, {@a|b|c} picks randomly, {~a|b} paired cycling across groups. Rules: (1) Vary\nONLY what the user left unspecified — lock in everything they specified. (2) Match option\ncount to numberOfVariations so every result is unique. (3) Briefly tell the user what you're\nvarying without exposing raw {|} syntax unless the user asks to inspect the prompt.\n(4) Skip when: user wants consistency, prompt is fully\nspecified, user typed their own {|} syntax, or iterating on a specific result. (5) Do not put\nthe count or the word \"versions\"/\"variations\" inside the prompt — the prompt always describes\na single image. The multiplicity comes ONLY from numberOfVariations + the {|} syntax.\nLINKED VARIANTS: when multiple attributes must stay paired per result, use ONE top-level\nDynamic Prompt branch with one complete self-contained prompt per output. Do NOT split\nlinked fields into separate Dynamic Prompt groups.\n\nSELECTION-GATED IMAGE STAGES: If the user asks for N image options and says they will pick\none before a later dance/video/animation, call generate_image once with numberOfVariations=N.\nAfter images are created, stop and ask the user to choose unless the user explicitly asked\nto run the later stage immediately.\n\nIMAGE→VIDEO DIMENSION RULE: When generating an image that will feed into a video tool\n(animate_photo, sound_to_video, etc.), the image MUST be generated at the SAME aspect\nratio and dimensions as the target video. Default video aspect ratio is 16:9 landscape —\npass aspectRatio=\"16:9\" (or the user's specified/reference ratio) so the source image\nmatches the video output. Do not generate a square image for a widescreen video. Exception:\na composite GPT Image 2 storyboard/keyframe sheet for a later Seedance video is a board,\nnot a single source frame; unless the user explicitly specifies a storyboard page/canvas/sheet\nshape, default the sheet image dimensions to a balanced grid that hosts the target\nscene-cell/frame aspect natively (portrait video target -> portrait or square sheet whose\ncolumns x rows grid produces ~9:16 cells; landscape video target -> landscape sheet whose\nrows x columns grid produces ~16:9 cells). Each scene-cell/frame area preserves the target\nvideo aspect ratio.\n\nSTORYBOARD IMAGE BATCH RULE: When rendering scene keyframes from a screenplay/storyboard,\nnumberOfVariations is only the count; the prompt should be one Dynamic Prompt branch with one\nfull keyframe prompt per scene:\n{scene 1 full keyframe prompt|scene 2 full keyframe prompt|...|scene N full keyframe prompt}.\nDo not set numberOfVariations=N with only the first scene prompt — that creates N versions of\nscene 1. For full project requests, one generate_image batch for all scene keyframes, then\none animate_photo batch for all video clips in parallel.\n\nSTORYTELLING / BRAND / SOCIAL IMAGE PROMPTS: If generating a storyboard, ad concept,\ntrailer sheet, meme, creator post, or provocative social concept, make the first frame or\npanel immediately legible. Preserve the user's requested tone and audience. Use concrete\ncomposition, persona, product/brand role, caption placement, readable required text, and a\nclear visual transformation or punchline. For provocative adult social content, keep subjects\nclearly adult and consensual, PG-13/non-explicit, and avoid minor-coded styling or school-coded\nsettings while still optimizing visual magnet, persona, caption bait, and replay/comment value.\n\nGPT IMAGE 2 STORYBOARD SHEET → SEEDANCE AUTO-PROCEED: If the user asks to run the whole\nGPT Image 2 storyboard/keyframe sheet plus Seedance workflow without approval, the FIRST\ngenerate_image call must create ONE composite storyboard/keyframe sheet, not loose concept\nart and not separate keyframes. Use model=\"gpt-image-2\", numberOfVariations=1, and a\ncompiled storyboard prompt that literally includes: \"Create exactly N sequential video\nstoryboard frames as one composite storyboard image\", \"Target final video aspect ratio: X\",\na `SCENES:` section, and exactly N concrete scene entries named `SCENE_01`, `SCENE_02`,\netc. Each scene entry must include `Visual/Action:`, `Camera/Motion:`, `Dialogue/VO:`\n(use `[no dialogue]` when silent), `Audio/SFX:`, and any reference/visible-text notes\nneeded for that scene. Do not send only a source brief, storyboard concept, or generic\nlayout instructions as the prompt; malformed compiled storyboard prompts are blocked by\nquality audit instead of being repaired at runtime. If the user does not explicitly specify\na frame count, choose N with the shared storyboard density default: at least one key visual\nbeat about every 2 seconds, rounded up and clamped to 6-16 total storyboard frames\n(for example, a 60 second commercial defaults to N=16). Unless the user explicitly specifies another\nstoryboard page/canvas/sheet shape, default the GPT Image 2 storyboard sheet pixel dimensions\nto a balanced grid that hosts the target cell aspect natively: for a 9:16 portrait video,\npick a portrait-leaning sheet whose columns x rows grid produces ~9:16 cells (e.g., 12 cells\n-> ~3:4 sheet around 1728x2304, 6 cells -> ~27:32 around 1840x2176, 9 cells -> ~9:16 around\n1504x2672); for a 16:9 landscape video, pick a landscape sheet whose rows x columns grid\nproduces ~16:9 cells (e.g., 12 cells -> ~4:3 sheet around 2304x1728). Do not force landscape\n2560x1440 when cells are portrait — a landscape sheet with a portrait-cell grid cannot host\n9:16 cells without crushing them. Preserve the requested final video aspect ratio for every\nframe area. After\nthat image completes, call generate_video once using the generated storyboard board as\n@Image1/referenceImageIndices=[0], with skipPromptProcessing=false only when the user\nexplicitly wants the storyboard text rewritten; otherwise preserve the compiled shot guide\nand use skipPromptProcessing=true, expandPrompt=false.\n\nDO NOT USE generate_image FOR UPLOADED REFERENCE LOOPED VIDEO SEGMENTS: If the user says\nthe same uploaded image/reference should be reused as the first frame and last frame of each\nscripted segment/scene/clip before stitching, they are explicitly asking to animate the\nuploaded image, not to generate new storyboard keyframes. Do not call generate_image for\nthat request. Call animate_photo once with repeated uploaded source indices and per-scene\nprompts.\n\nREUSING RESULTS: When the user asks to redo, retry, or revise (e.g., \"try a new version\",\n\"redo the video with X\"), reuse the existing source images — do NOT regenerate them unless\nthe user explicitly asks for new images or describes changes to the images themselves.\nReference the existing result indices from the prior generation. If unsure whether the user\nwants new images, ask — don't regenerate by default.",
|
|
2209
2209
|
"parameterDocs": {
|
|
2210
2210
|
"prompt": "Text description. Follow FLUX.2 prompt order: subject first. Use Dynamic Prompt syntax when numberOfVariations > 1.",
|
|
2211
2211
|
"numberOfVariations": "Number of distinct outputs. Use Dynamic Prompt {|} syntax to vary one attribute per image. Never put the count in the prompt itself.",
|
|
@@ -2354,7 +2354,7 @@ const PROMPT_CONTRACTS = [
|
|
|
2354
2354
|
"contractId": "resolve_personas_v1",
|
|
2355
2355
|
"version": "1.0.0",
|
|
2356
2356
|
"toolName": "resolve_personas",
|
|
2357
|
-
"baseDescription": "resolve_personas is the required first step when the user explicitly names a saved Persona\nor says to use a Persona Image, Persona reference photo, Persona Voice, registered voice,\nor voice clone. Do not answer in prose, ask a follow-up, or finalize before calling this\ntool when a listed Persona name is present.\n\nDIRECT PERSONA IMAGE / VOICE VIDEO: If the user says to use the Persona image/reference\ndirectly/originally, call resolve_personas first, then call animate_photo using the injected\npersona photo as an uploaded image index. For one named Persona, use sourceImageIndex=-1\nor sourceImageIndices=[-1,...] for a multi-clip batch. If Persona Voice was explicitly\nrequested, set voicePersonaName to the exact resolved Persona name and use ltx23. Use\nanimate_photo when an image/source frame should be animated. Use generate_video with\nltx23 when the user requested a persona voice video but no image source exists yet.\nDo not call sound_to_video for Persona voice clips; they are voice identity references,\nnot the audio track to synchronize. Do not generate a new image first when the user\nexplicitly requested the existing Persona image directly.\n\nMULTI-CLIP PERSONA BATCHES: If the user asks for several separate clips from the same\nPersona Image, make one animate_photo call after resolve_personas with repeated persona\nsource indices, one prompt per clip, and the requested per-clip duration. If the user asks\nto stitch the clips, call stitch_video with the returned video indices after animate_photo.",
|
|
2357
|
+
"baseDescription": "resolve_personas is the required first step when the user explicitly names a saved Persona\nor says to use a Persona Image, Persona reference photo, Persona Voice, registered voice,\nor voice clone. Do not answer in prose, ask a follow-up, or finalize before calling this\ntool when a listed Persona name is present.\n\nDIRECT PERSONA IMAGE / VOICE VIDEO: If the user says to use the Persona image/reference\ndirectly/originally, call resolve_personas first, then call animate_photo using the injected\npersona photo as an uploaded image index. For one named Persona, use sourceImageIndex=-1\nor sourceImageIndices=[-1,...] for a multi-clip batch. If Persona Voice was explicitly\nrequested, set voicePersonaName to the exact resolved Persona name and use ltx23. Use\nanimate_photo when an image/source frame should be animated. Use generate_video with\nltx23 when the user requested a persona voice video but no image source exists yet.\nDo not call sound_to_video for Persona voice clips; they are voice identity references,\nnot the audio track to synchronize. Do not generate a new image first when the user\nexplicitly requested the existing Persona image directly.\n\nMULTI-CLIP PERSONA BATCHES: If the user asks for several separate clips from the same\nPersona Image, make one animate_photo call after resolve_personas with repeated persona\nsource indices, one prompt per clip, and the requested per-clip duration. If the user asks\nto stitch the clips, call stitch_video with the returned video indices after animate_photo.\n\nPERSONA IMAGE GENERATION: After resolving persona reference photos for a new persona image,\nuse edit_image rather than generate_image. Krea 2 Identity Edit and Dark Beast Krea 2 Identity\nEdit are available edit_image model choices when the request needs strong identity preservation\nfrom one or two reference photos; use concise identity locks and keep within the two-reference\nlimit.",
|
|
2358
2358
|
"parameterDocs": {
|
|
2359
2359
|
"names": "Persona names to load. Use the exact listed Persona name; call this before any Persona image/voice video or image generation."
|
|
2360
2360
|
}
|
|
@@ -2407,7 +2407,7 @@ const PROMPT_CONTRACTS = [
|
|
|
2407
2407
|
"contractId": "map_assets_for_model_v1",
|
|
2408
2408
|
"version": "1.0.0",
|
|
2409
2409
|
"toolName": "map_assets_for_model",
|
|
2410
|
-
"baseDescription": "map_assets_for_model is an inspection helper for previously generated asset-manifest entries\nwhen you need exact model_ref tokens for a later prompt.\n\nDo NOT call this for ordinary uploaded image references. If the user uploaded images and\nasks GPT Image 2 to use all uploaded assets as visual references, call edit_image directly\nwith sourceImageIndex=-1 and describe the uploaded assets/roles in the prompt. Uploaded\nreference images are already available to edit_image/generate_image; mapping them first\nwastes a tool round and may violate direct-generation requests.\n\nUse this helper only when a previous tool result produced assets in the manifest and the\nnext prompt must name those prior generated assets with provider-specific tokens.",
|
|
2410
|
+
"baseDescription": "map_assets_for_model is an inspection helper for previously generated asset-manifest entries\nwhen you need exact model_ref tokens for a later prompt.\n\nDo NOT call this for ordinary uploaded image references. If the user uploaded images and\nasks GPT Image 2 to use all uploaded assets as visual references, call edit_image directly\nwith sourceImageIndex=-1 and describe the uploaded assets/roles in the prompt. Uploaded\nreference images are already available to edit_image/generate_image; mapping them first\nwastes a tool round and may violate direct-generation requests.\n\nUse this helper only when a previous tool result produced assets in the manifest and the\nnext prompt must name those prior generated assets with provider-specific tokens.\n\nContext-conditioned image/edit models such as LTX 2.3, Wan, Qwen Image Edit, Krea 2 Identity\nEdit, and Dark Beast Krea 2 Identity Edit use zero-indexed model_ref tokens like\ncontext_image_0 and context_image_1. Use the helper output instead of hand-formatting those tokens.",
|
|
2411
2411
|
"parameterDocs": {
|
|
2412
2412
|
"model_id": "Target model for prior generated manifest refs. Do not use for plain uploaded references."
|
|
2413
2413
|
}
|
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.17.0",
|
|
6
6
|
"skills": [
|
|
7
7
|
"."
|
|
8
8
|
],
|
package/package.json
CHANGED
package/references/models.md
CHANGED
|
@@ -8,8 +8,7 @@ answering "which model should I use for X". For everyday generation prefer
|
|
|
8
8
|
## Live model discovery
|
|
9
9
|
|
|
10
10
|
The static tables below are recommendations, not the complete changing
|
|
11
|
-
Supernet catalog. Query the
|
|
12
|
-
`sogni-client` model availability:
|
|
11
|
+
Supernet catalog. Query the public REST catalog through the CLI:
|
|
13
12
|
|
|
14
13
|
```bash
|
|
15
14
|
sogni-agent --list-models
|
|
@@ -28,10 +27,9 @@ also searches catalog tags such as `spicy`, `uncensored`, `community`, `new`,
|
|
|
28
27
|
and tier labels. `--model-tag <tag>` is repeatable and combines filters with
|
|
29
28
|
AND semantics.
|
|
30
29
|
|
|
31
|
-
Availability
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
network are returned.
|
|
30
|
+
Availability, worker counts, media types, network coverage, and tags come from
|
|
31
|
+
`https://api.sogni.ai/v1/model-catalog`. Only models that are live on the
|
|
32
|
+
selected network are returned. Discovery does not require an API key.
|
|
35
33
|
|
|
36
34
|
`--list-api-models` is different: it lists Sogni Intelligence language models
|
|
37
35
|
from `/v1/models`, not Supernet media models.
|
|
@@ -110,6 +108,7 @@ direct music generation. Music controls: `--lyrics`, `--language`, `--bpm`
|
|
|
110
108
|
| `ltx23-22b-fp8_ia2v_distilled` | Fast (~2-3min) | Image+audio-to-video |
|
|
111
109
|
| `ltx23-22b-fp8_a2v_distilled` | Fast (~2-3min) | Audio-to-video |
|
|
112
110
|
| `ltx23-22b-fp8_v2v_distilled` | Fast (~3min) | Video-to-video with ControlNet, plus canvas outpaint and masked inpaint |
|
|
111
|
+
| `ltx23-22b-10eros-v1.4-fp8mixed_i2v` | Fast, 32GB+ Fast workers | Opt-in mature-theme image-to-video with native audio |
|
|
113
112
|
| `seedance2` | Variable | Seedance 2.0 text-to-video, 4-15s, native audio, up to native 4K |
|
|
114
113
|
| `seedance2-mini` | Variable | Seedance 2.0 Mini text-to-video, lower-cost 720p path |
|
|
115
114
|
| `seedance2-fast` | Variable | Legacy fast Seedance 2.0 text-to-video, 720p path |
|
|
@@ -193,6 +192,18 @@ and short in-scene text.
|
|
|
193
192
|
| `ltx2-19b-fp8_v2v_distilled` | Fast (~3min) | Video-to-video with ControlNet |
|
|
194
193
|
| `ltx2-19b-fp8_v2v` | Medium (~5min) | Video-to-video with ControlNet, quality |
|
|
195
194
|
|
|
195
|
+
### Private mature-theme video options
|
|
196
|
+
|
|
197
|
+
Sogni supports private, uncensored creativity, including optional video models
|
|
198
|
+
for mature themes. These options are opt-in and should not be foregrounded in
|
|
199
|
+
general recommendations. When an adult user explicitly requests mature
|
|
200
|
+
content, read
|
|
201
|
+
[`private-mature-video.md`](private-mature-video.md) for the compatible model,
|
|
202
|
+
LoRA, filter, and specialized prompt-token contract.
|
|
203
|
+
|
|
204
|
+
Keep specialized prompt tokens in the scoped reference rather than general
|
|
205
|
+
model recommendations.
|
|
206
|
+
|
|
196
207
|
## Recommended model selectors by need
|
|
197
208
|
|
|
198
209
|
| Need | Recommended selector |
|
|
@@ -211,6 +222,7 @@ and short in-scene text.
|
|
|
211
222
|
| Image+audio-to-video | `ltx23-22b-fp8_ia2v_distilled` |
|
|
212
223
|
| Audio-to-video | `ltx23-22b-fp8_a2v_distilled` |
|
|
213
224
|
| Video-to-video with ControlNet | `ltx23-22b-fp8_v2v_distilled` |
|
|
225
|
+
| Private mature-theme image-to-video | `ltx23-22b-10eros-v1.4-fp8mixed_i2v` |
|
|
214
226
|
| Seedance text-to-video | `seedance2`, `seedance2-mini`, or `seedance2-fast` |
|
|
215
227
|
| Seedance video-to-video without ControlNet | `seedance2-v2v` |
|
|
216
228
|
| HappyHorse text-to-video with native audio | `happyhorse-1.1-t2v` (or `happyhorse`) |
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Private Mature-Theme Video Reference
|
|
2
|
+
|
|
3
|
+
Use this reference for lawful adult mature-theme video requests.
|
|
4
|
+
|
|
5
|
+
## Routing
|
|
6
|
+
|
|
7
|
+
Prefer `ltx23-22b-10eros-v1.4-fp8mixed_i2v` (`10eros`) for this use case. It
|
|
8
|
+
is a fast LTX image-to-video model with generated audio. It accepts a first
|
|
9
|
+
frame, a last frame, or both, and requires `--no-filter`.
|
|
10
|
+
|
|
11
|
+
Use `dr34ml4y-v3` at strength 1 with 10Eros by default. It improves mature-theme
|
|
12
|
+
prompt adherence, motion, and physical behavior even when no action token is
|
|
13
|
+
needed. Omit it only when the creator requests the base 10Eros model alone or
|
|
14
|
+
when comparing/troubleshooting the model and LoRA separately.
|
|
15
|
+
|
|
16
|
+
The LoRA supports:
|
|
17
|
+
|
|
18
|
+
- `ltx23-22b-fp8_i2v`
|
|
19
|
+
- `ltx23-22b-fp8_i2v_dev`
|
|
20
|
+
- `ltx23-22b-10eros-v1.4-fp8mixed_i2v` (preferred)
|
|
21
|
+
|
|
22
|
+
Sogni installs the LT3X v3 LoRA, not the separately trained WAN release. Do not
|
|
23
|
+
use this LoRA ID with WAN models.
|
|
24
|
+
|
|
25
|
+
## Specialized prompt vocabulary
|
|
26
|
+
|
|
27
|
+
The LoRA is one multi-concept adapter. Each token selects an action concept:
|
|
28
|
+
|
|
29
|
+
| User intent | Token |
|
|
30
|
+
|-------------|-------|
|
|
31
|
+
| Missionary position | `m15510n4ry` |
|
|
32
|
+
| Oral action | `bl0wj0b` |
|
|
33
|
+
| Two-person oral action | `d0ubl3_bj` |
|
|
34
|
+
| Rear-entry position | `d0gg1e` |
|
|
35
|
+
| Partner-on-top position | `c0wg1rl` |
|
|
36
|
+
| Reverse partner-on-top position | `r3v3rs3_c0wg1rl` |
|
|
37
|
+
|
|
38
|
+
Use one matching token for a clip focused on one action. Multiple tokens can be
|
|
39
|
+
used for sequential actions, but results may blend the concepts. For more
|
|
40
|
+
reliable output, render one action per clip and stitch the clips. When a single
|
|
41
|
+
continuous transition is preferred, keep the sequence short, describe it
|
|
42
|
+
chronologically, and place each token beside its corresponding action.
|
|
43
|
+
|
|
44
|
+
## Prompt construction for 10Eros + DR34ML4Y
|
|
45
|
+
|
|
46
|
+
Write the prompt solely to produce the result the creator requested. Use one
|
|
47
|
+
unbroken, chronological LTX paragraph:
|
|
48
|
+
|
|
49
|
+
1. Describe the supplied frame's visible composition and pose.
|
|
50
|
+
2. State the action concretely. Include a LoRA token when the requested action
|
|
51
|
+
matches one of its trained concepts.
|
|
52
|
+
3. Describe what happens step by step in chronological order: who moves, which
|
|
53
|
+
body parts move, their direction, changes in position or contact, and the
|
|
54
|
+
resulting pose.
|
|
55
|
+
4. Specify shot scale, camera angle, framing, and any camera movement.
|
|
56
|
+
5. Integrate the audio design with the action: voice delivery, dialogue, foley,
|
|
57
|
+
environmental sound, and music where relevant.
|
|
58
|
+
|
|
59
|
+
Be specific and literal. Do not substitute euphemisms or generalizations for
|
|
60
|
+
the requested visible action. Keep the action density appropriate for the
|
|
61
|
+
duration, and avoid contradictory positions, unrelated cuts, generic quality
|
|
62
|
+
tags, and repeating the same action in several different ways.
|
|
63
|
+
|
|
64
|
+
Write every spoken line verbatim in double quotes and identify who says it and
|
|
65
|
+
how. Never imply dialogue with a summary such as "they talk" or "she says
|
|
66
|
+
something." Keep dialogue concise enough to fit the clip and coordinate sounds
|
|
67
|
+
with the motion that produces them.
|
|
68
|
+
|
|
69
|
+
For first+last keyframes, describe the exact continuous change that connects
|
|
70
|
+
the supplied boundaries rather than reimagining either endpoint. For
|
|
71
|
+
last-frame-only generation, describe the preceding motion and composition that
|
|
72
|
+
must resolve naturally into the supplied final frame. For a same-frame loop,
|
|
73
|
+
describe motion that departs from and settles back into that boundary pose.
|
|
74
|
+
|
|
75
|
+
Action tokens are optional: attach the LoRA for its broader domain improvement
|
|
76
|
+
even when none of its specialized concepts apply. Generate multiple seeds for
|
|
77
|
+
difficult poses, transitions, or multi-action clips.
|
|
78
|
+
|
|
79
|
+
## Frame modes and loops
|
|
80
|
+
|
|
81
|
+
- First-frame animation: `--ref ./first.png`
|
|
82
|
+
- Last-frame-directed animation: `--ref-end ./last.png`
|
|
83
|
+
- First-to-last interpolation: use both `--ref ./first.png` and
|
|
84
|
+
`--ref-end ./last.png`
|
|
85
|
+
- Single-render anchored loop: use the same image as both the first and last
|
|
86
|
+
frame, or use deliberately matching boundary frames. Do not add `--looping`
|
|
87
|
+
to this form.
|
|
88
|
+
- Automatic two-clip loop: use `--looping --ref ./first.png`. The CLI generates
|
|
89
|
+
A→B and B→A and joins them; this mode creates its own return endpoint and
|
|
90
|
+
therefore does not accept `--ref-end`.
|
|
91
|
+
|
|
92
|
+
The optional DR34ML4Y LoRA works with each compatible 10Eros frame mode.
|
|
93
|
+
|
|
94
|
+
Command shape:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
sogni-agent --video --ref ./start.png -m 10eros \
|
|
98
|
+
--lora dr34ml4y-v3 --lora-strength 1 --no-filter \
|
|
99
|
+
"<purpose-built LTX prompt matching the creator's intended result>"
|
|
100
|
+
```
|
|
@@ -15,7 +15,19 @@ it into an LTX-2.3-safe prompt before calling `sogni-agent`.
|
|
|
15
15
|
- Start with shot scale plus the scene's visual identity, then describe environment, time of day, atmosphere, textures, and specific light sources.
|
|
16
16
|
- Keep people, clothing, props, and locations concrete and stable across the whole paragraph.
|
|
17
17
|
- Give the scene one main action thread from start to finish. Use connectors like `as`, `while`, and `then` so motion reads as a continuous filmed moment.
|
|
18
|
-
-
|
|
18
|
+
- Be specific and literal about motion. Describe what moves, where it moves,
|
|
19
|
+
what it contacts, and what happens next in chronological order. Do not replace
|
|
20
|
+
visible actions with euphemisms or broad summaries. For example, replace "a
|
|
21
|
+
ball bouncing around" with "A red ball moves right, bounces off the wall,
|
|
22
|
+
and returns to the center"; replace "fluid pouring" with "Water flows from
|
|
23
|
+
the left container through the connecting tube into the right container
|
|
24
|
+
until both levels are equal."
|
|
25
|
+
- Treat native audio as part of the scene design. Integrate relevant dialogue,
|
|
26
|
+
voice delivery, foley, environmental sound, and music with the actions that
|
|
27
|
+
produce or accompany them.
|
|
28
|
+
- Write dialogue out verbatim in double quotes and identify the speaker and
|
|
29
|
+
delivery. Never merely suggest dialogue with phrases such as "they talk,"
|
|
30
|
+
"she says something," or "the couple discusses the scene."
|
|
19
31
|
- Budget spoken dialogue at about 3 words per second, plus about 1 second for each meaningful acting beat or pause.
|
|
20
32
|
- Express emotion through visible physical cues such as posture, grip, jaw tension, breathing, or pacing. Ambient sound can be woven into the prose naturally.
|
|
21
33
|
- Use positive phrasing only. Do not add negative prompts, "no ..." clauses, on-screen text/logo requests, vague filler words like `beautiful` or `nice`, or structural markup such as `[DIALOGUE]`.
|
package/scripts/sync-version.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Stamp the package.json version into every other manifest that carries it:
|
|
3
3
|
* version.mjs, SKILL.md frontmatter, .claude-plugin/plugin.json,
|
|
4
|
-
*
|
|
4
|
+
* .codex-plugin/plugin.json, openclaw.plugin.json,
|
|
5
|
+
* desktop-extension/manifest.json.
|
|
5
6
|
*
|
|
6
7
|
* package.json is the single source of truth. The docs-consistency test (and
|
|
7
8
|
* CI) fail when any of these drift, so run `npm run sync:version` after every
|
|
@@ -41,7 +42,12 @@ stamp('SKILL.md', (text) => {
|
|
|
41
42
|
return updated;
|
|
42
43
|
});
|
|
43
44
|
|
|
44
|
-
for (const manifest of [
|
|
45
|
+
for (const manifest of [
|
|
46
|
+
'.claude-plugin/plugin.json',
|
|
47
|
+
'.codex-plugin/plugin.json',
|
|
48
|
+
'openclaw.plugin.json',
|
|
49
|
+
'desktop-extension/manifest.json',
|
|
50
|
+
]) {
|
|
45
51
|
stamp(manifest, (text) => {
|
|
46
52
|
const parsed = JSON.parse(text);
|
|
47
53
|
if (parsed.version === version) return text;
|
package/sogni-agent.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import './node-version-check.mjs';
|
|
|
11
11
|
import JSON5 from 'json5';
|
|
12
12
|
import { createHash, randomBytes } from 'crypto';
|
|
13
13
|
import { createRequire } from 'module';
|
|
14
|
-
import { readFileSync, writeFileSync, existsSync, mkdirSync, mkdtempSync, statSync, readdirSync, realpathSync, lstatSync, unlinkSync, rmdirSync, rmSync } from 'fs';
|
|
14
|
+
import { readFileSync, writeFileSync, existsSync, mkdirSync, mkdtempSync, statSync, readdirSync, realpathSync, lstatSync, unlinkSync, rmdirSync, rmSync, renameSync } from 'fs';
|
|
15
15
|
import { join, dirname, basename, extname, sep, resolve } from 'path';
|
|
16
16
|
import { homedir, tmpdir } from 'os';
|
|
17
17
|
import sharp from 'sharp';
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
dimensionsForAspectRatio,
|
|
50
50
|
dimensionsWithShortSide,
|
|
51
51
|
dispatchPublicSkillToolCall,
|
|
52
|
-
getModelDefaults,
|
|
52
|
+
getModelDefaults as getSharedModelDefaults,
|
|
53
53
|
getVideoPromptGuardrailPlan,
|
|
54
54
|
inferVideoWorkflowFromAssets,
|
|
55
55
|
inferVideoWorkflowFromModel,
|
|
@@ -99,7 +99,6 @@ const SPARK_PACKS_PURCHASE_URL = 'https://docs.sogni.ai/pricing/#spark-packs';
|
|
|
99
99
|
const SPARK_PACKS_PURCHASE_HINT = `Buy Spark Packs to continue: ${SPARK_PACKS_PURCHASE_URL}`;
|
|
100
100
|
|
|
101
101
|
const UNLIMITED_PLAN_URL = 'https://docs.sogni.ai/pricing/unlimited-plan-details';
|
|
102
|
-
const SOGNI_MODEL_CATALOG_URL = 'https://www.sogni.ai/models';
|
|
103
102
|
const SOGNI_MODEL_CATALOG_MAX_BYTES = 5 * 1024 * 1024;
|
|
104
103
|
const SOGNI_MODEL_CATALOG_TIMEOUT_MS = 10000;
|
|
105
104
|
const KNOWN_MODEL_CATALOG_TAGS = new Set([
|
|
@@ -240,6 +239,7 @@ function sanitizePath(p, label) {
|
|
|
240
239
|
|
|
241
240
|
const DEFAULT_CREDENTIALS_PATH = join(homedir(), '.config', 'sogni', 'credentials');
|
|
242
241
|
const DEFAULT_LAST_RENDER_PATH = join(homedir(), '.config', 'sogni', 'last-render.json');
|
|
242
|
+
const DEFAULT_MODEL_CATALOG_CACHE_PATH = join(homedir(), '.config', 'sogni', 'model-catalog-cache.json');
|
|
243
243
|
const DEFAULT_OPENCLAW_CONFIG_PATH = join(homedir(), '.openclaw', 'openclaw.json');
|
|
244
244
|
// Current OpenClaw home, with a fallback to the legacy clawdbot-era directory
|
|
245
245
|
// for installs that predate the rename. Only used when neither
|
|
@@ -376,6 +376,169 @@ const MUSIC_MODEL_DEFAULTS = {
|
|
|
376
376
|
scheduler: { allowed: ['simple', 'linear_quadratic'], default: 'linear_quadratic' }
|
|
377
377
|
}
|
|
378
378
|
};
|
|
379
|
+
const DEFAULT_MODEL_CATALOG_URL = 'https://api.sogni.ai/v1/model-catalog';
|
|
380
|
+
const MODEL_CATALOG_CACHE_TTL_MS = 5 * 60 * 1000;
|
|
381
|
+
let liveModelDefaults = null;
|
|
382
|
+
|
|
383
|
+
function getModelDefaults(modelId, config) {
|
|
384
|
+
const sharedDefaults = getSharedModelDefaults(modelId, config);
|
|
385
|
+
const catalogDefaults = liveModelDefaults?.[modelId];
|
|
386
|
+
if (!catalogDefaults) return sharedDefaults;
|
|
387
|
+
const configuredDefaults = config?.modelDefaults?.[modelId];
|
|
388
|
+
// The live catalog supersedes bundled registry data. Explicit user config
|
|
389
|
+
// remains the final override.
|
|
390
|
+
return { ...(sharedDefaults || {}), ...catalogDefaults, ...(configuredDefaults || {}) };
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
function defaultsFromModelTier(card) {
|
|
394
|
+
const defaults = {};
|
|
395
|
+
if (Number.isFinite(card?.steps?.default)) defaults.steps = card.steps.default;
|
|
396
|
+
if (Number.isFinite(card?.guidance?.default)) defaults.guidance = card.guidance.default;
|
|
397
|
+
if (card?.comfySampler?.default) defaults.sampler = card.comfySampler.default;
|
|
398
|
+
if (card?.comfyScheduler?.default) defaults.scheduler = card.comfyScheduler.default;
|
|
399
|
+
if (Number.isFinite(card?.width?.default)) defaults.defaultWidth = card.width.default;
|
|
400
|
+
if (Number.isFinite(card?.height?.default)) defaults.defaultHeight = card.height.default;
|
|
401
|
+
if (Number.isFinite(card?.width?.min)) defaults.minDimension = card.width.min;
|
|
402
|
+
if (Number.isFinite(card?.width?.max)) defaults.maxDimension = card.width.max;
|
|
403
|
+
if (Number.isFinite(card?.width?.step)) defaults.dimensionMultiple = card.width.step;
|
|
404
|
+
return defaults;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
function validateModelTierSelections(modelId, card) {
|
|
408
|
+
const validateRange = (source, value, range) => {
|
|
409
|
+
if (value === null || value === undefined || !range) return;
|
|
410
|
+
if (
|
|
411
|
+
(Number.isFinite(range.min) && value < range.min) ||
|
|
412
|
+
(Number.isFinite(range.max) && value > range.max)
|
|
413
|
+
) {
|
|
414
|
+
const error = new Error(
|
|
415
|
+
`${source} ${value} is outside the live catalog range for "${modelId}" ` +
|
|
416
|
+
`(${range.min}–${range.max}).`
|
|
417
|
+
);
|
|
418
|
+
error.code = 'INVALID_MODEL_PARAMETER';
|
|
419
|
+
error.hint = `Use a value between ${range.min} and ${range.max}. Catalog: ${MODEL_CATALOG_URL}`;
|
|
420
|
+
throw error;
|
|
421
|
+
}
|
|
422
|
+
};
|
|
423
|
+
validateRange('--steps', options.steps, card.steps);
|
|
424
|
+
validateRange('--guidance', options.guidance, card.guidance);
|
|
425
|
+
const configuredDefaults = openclawConfig?.modelDefaults?.[modelId];
|
|
426
|
+
validateRange('Configured steps', configuredDefaults?.steps, card.steps);
|
|
427
|
+
validateRange('Configured guidance', configuredDefaults?.guidance, card.guidance);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
function persistModelCatalogCache(catalog, cachePath = MODEL_CATALOG_CACHE_PATH) {
|
|
431
|
+
const tempPath = `${cachePath}.${process.pid}.${randomBytes(4).toString('hex')}.tmp`;
|
|
432
|
+
try {
|
|
433
|
+
mkdirSync(dirname(cachePath), { recursive: true });
|
|
434
|
+
writeFileSync(tempPath, JSON.stringify(catalog), { mode: 0o600 });
|
|
435
|
+
renameSync(tempPath, cachePath);
|
|
436
|
+
} catch (error) {
|
|
437
|
+
if (!options.quiet) {
|
|
438
|
+
console.error(`Warning: could not persist model catalog cache (${error?.message || error}).`);
|
|
439
|
+
}
|
|
440
|
+
} finally {
|
|
441
|
+
try {
|
|
442
|
+
if (existsSync(tempPath)) unlinkSync(tempPath);
|
|
443
|
+
} catch {
|
|
444
|
+
// Cache cleanup is best-effort and must never block generation.
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
async function loadLiveModelDefaults(modelId) {
|
|
450
|
+
// Existing CLI tests mock the SDK rather than the public catalog API.
|
|
451
|
+
// A supplied JSON fixture opts a test into exercising this lookup.
|
|
452
|
+
const testFixture = getEnv('SOGNI_AGENT_TEST_MODEL_TIERS_JSON');
|
|
453
|
+
let cachedCatalog = null;
|
|
454
|
+
try {
|
|
455
|
+
if (existsSync(MODEL_CATALOG_CACHE_PATH)) {
|
|
456
|
+
const cached = JSON.parse(readFileSync(MODEL_CATALOG_CACHE_PATH, 'utf8'));
|
|
457
|
+
const cacheAge = Date.now() - cached?.fetchedAt;
|
|
458
|
+
if (
|
|
459
|
+
Number.isFinite(cached?.fetchedAt) &&
|
|
460
|
+
cacheAge >= 0 &&
|
|
461
|
+
cached?.modelId === modelId &&
|
|
462
|
+
cached?.descriptor?.parameters &&
|
|
463
|
+
typeof cached.descriptor.parameters === 'object'
|
|
464
|
+
) {
|
|
465
|
+
cachedCatalog = cached;
|
|
466
|
+
if (cacheAge < MODEL_CATALOG_CACHE_TTL_MS) {
|
|
467
|
+
const card = cached.descriptor.parameters;
|
|
468
|
+
validateModelTierSelections(modelId, card);
|
|
469
|
+
liveModelDefaults = { [modelId]: defaultsFromModelTier(card) };
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
} catch {
|
|
475
|
+
// A corrupt cache is treated as a miss and replaced by the live response.
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
if (
|
|
479
|
+
!testFixture &&
|
|
480
|
+
getEnv('SOGNI_AGENT_TEST_STATE_PATH') &&
|
|
481
|
+
!getEnv('SOGNI_MODEL_CATALOG_URL')
|
|
482
|
+
) return;
|
|
483
|
+
|
|
484
|
+
let catalog;
|
|
485
|
+
try {
|
|
486
|
+
if (testFixture) {
|
|
487
|
+
const fixture = JSON.parse(testFixture);
|
|
488
|
+
const descriptor = fixture?.data?.model || fixture?.model || (() => {
|
|
489
|
+
const model = fixture?.models?.find?.((entry) => entry?.id === modelId);
|
|
490
|
+
const tierId = model?.tier || modelId;
|
|
491
|
+
const parameters = fixture?.tiers?.[tierId] || (!fixture?.tiers ? fixture?.[tierId] : null);
|
|
492
|
+
return parameters ? { id: modelId, parameters } : null;
|
|
493
|
+
})();
|
|
494
|
+
catalog = { fetchedAt: Date.now(), modelId, etag: null, descriptor };
|
|
495
|
+
} else {
|
|
496
|
+
const url = `${MODEL_CATALOG_URL}/${encodeURIComponent(modelId)}`;
|
|
497
|
+
const headers = { accept: 'application/json' };
|
|
498
|
+
if (cachedCatalog?.etag) headers['if-none-match'] = cachedCatalog.etag;
|
|
499
|
+
const response = await fetch(url, {
|
|
500
|
+
headers,
|
|
501
|
+
signal: AbortSignal.timeout(10_000)
|
|
502
|
+
});
|
|
503
|
+
if (response.status === 304 && cachedCatalog) {
|
|
504
|
+
catalog = { ...cachedCatalog, fetchedAt: Date.now() };
|
|
505
|
+
} else {
|
|
506
|
+
if (response.status === 404) {
|
|
507
|
+
const error = new Error(`Model "${modelId}" is not present in the live Sogni model catalog.`);
|
|
508
|
+
error.code = 'MODEL_NOT_FOUND';
|
|
509
|
+
error.hint = `Choose a model currently listed by ${MODEL_CATALOG_URL}`;
|
|
510
|
+
throw error;
|
|
511
|
+
}
|
|
512
|
+
if (!response.ok) throw new Error(`${url} returned HTTP ${response.status}`);
|
|
513
|
+
const payload = await response.json();
|
|
514
|
+
catalog = {
|
|
515
|
+
fetchedAt: Date.now(),
|
|
516
|
+
modelId,
|
|
517
|
+
etag: response.headers.get('etag'),
|
|
518
|
+
descriptor: payload?.data?.model
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
persistModelCatalogCache(catalog);
|
|
523
|
+
} catch (cause) {
|
|
524
|
+
if (cause?.code === 'MODEL_NOT_FOUND') throw cause;
|
|
525
|
+
const error = new Error(`Could not load the live Sogni model catalog (${cause?.message || cause}).`);
|
|
526
|
+
error.code = 'MODEL_CATALOG_UNAVAILABLE';
|
|
527
|
+
error.hint = `Check Sogni platform status and retry. Catalog: ${MODEL_CATALOG_URL}`;
|
|
528
|
+
throw error;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
const card = catalog?.descriptor?.parameters;
|
|
532
|
+
if (!card || typeof card !== 'object') {
|
|
533
|
+
const error = new Error(`Model "${modelId}" is not present in the live Sogni model catalog.`);
|
|
534
|
+
error.code = 'MODEL_NOT_FOUND';
|
|
535
|
+
error.hint = `Choose a model currently listed by ${MODEL_CATALOG_URL}`;
|
|
536
|
+
throw error;
|
|
537
|
+
}
|
|
538
|
+
validateModelTierSelections(modelId, card);
|
|
539
|
+
liveModelDefaults = { [modelId]: defaultsFromModelTier(card) };
|
|
540
|
+
}
|
|
541
|
+
|
|
379
542
|
const MUSIC_DURATION_LIMITS = { min: 10, max: 600, default: 30 };
|
|
380
543
|
const MUSIC_BPM_LIMITS = { min: 30, max: 300, default: 120 };
|
|
381
544
|
const MUSIC_PROMPT_STRENGTH_LIMITS = { min: 0, max: 10 };
|
|
@@ -1611,6 +1774,19 @@ const OUTPAINT_POSITION_SET = new Set(OUTPAINT_POSITIONS);
|
|
|
1611
1774
|
const LTX_TRANSITION_LORA_ID = 'transition';
|
|
1612
1775
|
const LTX_TRANSITION_TRIGGER = 'zhuanchang';
|
|
1613
1776
|
const LTX_TRANSITION_DEFAULT_STRENGTH = 1.0;
|
|
1777
|
+
const LTX23_10EROS_MODEL_ID = 'ltx23-22b-10eros-v1.4-fp8mixed_i2v';
|
|
1778
|
+
const DR34ML4Y_LORA_ID = 'dr34ml4y-v3';
|
|
1779
|
+
const DR34ML4Y_DEFAULT_STRENGTH = 1.0;
|
|
1780
|
+
const DR34ML4Y_SUPPORTED_MODEL_IDS = new Set([
|
|
1781
|
+
'ltx23-22b-fp8_i2v',
|
|
1782
|
+
'ltx23-22b-fp8_i2v_dev',
|
|
1783
|
+
LTX23_10EROS_MODEL_ID
|
|
1784
|
+
]);
|
|
1785
|
+
|
|
1786
|
+
function resolveSkillVideoModelAlias(modelId) {
|
|
1787
|
+
const normalized = String(modelId || '').trim().toLowerCase();
|
|
1788
|
+
return normalized === '10eros' ? LTX23_10EROS_MODEL_ID : modelId;
|
|
1789
|
+
}
|
|
1614
1790
|
|
|
1615
1791
|
function normalizeMultiAngleValue(value, aliases, allowedKeys, label) {
|
|
1616
1792
|
if (!value) return null;
|
|
@@ -1661,7 +1837,12 @@ function isLtx23V2VModelId(modelId) {
|
|
|
1661
1837
|
}
|
|
1662
1838
|
|
|
1663
1839
|
function isLtxI2vTransitionModelId(modelId) {
|
|
1664
|
-
return
|
|
1840
|
+
return (
|
|
1841
|
+
!!modelId &&
|
|
1842
|
+
modelId !== LTX23_10EROS_MODEL_ID &&
|
|
1843
|
+
modelId.includes('ltx') &&
|
|
1844
|
+
/_i2v(_|$)/.test(modelId)
|
|
1845
|
+
);
|
|
1665
1846
|
}
|
|
1666
1847
|
|
|
1667
1848
|
function applyLtxTransitionLora(projectConfig, modelId, hasStartFrame, hasEndFrame) {
|
|
@@ -1785,6 +1966,13 @@ const LAST_RENDER_PATH = resolveConfiguredPath(
|
|
|
1785
1966
|
DEFAULT_LAST_RENDER_PATH,
|
|
1786
1967
|
'SOGNI last render path'
|
|
1787
1968
|
);
|
|
1969
|
+
const MODEL_CATALOG_CACHE_PATH = resolveConfiguredPath(
|
|
1970
|
+
getEnv('SOGNI_MODEL_CATALOG_CACHE_PATH'),
|
|
1971
|
+
DEFAULT_MODEL_CATALOG_CACHE_PATH,
|
|
1972
|
+
'Sogni model catalog cache path'
|
|
1973
|
+
);
|
|
1974
|
+
const MODEL_CATALOG_LIST_CACHE_PATH = `${MODEL_CATALOG_CACHE_PATH}.models`;
|
|
1975
|
+
const MODEL_CATALOG_URL = (getEnv('SOGNI_MODEL_CATALOG_URL') || DEFAULT_MODEL_CATALOG_URL).replace(/\/+$/, '');
|
|
1788
1976
|
const MEDIA_INBOUND_DIR = resolveConfiguredPath(
|
|
1789
1977
|
getEnv('SOGNI_MEDIA_INBOUND_DIR') || openclawConfig?.mediaInboundDir,
|
|
1790
1978
|
DEFAULT_MEDIA_INBOUND_DIR,
|
|
@@ -3179,6 +3367,7 @@ Recommended LTX 2.3 Video Models:
|
|
|
3179
3367
|
ltx23-22b-fp8_ia2v_distilled Image+audio-to-video
|
|
3180
3368
|
ltx23-22b-fp8_a2v_distilled Audio-to-video
|
|
3181
3369
|
ltx23-22b-fp8_v2v_distilled Video-to-video with ControlNet
|
|
3370
|
+
ltx23-22b-10eros-v1.4-fp8mixed_i2v Private mature-theme I2V; first and/or last frame; requires --no-filter
|
|
3182
3371
|
|
|
3183
3372
|
Music Models:
|
|
3184
3373
|
ace_step_1.5_xl_turbo Default direct music generation
|
|
@@ -3602,6 +3791,16 @@ if (options.outputFormat) {
|
|
|
3602
3791
|
}
|
|
3603
3792
|
}
|
|
3604
3793
|
|
|
3794
|
+
if (options.video) {
|
|
3795
|
+
options.model = resolveSkillVideoModelAlias(options.model);
|
|
3796
|
+
if (options.model === LTX23_10EROS_MODEL_ID && !options.noFilter) {
|
|
3797
|
+
fatalCliError(
|
|
3798
|
+
`LTX-2.3 10Eros is an opt-in mature-theme model and requires --no-filter.`,
|
|
3799
|
+
{ code: 'INVALID_ARGUMENT' }
|
|
3800
|
+
);
|
|
3801
|
+
}
|
|
3802
|
+
}
|
|
3803
|
+
|
|
3605
3804
|
if (options.loraStrengths.length > 0 && options.loras.length === 0) {
|
|
3606
3805
|
fatalCliError('--lora-strength requires at least one --lora.', { code: 'INVALID_ARGUMENT' });
|
|
3607
3806
|
}
|
|
@@ -3614,8 +3813,36 @@ if (options.loraStrengths.length > 0 && options.loras.length > 0 &&
|
|
|
3614
3813
|
});
|
|
3615
3814
|
}
|
|
3616
3815
|
|
|
3617
|
-
if (
|
|
3618
|
-
fatalCliError('--lora options are
|
|
3816
|
+
if (options.music && options.loras.length > 0) {
|
|
3817
|
+
fatalCliError('--lora options are not supported for music.', { code: 'INVALID_ARGUMENT' });
|
|
3818
|
+
}
|
|
3819
|
+
|
|
3820
|
+
if (options.video && options.loras.length > 0) {
|
|
3821
|
+
const unsupportedVideoLoras = options.loras.filter(loraId => loraId !== DR34ML4Y_LORA_ID);
|
|
3822
|
+
if (unsupportedVideoLoras.length > 0) {
|
|
3823
|
+
fatalCliError(
|
|
3824
|
+
`Video LoRA "${unsupportedVideoLoras[0]}" is not supported. ` +
|
|
3825
|
+
`The supported video LoRA is "${DR34ML4Y_LORA_ID}".`,
|
|
3826
|
+
{ code: 'INVALID_ARGUMENT' }
|
|
3827
|
+
);
|
|
3828
|
+
}
|
|
3829
|
+
if (!DR34ML4Y_SUPPORTED_MODEL_IDS.has(options.model)) {
|
|
3830
|
+
fatalCliError(
|
|
3831
|
+
`"${DR34ML4Y_LORA_ID}" requires a supported LTX-2.3 I2V model: ` +
|
|
3832
|
+
'ltx23-22b-fp8_i2v, ltx23-22b-fp8_i2v_dev, or 10eros. ' +
|
|
3833
|
+
'The separately trained WAN DR34ML4Y artifact is not installed on Sogni.',
|
|
3834
|
+
{ code: 'INVALID_ARGUMENT' }
|
|
3835
|
+
);
|
|
3836
|
+
}
|
|
3837
|
+
if (!options.noFilter) {
|
|
3838
|
+
fatalCliError(
|
|
3839
|
+
`"${DR34ML4Y_LORA_ID}" is an opt-in mature-theme LoRA and requires --no-filter.`,
|
|
3840
|
+
{ code: 'INVALID_ARGUMENT' }
|
|
3841
|
+
);
|
|
3842
|
+
}
|
|
3843
|
+
if (options.loraStrengths.length === 0) {
|
|
3844
|
+
options.loraStrengths = options.loras.map(() => DR34ML4Y_DEFAULT_STRENGTH);
|
|
3845
|
+
}
|
|
3619
3846
|
}
|
|
3620
3847
|
|
|
3621
3848
|
if (options.video && (options.sampler || options.scheduler)) {
|
|
@@ -5960,119 +6187,94 @@ function normalizeLiveModelTag(value) {
|
|
|
5960
6187
|
.replace(/[\s_]+/g, '-');
|
|
5961
6188
|
}
|
|
5962
6189
|
|
|
5963
|
-
function
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
attributes[attributeMatch[1].toLowerCase()] = decodeModelCatalogAttribute(attributeMatch[2]);
|
|
5984
|
-
}
|
|
5985
|
-
const classes = (attributes.class || '').split(/\s+/);
|
|
5986
|
-
if (!classes.includes('mcard')) continue;
|
|
5987
|
-
|
|
5988
|
-
const textTokens = (attributes['data-text'] || '')
|
|
5989
|
-
.toLocaleLowerCase()
|
|
5990
|
-
.split(/\s+/)
|
|
5991
|
-
.filter(Boolean);
|
|
5992
|
-
const capabilities = (attributes['data-caps'] || '')
|
|
5993
|
-
.toLocaleLowerCase()
|
|
5994
|
-
.split(/\s+/)
|
|
5995
|
-
.filter(Boolean);
|
|
5996
|
-
const tags = new Set();
|
|
5997
|
-
if (attributes['data-uncensored'] === '1' || capabilities.includes('uncensored')) {
|
|
5998
|
-
tags.add('uncensored');
|
|
5999
|
-
}
|
|
6000
|
-
if (attributes['data-community'] === '1') tags.add('community');
|
|
6001
|
-
const tier = normalizeLiveModelTag(attributes['data-tier']);
|
|
6002
|
-
if (tier) tags.add(tier);
|
|
6003
|
-
for (const tag of KNOWN_MODEL_CATALOG_TAGS) {
|
|
6004
|
-
if (textTokens.includes(tag)) tags.add(tag);
|
|
6005
|
-
}
|
|
6006
|
-
entries.push({
|
|
6007
|
-
modelIds: new Set(textTokens),
|
|
6008
|
-
tags: [...tags].sort()
|
|
6009
|
-
});
|
|
6010
|
-
}
|
|
6011
|
-
return entries;
|
|
6012
|
-
}
|
|
6013
|
-
|
|
6014
|
-
async function fetchModelCatalogEntries() {
|
|
6015
|
-
if (getEnv('SOGNI_AGENT_TEST_STATE_PATH')) {
|
|
6016
|
-
return modelCatalogEntriesFromHtml(getEnv('SOGNI_AGENT_TEST_MODEL_CATALOG_HTML') || '');
|
|
6190
|
+
async function fetchLiveModelCatalog(network, media) {
|
|
6191
|
+
const fixtureJson = getEnv('SOGNI_AGENT_TEST_MODEL_CATALOG_JSON');
|
|
6192
|
+
let cachedCatalog = null;
|
|
6193
|
+
try {
|
|
6194
|
+
if (existsSync(MODEL_CATALOG_LIST_CACHE_PATH)) {
|
|
6195
|
+
const cached = JSON.parse(readFileSync(MODEL_CATALOG_LIST_CACHE_PATH, 'utf8'));
|
|
6196
|
+
const cacheAge = Date.now() - cached?.fetchedAt;
|
|
6197
|
+
if (
|
|
6198
|
+
Number.isFinite(cached?.fetchedAt) &&
|
|
6199
|
+
cacheAge >= 0 &&
|
|
6200
|
+
cached?.network === network &&
|
|
6201
|
+
cached?.media === media &&
|
|
6202
|
+
Array.isArray(cached?.models)
|
|
6203
|
+
) {
|
|
6204
|
+
cachedCatalog = cached;
|
|
6205
|
+
if (cacheAge < MODEL_CATALOG_CACHE_TTL_MS) return cached;
|
|
6206
|
+
}
|
|
6207
|
+
}
|
|
6208
|
+
} catch {
|
|
6209
|
+
// A corrupt cache is treated as a miss and replaced by the live response.
|
|
6017
6210
|
}
|
|
6018
6211
|
|
|
6019
|
-
const controller = new AbortController();
|
|
6020
|
-
const timeoutId = setTimeout(() => controller.abort(), SOGNI_MODEL_CATALOG_TIMEOUT_MS);
|
|
6021
6212
|
try {
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
}
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6213
|
+
let catalog;
|
|
6214
|
+
if (fixtureJson) {
|
|
6215
|
+
const payload = JSON.parse(fixtureJson);
|
|
6216
|
+
const data = payload?.data || payload;
|
|
6217
|
+
catalog = {
|
|
6218
|
+
fetchedAt: Date.now(),
|
|
6219
|
+
network,
|
|
6220
|
+
media,
|
|
6221
|
+
etag: null,
|
|
6222
|
+
catalogVersion: data?.catalogVersion || null,
|
|
6223
|
+
models: data?.models
|
|
6224
|
+
};
|
|
6225
|
+
} else {
|
|
6226
|
+
const url = new URL(MODEL_CATALOG_URL);
|
|
6227
|
+
url.searchParams.set('network', network);
|
|
6228
|
+
if (media !== 'all') url.searchParams.set('mediaType', media);
|
|
6229
|
+
const headers = { accept: 'application/json' };
|
|
6230
|
+
if (cachedCatalog?.etag) headers['if-none-match'] = cachedCatalog.etag;
|
|
6231
|
+
const response = await fetch(url, {
|
|
6232
|
+
headers,
|
|
6233
|
+
signal: AbortSignal.timeout(SOGNI_MODEL_CATALOG_TIMEOUT_MS)
|
|
6234
|
+
});
|
|
6235
|
+
if (response.status === 304 && cachedCatalog) {
|
|
6236
|
+
catalog = { ...cachedCatalog, fetchedAt: Date.now() };
|
|
6237
|
+
} else {
|
|
6238
|
+
if (!response.ok) throw new Error(`${url} returned HTTP ${response.status}`);
|
|
6239
|
+
const contentLength = Number(response.headers.get('content-length'));
|
|
6240
|
+
if (Number.isFinite(contentLength) && contentLength > SOGNI_MODEL_CATALOG_MAX_BYTES) {
|
|
6241
|
+
const error = new Error('Sogni model catalog response is unexpectedly large.');
|
|
6242
|
+
error.code = 'MODEL_CATALOG_INVALID';
|
|
6243
|
+
throw error;
|
|
6244
|
+
}
|
|
6245
|
+
const text = await response.text();
|
|
6246
|
+
if (Buffer.byteLength(text, 'utf8') > SOGNI_MODEL_CATALOG_MAX_BYTES) {
|
|
6247
|
+
const error = new Error('Sogni model catalog response is unexpectedly large.');
|
|
6248
|
+
error.code = 'MODEL_CATALOG_INVALID';
|
|
6249
|
+
throw error;
|
|
6250
|
+
}
|
|
6251
|
+
const payload = JSON.parse(text);
|
|
6252
|
+
catalog = {
|
|
6253
|
+
fetchedAt: Date.now(),
|
|
6254
|
+
network,
|
|
6255
|
+
media,
|
|
6256
|
+
etag: response.headers.get('etag'),
|
|
6257
|
+
catalogVersion: payload?.data?.catalogVersion || null,
|
|
6258
|
+
models: payload?.data?.models
|
|
6259
|
+
};
|
|
6260
|
+
}
|
|
6046
6261
|
}
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
throw err;
|
|
6262
|
+
if (!Array.isArray(catalog?.models)) {
|
|
6263
|
+
const error = new Error('Sogni model catalog response contained no model list.');
|
|
6264
|
+
error.code = 'MODEL_CATALOG_INVALID';
|
|
6265
|
+
throw error;
|
|
6052
6266
|
}
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6267
|
+
persistModelCatalogCache(catalog, MODEL_CATALOG_LIST_CACHE_PATH);
|
|
6268
|
+
return catalog;
|
|
6269
|
+
} catch (cause) {
|
|
6270
|
+
const error = new Error(`Could not load the live Sogni model catalog (${cause?.message || cause}).`);
|
|
6271
|
+
error.code = cause?.code || 'MODEL_CATALOG_UNAVAILABLE';
|
|
6272
|
+
error.hint = `Check Sogni platform status and retry. Catalog: ${MODEL_CATALOG_URL}`;
|
|
6273
|
+
throw error;
|
|
6056
6274
|
}
|
|
6057
6275
|
}
|
|
6058
6276
|
|
|
6059
|
-
function enrichLiveModelsWithCatalogTags(models, catalogEntries) {
|
|
6060
|
-
return models.map((model) => {
|
|
6061
|
-
const modelId = String(model.id || '').toLocaleLowerCase();
|
|
6062
|
-
const entry = catalogEntries.find((candidate) => candidate.modelIds.has(modelId));
|
|
6063
|
-
return {
|
|
6064
|
-
...model,
|
|
6065
|
-
tags: entry?.tags || []
|
|
6066
|
-
};
|
|
6067
|
-
});
|
|
6068
|
-
}
|
|
6069
|
-
|
|
6070
6277
|
async function runLiveModels() {
|
|
6071
|
-
const creds = loadCredentials();
|
|
6072
|
-
const apiKey = requireApiKeyCredentials(
|
|
6073
|
-
creds,
|
|
6074
|
-
options.liveModelAction === 'search' ? '--search-models' : '--list-models'
|
|
6075
|
-
);
|
|
6076
6278
|
const network = options.liveModelNetwork || openclawConfig?.defaultNetwork || 'fast';
|
|
6077
6279
|
const media = options.liveModelMedia || 'all';
|
|
6078
6280
|
const query = options.liveModelQuery?.trim() || null;
|
|
@@ -6083,95 +6285,77 @@ async function runLiveModels() {
|
|
|
6083
6285
|
err.code = 'INVALID_ARGUMENT';
|
|
6084
6286
|
throw err;
|
|
6085
6287
|
}
|
|
6086
|
-
const
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
models = models.filter((model) =>
|
|
6125
|
-
tagFilters.every((tag) => model.tags.includes(tag))
|
|
6126
|
-
);
|
|
6127
|
-
}
|
|
6128
|
-
if (normalizedQuery) {
|
|
6129
|
-
models = models.filter((model) =>
|
|
6130
|
-
normalizeLiveModelSearch(`${model.id} ${model.name} ${model.tags.join(' ')}`).includes(normalizedQuery)
|
|
6131
|
-
);
|
|
6132
|
-
}
|
|
6288
|
+
const catalog = await fetchLiveModelCatalog(network, media);
|
|
6289
|
+
let models = catalog.models.map((model) => ({
|
|
6290
|
+
id: model.id,
|
|
6291
|
+
name: model.name || model.id,
|
|
6292
|
+
workerCount: Number(model.workerCounts?.[network] || 0),
|
|
6293
|
+
media: model.mediaType,
|
|
6294
|
+
networks: Array.isArray(model.availableNetworks) ? model.availableNetworks : [],
|
|
6295
|
+
workerCounts: model.workerCounts || {},
|
|
6296
|
+
tierId: model.tierId || null,
|
|
6297
|
+
tags: Array.isArray(model.tags)
|
|
6298
|
+
? [...new Set(model.tags.map(normalizeLiveModelTag).filter(Boolean))].sort()
|
|
6299
|
+
: []
|
|
6300
|
+
})).filter(model =>
|
|
6301
|
+
['image', 'video', 'audio'].includes(model.media) &&
|
|
6302
|
+
model.networks.includes(network) &&
|
|
6303
|
+
(media === 'all' || model.media === media)
|
|
6304
|
+
);
|
|
6305
|
+
const catalogTagsAvailable = catalog.models.every(model => Array.isArray(model.tags));
|
|
6306
|
+
const queryAsTag = normalizeLiveModelTag(query);
|
|
6307
|
+
if ((tagFilters.length > 0 || KNOWN_MODEL_CATALOG_TAGS.has(queryAsTag)) && !catalogTagsAvailable) {
|
|
6308
|
+
const error = new Error('Sogni model catalog response does not include catalog tags.');
|
|
6309
|
+
error.code = 'MODEL_CATALOG_INVALID';
|
|
6310
|
+
error.hint = `Tag filtering requires catalog tags from ${MODEL_CATALOG_URL}`;
|
|
6311
|
+
throw error;
|
|
6312
|
+
}
|
|
6313
|
+
models.sort((left, right) =>
|
|
6314
|
+
right.workerCount - left.workerCount ||
|
|
6315
|
+
left.name.localeCompare(right.name) ||
|
|
6316
|
+
left.id.localeCompare(right.id)
|
|
6317
|
+
);
|
|
6318
|
+
if (tagFilters.length > 0) {
|
|
6319
|
+
models = models.filter((model) => tagFilters.every((tag) => model.tags.includes(tag)));
|
|
6320
|
+
}
|
|
6321
|
+
if (normalizedQuery) {
|
|
6322
|
+
models = models.filter((model) =>
|
|
6323
|
+
normalizeLiveModelSearch(`${model.id} ${model.name} ${model.tags.join(' ')}`).includes(normalizedQuery)
|
|
6324
|
+
);
|
|
6325
|
+
}
|
|
6133
6326
|
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6327
|
+
const result = {
|
|
6328
|
+
success: true,
|
|
6329
|
+
type: 'live-models',
|
|
6330
|
+
network,
|
|
6331
|
+
media,
|
|
6332
|
+
query,
|
|
6333
|
+
tagFilters,
|
|
6334
|
+
catalogTagsAvailable,
|
|
6335
|
+
catalogVersion: catalog.catalogVersion,
|
|
6336
|
+
count: models.length,
|
|
6337
|
+
models,
|
|
6338
|
+
timestamp: new Date().toISOString()
|
|
6339
|
+
};
|
|
6340
|
+
if (options.json || JSON_ERROR_MODE) {
|
|
6341
|
+
console.log(JSON.stringify(result));
|
|
6342
|
+
return;
|
|
6343
|
+
}
|
|
6150
6344
|
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
}
|
|
6166
|
-
} finally {
|
|
6167
|
-
try {
|
|
6168
|
-
if (modelClient.isConnected()) {
|
|
6169
|
-
await Promise.race([
|
|
6170
|
-
modelClient.disconnect(),
|
|
6171
|
-
new Promise(resolve => setTimeout(resolve, 1000))
|
|
6172
|
-
]);
|
|
6173
|
-
}
|
|
6174
|
-
} catch {}
|
|
6345
|
+
const scope = [
|
|
6346
|
+
media === 'all' ? 'all media' : media,
|
|
6347
|
+
`network=${network}`,
|
|
6348
|
+
query ? `query=${JSON.stringify(query)}` : null,
|
|
6349
|
+
tagFilters.length ? `tags=${tagFilters.join('+')}` : null
|
|
6350
|
+
].filter(Boolean).join(', ');
|
|
6351
|
+
console.log(`Live Sogni models (${models.length}; ${scope})`);
|
|
6352
|
+
if (models.length === 0) {
|
|
6353
|
+
console.log('No matching models found.');
|
|
6354
|
+
return;
|
|
6355
|
+
}
|
|
6356
|
+
console.log('MEDIA\tWORKERS\tMODEL ID\tTAGS\tNAME');
|
|
6357
|
+
for (const model of models) {
|
|
6358
|
+
console.log(`${model.media}\t${model.workerCount}\t${model.id}\t${model.tags.join(',') || '-'}\t${model.name}`);
|
|
6175
6359
|
}
|
|
6176
6360
|
}
|
|
6177
6361
|
|
|
@@ -9670,6 +9854,7 @@ async function main() {
|
|
|
9670
9854
|
return;
|
|
9671
9855
|
}
|
|
9672
9856
|
|
|
9857
|
+
await loadLiveModelDefaults(options.model);
|
|
9673
9858
|
await ensureSufficientVideoBalance(client, log);
|
|
9674
9859
|
|
|
9675
9860
|
if (options.estimateVideoCost) {
|
|
@@ -10154,6 +10339,10 @@ async function main() {
|
|
|
10154
10339
|
if (options.lastFrameStrength != null) {
|
|
10155
10340
|
projectConfig.lastFrameStrength = options.lastFrameStrength;
|
|
10156
10341
|
}
|
|
10342
|
+
if (options.loras.length > 0) {
|
|
10343
|
+
projectConfig.loras = options.loras;
|
|
10344
|
+
projectConfig.loraStrengths = options.loraStrengths;
|
|
10345
|
+
}
|
|
10157
10346
|
|
|
10158
10347
|
const videoResult = await client.createVideoProject(withBillingMode(projectConfig));
|
|
10159
10348
|
|
package/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PACKAGE_VERSION = '3.
|
|
1
|
+
export const PACKAGE_VERSION = '3.17.0';
|