@sogni-ai/sogni-creative-agent-skill 3.54.1 → 3.54.2
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 +1 -1
- package/.agents/skills/sogni-creative-agent-skill/references/models.md +10 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +8 -0
- package/README.md +2 -2
- package/SKILL.md +3 -3
- package/desktop-extension/manifest.json +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +2 -2
- package/references/models.md +10 -1
- package/skill-package.json +1 -1
- package/sogni-agent.mjs +131 -6
- package/version.mjs +1 -1
|
@@ -3,7 +3,7 @@ name: sogni-creative-agent-skill
|
|
|
3
3
|
description: "Generate and edit images, create Pixal3D 3D models, remove backgrounds with BiRefNet, synthesize Qwen3-TTS speech, 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.54.
|
|
6
|
+
version: "3.54.2"
|
|
7
7
|
author: Sogni AI
|
|
8
8
|
hermes:
|
|
9
9
|
category: creative
|
|
@@ -702,6 +702,14 @@ so a prompt is not rewritten twice.
|
|
|
702
702
|
- **No edit/extend task:** video references are loose conditioning for a new
|
|
703
703
|
generation. Alibaba exposes no edit/extend task mode or task-type field; use
|
|
704
704
|
a dedicated video-to-video model when source-preserving editing is required.
|
|
705
|
+
- **Size:** `--target-resolution 480`, `720` (the default), or `1080` picks the
|
|
706
|
+
tier, and the CLI sends Alibaba's exact size for that tier and
|
|
707
|
+
`--wan3-ratio` (16:9 when adaptive): at 1080 that is 1920x1080, 1440x1080,
|
|
708
|
+
1080x1080, 1080x1440, or 1080x1920. Image-to-video keeps the first frame's
|
|
709
|
+
shape with its short side at the tier (an 832x1216 frame at 1080 becomes
|
|
710
|
+
1080x1578); a fixed `--wan3-ratio` does not crop the frame. Explicit
|
|
711
|
+
`-w`/`-h` are sent as given, 480-1920 per side. The network prices the tier
|
|
712
|
+
from the canvas, so 1080P costs twice the 720P rate per second.
|
|
705
713
|
- **Cost (as of 2026-08):** platform artist pricing is $0.065/s at 480P,
|
|
706
714
|
$0.13/s at 720P, and $0.26/s at 1080P; native audio does not change the rate.
|
|
707
715
|
|
|
@@ -717,7 +725,8 @@ the Sogni model `wan3.0-spicy-video`; MuleRouter's provider ID is
|
|
|
717
725
|
`w3.0-video`. Public surfaces call it **Wan 3.0 Enhanced**. It renders fixed or
|
|
718
726
|
smart 2–30 second clips at 30 fps with native audio and 480P, 720P, or 1080P
|
|
719
727
|
output. Supported ratios are `adaptive`, `16:9`, `9:16`, `1:1`, `4:3`, and
|
|
720
|
-
`3:4`.
|
|
728
|
+
`3:4`. Sizes follow the Wan 3 rules above: 720P unless `--target-resolution`
|
|
729
|
+
says otherwise.
|
|
721
730
|
|
|
722
731
|
- Use t2v for prompt-only video, i2v for first/optional last frame, r2v for
|
|
723
732
|
loose media references, and a2v/ia2v when audio drives the result.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sogni-creative-agent",
|
|
3
|
-
"version": "3.54.
|
|
3
|
+
"version": "3.54.2",
|
|
4
4
|
"description": "Sogni Creative Agent: image, 3D, speech, 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,11 @@
|
|
|
1
|
+
## [3.54.2] - 2026-09-27
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* Wan 3 and Wan 3.0 Enhanced can render 1080p from the CLI. Every Wan 3 size was cut to a 1536 px long side, so `--target-resolution 1080` (1920x1080) went out as 1536x864, which Sogni prices and renders as 720p. `-w 1080 -h 1920` did the same. Billing matched the 720p that was delivered, but there was no way to get 1080p. The CLI now sends Alibaba's exact size for the tier and ratio. At 1080 that is 1920x1080, 1440x1080, 1080x1080, 1080x1440 or 1080x1920; the ratio comes from `--wan3-ratio`, a ratio named in the prompt, or 16:9. Image-to-video keeps the first frame's shape with its short side at the tier (an 832x1216 frame at 1080 renders at 1080x1578), including a first frame given as a URL. A fixed `--wan3-ratio` that does not match the frame prints a notice instead of cropping it. Explicit `-w`/`-h` are sent as given, up to 1920 per side.
|
|
6
|
+
* The Wan 3 default stays 720p, the size and price CLI renders already had. 1080p is `--target-resolution 1080` and costs twice as much per second (52 instead of 26 Spark per second on Wan 3, 64 instead of 32 on Enhanced, before subscription discounts). `--estimate-video-cost` quotes the size that will be sent.
|
|
7
|
+
* Update the intelligence client to 4.6.2, which lets Wan 3 keep sizes up to 1920 instead of clamping them to 1536.
|
|
8
|
+
|
|
1
9
|
## [3.54.1] - 2026-09-27
|
|
2
10
|
|
|
3
11
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -472,7 +472,7 @@ sogni-agent --video -m seedance2 --workflow t2v \
|
|
|
472
472
|
--ref-audio https://cdn.example.com/music.m4a \
|
|
473
473
|
"Use @Image1 for product identity, @Video1 for camera movement, and @Audio1 for music rhythm"
|
|
474
474
|
|
|
475
|
-
# Alibaba Wan 3 unified video (2-30s, fixed 30fps, native audio, 480P/720P/1080P)
|
|
475
|
+
# Alibaba Wan 3 unified video (2-30s, fixed 30fps, native audio, 480P/720P/1080P; 720P by default)
|
|
476
476
|
sogni-agent --video -m wan3 --target-resolution 1080 --duration 8 \
|
|
477
477
|
'A presenter walks through a detailed studio and says "Welcome."'
|
|
478
478
|
sogni-agent --video -m wan3 --ref first.png --ref-end last.png \
|
|
@@ -779,7 +779,7 @@ sogni-agent --video -m seedance2-5-v2v --seedance-task-type extend --ref-video s
|
|
|
779
779
|
## Video Sizing & Aspect Ratios
|
|
780
780
|
|
|
781
781
|
- **WAN 2.2 models** use dimensions divisible by 16, each side 480–1536 px, and at most 1,048,576 pixels per frame (1024×1024), so 1280×720, 720×1280, and 1024×1024 fit but 1536×864 and 1080p do not (as of 2026-09). The CLI refuses an explicit `-w`/`-h` or `--target-resolution` above that instead of sending it; sizes it chooses itself are fitted. (Since 2026-09-26 the network itself scales an oversized WAN 2.2 request down to about 1 MP and refuses only a side below 480, error 4101.)
|
|
782
|
-
- **Wan 3** (`wan3.0-video`) is a Premium Spark Alibaba model with fixed 30 fps, fixed or smart 2–30 s output, native audio, 480P/720P/1080P tiers, and `adaptive`, `16:9`, `4:3`, `1:1`, `3:4`, or `9:16` output. It accepts one first frame plus an optional last frame, or loose references up to 10 images, 5 videos, and 5 audio clips. It can also use one public document (PDF/Office/text/Markdown/Keynote/Pages/Numbers, up to 100 MB; PDF/DOCX/DOC/PPTX/PPT/Keynote/Pages up to 50 pages) or one public webpage; file and link context are mutually exclusive and cannot be combined with first/last anchors. Each video/audio reference is 1–15 s and each modality's clips total at most 15 s. Video references condition a new generation; Alibaba exposes no edit/extend task mode or task-type field, so use a dedicated video-to-video model when source-preserving editing is required. Provider prompt expansion defaults on; `--no-expand-prompt` preserves the exact prompt. Watermark defaults off. Send no negative prompt, steps, guidance, sampler, scheduler, ControlNet, or mask. Sogni retail rates before subscription discounts are $0.065/$0.13/$0.26 per output second at 480p/720p/1080p (as of 2026-08).
|
|
782
|
+
- **Wan 3** (`wan3.0-video`) is a Premium Spark Alibaba model with fixed 30 fps, fixed or smart 2–30 s output, native audio, 480P/720P/1080P tiers, and `adaptive`, `16:9`, `4:3`, `1:1`, `3:4`, or `9:16` output. It accepts one first frame plus an optional last frame, or loose references up to 10 images, 5 videos, and 5 audio clips. It can also use one public document (PDF/Office/text/Markdown/Keynote/Pages/Numbers, up to 100 MB; PDF/DOCX/DOC/PPTX/PPT/Keynote/Pages up to 50 pages) or one public webpage; file and link context are mutually exclusive and cannot be combined with first/last anchors. Each video/audio reference is 1–15 s and each modality's clips total at most 15 s. Video references condition a new generation; Alibaba exposes no edit/extend task mode or task-type field, so use a dedicated video-to-video model when source-preserving editing is required. Provider prompt expansion defaults on; `--no-expand-prompt` preserves the exact prompt. Watermark defaults off. Send no negative prompt, steps, guidance, sampler, scheduler, ControlNet, or mask. Sogni retail rates before subscription discounts are $0.065/$0.13/$0.26 per output second at 480p/720p/1080p (as of 2026-08). The CLI renders 720P unless `--target-resolution 480` or `1080` is given, sending Alibaba's exact size for that tier and ratio; image-to-video keeps the first frame's shape with its short side at the tier.
|
|
783
783
|
- **Wan 3.0 Enhanced** (`wan3.0-spicy-video`; MuleRouter provider ID `w3.0-video`; aliases `wan3-enhanced`, `wan3-spicy`) runs at fixed 30 fps with fixed or smart 2–30 s output, native audio, prompt expansion, 480P/720P/1080P, and `adaptive`, `16:9`, `9:16`, `1:1`, `4:3`, or `3:4`. It accepts either first/last-frame anchors or up to 10 image, 5 video, and 5 audio loose references; the two modes cannot be mixed. It has no document/web context, watermark, negative prompt, source-video edit, or extend mode. Standard PAYG is $0.08/$0.16/$0.32 per output second at 480P/720P/1080P (as of 2026-09). Existing paid subscribers receive a one-time $10 Unlimited / $20 Unlimited Pro model credit through September 1, 2026 00:00 UTC (August 31 at 5:00 PM PT); this is a launch credit, not subscription coverage.
|
|
784
784
|
- **MiniMax H3 Standard, Balanced, LightX2V Turbo, and FastH3 Turbo** use a 32 px grid, fixed 24 fps, native 32 kHz stereo audio, 124–362 frames (`124 + n×17`, i.e. 5.17–15.08 s), and a 1,032,192-pixel render cap. Standard, Balanced, LightX2V FL2VA Turbo, and FastH3 normally default to 1344×768 or 768×1344; Ref2VA Turbo defaults to 960×544. Standard uses 20 steps; Balanced uses fixed 8-step Euler/simple acceleration, with LightX2V for FL2VA and Larry v4 for Ref2VA; both Turbo engines use 4 steps. FL2VA H3 Turbo defaults to `er_sde` on Socket and permits `euler`, `er_sde`, or `sa_solver`; Ref2VA Turbo and the separate FastVideo VSA FastH3 engine use Euler/simple only. The CLI omits the sampler unless `--sampler` is passed. FastH3 is about 2x faster than LightX2V Turbo and up to 6x faster than Standard for comparable 768p, 15-second requests; it supports T2V/I2V/FLF2V, never R2V. Guidance 1 is fixed and there is no negative-prompt input. Every Ref2VA tier accepts up to 9 images, 3 videos, and 3 audios, capped at 12 files; at least one visual reference is required. FastH3 keeps the FastVideo engine when an H3 LoRA is attached: base jobs require 23 GB and jobs with an H3 LoRA require 32 GB. The other FL2VA/Balanced/Turbo and image-only R2V paths require 32 GB-class workers, while video-conditioned R2V requires above 40 GB. See `references/video-prompting.md` § MiniMax H3 Prompting for the exact contracts.
|
|
785
785
|
- **LTX family** (`ltx2-*`, `ltx23-*`, `ltx25-*`) uses dimensions divisible by 64. The current wrapper caps non-WAN video dimensions at 2048 px on the long side.
|
package/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: sogni-creative-agent-skill
|
|
3
3
|
description: "CLI and agent skill for personal LoRAs, image, video, and music generation using Sogni AI's decentralized GPU network. Supports Pixal3D single- and multi-view image-to-GLB, BiRefNet background removal, Qwen3-TTS speech/voice cloning/design, MiniMax Music 3, 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 (including audio-to-video from an uploaded track)/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.54.
|
|
5
|
+
version: "3.54.2"
|
|
6
6
|
homepage: https://sogni.ai
|
|
7
7
|
openclaw:
|
|
8
8
|
emoji: "🎨"
|
|
@@ -243,7 +243,7 @@ sogni-agent --video -m happyhorse --ref first-frame.png "Bring the scene to life
|
|
|
243
243
|
sogni-agent --video -m happyhorse-1.1-r2v -c ref1.png -c ref2.png "Blend the references into one continuous shot"
|
|
244
244
|
|
|
245
245
|
# Alibaba Wan 3 unified video (2-30s, fixed 30fps, native audio,
|
|
246
|
-
# 480P/720P/1080P). --ref/--ref-end are frame anchors; r2v/a2v/ia2v
|
|
246
|
+
# 480P/720P/1080P, 720P by default). --ref/--ref-end are frame anchors; r2v/a2v/ia2v
|
|
247
247
|
# use loose Image 1 / Video 1 / Audio 1 references instead. A video reference
|
|
248
248
|
# conditions a new generation; it is not an edit/extend task.
|
|
249
249
|
sogni-agent --video -m wan3 --target-resolution 1080 --duration 8 'A presenter says "Welcome." in a detailed studio'
|
|
@@ -475,7 +475,7 @@ Eligible Sogni-hosted renders use Unlimited coverage when active; otherwise rend
|
|
|
475
475
|
- **Auth errors:** check `SOGNI_API_KEY` or `~/.config/sogni/credentials` (key from https://dashboard.sogni.ai, account menu).
|
|
476
476
|
- **Error 4061 / too many app IDs:** the CLI leases stable IDs from the persistent pool in `~/.config/sogni/app-ids/`. Do not delete that directory between runs. For ephemeral/container homes, set the same `SOGNI_APP_ID` on every session. An existing block may require waiting before retrying after upgrading.
|
|
477
477
|
- **Kicked mid-render / SWITCH_CONNECTION 4015:** two processes shared one app ID. The slot pool prevents this for concurrent CLI runs; if a long-lived daemon also uses this account, give it its own pinned `SOGNI_APP_ID`.
|
|
478
|
-
- **Video size errors:** sizes are model-specific (WAN 2.2 ÷16, sides 480–1536, at most 1,048,576 pixels, so no 1080p; Wan 3 uses its exact 480P/720P/1080P ratio buckets
|
|
478
|
+
- **Video size errors:** sizes are model-specific (WAN 2.2 ÷16, sides 480–1536, at most 1,048,576 pixels, so no 1080p; Wan 3 uses its exact 480P/720P/1080P ratio buckets, 720P unless `--target-resolution 1080`; LTX ÷64, long side ≤2048). The CLI auto-adjusts for local refs; `--strict-size` makes it fail with a suggested size instead. Details in [`references/models.md`](./references/models.md).
|
|
479
479
|
- **Timeouts / no workers:** a timeout never cancels; the project finishes on Sogni and `sogni-agent --result <id>` fetches it (`details.resultCommands`). For long videos use `--detach`, not a large `-t`. `--status <id>` says whether it waits on the plan limit or on workers; for network status see https://sogni.ai.
|
|
480
480
|
|
|
481
481
|
## Reference Index (read before acting)
|
|
@@ -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.54.
|
|
5
|
+
"version": "3.54.2",
|
|
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",
|
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.54.
|
|
5
|
+
"version": "3.54.2",
|
|
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.54.
|
|
3
|
+
"version": "3.54.2",
|
|
4
4
|
"description": "Sogni Creative Agent Skill: agent skill and CLI for Sogni AI image, 3D, speech, video, and music generation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "sogni-agent.mjs",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"media-utilities.mjs"
|
|
101
101
|
],
|
|
102
102
|
"dependencies": {
|
|
103
|
-
"@sogni-ai/sogni-intelligence-client": "4.6.
|
|
103
|
+
"@sogni-ai/sogni-intelligence-client": "4.6.2",
|
|
104
104
|
"execa": "^10.0.1",
|
|
105
105
|
"json5": "^2.2.3",
|
|
106
106
|
"sharp": "0.35.4"
|
package/references/models.md
CHANGED
|
@@ -702,6 +702,14 @@ so a prompt is not rewritten twice.
|
|
|
702
702
|
- **No edit/extend task:** video references are loose conditioning for a new
|
|
703
703
|
generation. Alibaba exposes no edit/extend task mode or task-type field; use
|
|
704
704
|
a dedicated video-to-video model when source-preserving editing is required.
|
|
705
|
+
- **Size:** `--target-resolution 480`, `720` (the default), or `1080` picks the
|
|
706
|
+
tier, and the CLI sends Alibaba's exact size for that tier and
|
|
707
|
+
`--wan3-ratio` (16:9 when adaptive): at 1080 that is 1920x1080, 1440x1080,
|
|
708
|
+
1080x1080, 1080x1440, or 1080x1920. Image-to-video keeps the first frame's
|
|
709
|
+
shape with its short side at the tier (an 832x1216 frame at 1080 becomes
|
|
710
|
+
1080x1578); a fixed `--wan3-ratio` does not crop the frame. Explicit
|
|
711
|
+
`-w`/`-h` are sent as given, 480-1920 per side. The network prices the tier
|
|
712
|
+
from the canvas, so 1080P costs twice the 720P rate per second.
|
|
705
713
|
- **Cost (as of 2026-08):** platform artist pricing is $0.065/s at 480P,
|
|
706
714
|
$0.13/s at 720P, and $0.26/s at 1080P; native audio does not change the rate.
|
|
707
715
|
|
|
@@ -717,7 +725,8 @@ the Sogni model `wan3.0-spicy-video`; MuleRouter's provider ID is
|
|
|
717
725
|
`w3.0-video`. Public surfaces call it **Wan 3.0 Enhanced**. It renders fixed or
|
|
718
726
|
smart 2–30 second clips at 30 fps with native audio and 480P, 720P, or 1080P
|
|
719
727
|
output. Supported ratios are `adaptive`, `16:9`, `9:16`, `1:1`, `4:3`, and
|
|
720
|
-
`3:4`.
|
|
728
|
+
`3:4`. Sizes follow the Wan 3 rules above: 720P unless `--target-resolution`
|
|
729
|
+
says otherwise.
|
|
721
730
|
|
|
722
731
|
- Use t2v for prompt-only video, i2v for first/optional last frame, r2v for
|
|
723
732
|
loose media references, and a2v/ia2v when audio drives the result.
|
package/skill-package.json
CHANGED
package/sogni-agent.mjs
CHANGED
|
@@ -1902,6 +1902,60 @@ const WAN3_SUPPORTED_WORKFLOWS = new Set(['t2v', 'i2v', 'r2v', 'a2v', 'ia2v']);
|
|
|
1902
1902
|
const WAN3_SUPPORTED_RESOLUTIONS = new Set([480, 720, 1080]);
|
|
1903
1903
|
const WAN3_SUPPORTED_RATIOS = new Set(['adaptive', '16:9', '4:3', '1:1', '3:4', '9:16']);
|
|
1904
1904
|
const WAN3_MAX_SEED = 0x7fffffff;
|
|
1905
|
+
// Wan 3 renders Alibaba's fixed sizes: the short side is the tier (480, 720 or
|
|
1906
|
+
// 1080) and the ratio sets the long side. The network prices and dispatches the
|
|
1907
|
+
// tier from the canvas, so the CLI sends these exact sizes. Same table as
|
|
1908
|
+
// sogni-api WAN3_DIMENSION_BUCKETS and sogni-web's Wan 3 presets.
|
|
1909
|
+
const WAN3_DIMENSION_BUCKETS = Object.freeze({
|
|
1910
|
+
'16:9': { 480: [854, 480], 720: [1280, 720], 1080: [1920, 1080] },
|
|
1911
|
+
'4:3': { 480: [640, 480], 720: [960, 720], 1080: [1440, 1080] },
|
|
1912
|
+
'1:1': { 480: [480, 480], 720: [720, 720], 1080: [1080, 1080] },
|
|
1913
|
+
'3:4': { 480: [480, 640], 720: [720, 960], 1080: [1080, 1440] },
|
|
1914
|
+
'9:16': { 480: [480, 854], 720: [720, 1280], 1080: [1080, 1920] },
|
|
1915
|
+
});
|
|
1916
|
+
// 720p is what CLI renders were priced and delivered at while the pinned client
|
|
1917
|
+
// clamped Wan 3 to 1536x864, so the default keeps that price. 1080p is
|
|
1918
|
+
// --target-resolution 1080 and costs twice as much per second.
|
|
1919
|
+
const WAN3_DEFAULT_RESOLUTION = 720;
|
|
1920
|
+
const WAN3_MAX_SIDE = 1920;
|
|
1921
|
+
|
|
1922
|
+
function wan3ResolutionTier(value) {
|
|
1923
|
+
const numeric = Number(value);
|
|
1924
|
+
if (numeric >= 1080) return 1080;
|
|
1925
|
+
if (numeric >= 720) return 720;
|
|
1926
|
+
return 480;
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1929
|
+
function nearestWan3Ratio(width, height) {
|
|
1930
|
+
const aspect = Number(width) / Number(height);
|
|
1931
|
+
if (!(aspect > 0) || !Number.isFinite(aspect)) return '16:9';
|
|
1932
|
+
return Object.keys(WAN3_DIMENSION_BUCKETS)
|
|
1933
|
+
.map((ratio) => {
|
|
1934
|
+
const [ratioW, ratioH] = ratio.split(':').map(Number);
|
|
1935
|
+
return { ratio, distance: Math.abs(Math.log(aspect / (ratioW / ratioH))) };
|
|
1936
|
+
})
|
|
1937
|
+
.sort((left, right) => left.distance - right.distance)[0].ratio;
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
function wan3BucketCanvas(ratio, tier) {
|
|
1941
|
+
const [width, height] = (WAN3_DIMENSION_BUCKETS[ratio] || WAN3_DIMENSION_BUCKETS['16:9'])[tier];
|
|
1942
|
+
return { width, height };
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
// A first frame is fitted inside the canvas and the canvas then takes the fitted
|
|
1946
|
+
// frame's size, so a canvas in any other shape would shrink below the tier. Keep
|
|
1947
|
+
// the frame's shape with its short side at the tier, capping the long side.
|
|
1948
|
+
function wan3FrameCanvas(frameWidth, frameHeight, tier) {
|
|
1949
|
+
const landscape = frameWidth >= frameHeight;
|
|
1950
|
+
const aspect = Math.max(frameWidth, frameHeight) / Math.min(frameWidth, frameHeight);
|
|
1951
|
+
let shortSide = tier;
|
|
1952
|
+
let longSide = Math.round(tier * aspect);
|
|
1953
|
+
if (longSide > WAN3_MAX_SIDE) {
|
|
1954
|
+
longSide = WAN3_MAX_SIDE;
|
|
1955
|
+
shortSide = Math.round(WAN3_MAX_SIDE / aspect);
|
|
1956
|
+
}
|
|
1957
|
+
return landscape ? { width: longSide, height: shortSide } : { width: shortSide, height: longSide };
|
|
1958
|
+
}
|
|
1905
1959
|
|
|
1906
1960
|
function isWan3ModelSelectionLocal(modelId) {
|
|
1907
1961
|
const normalized = String(modelId || '').trim().toLowerCase().replace(/_/g, '-');
|
|
@@ -2079,11 +2133,13 @@ function videoModelDimensionDefaultsLikeWrapper(modelId) {
|
|
|
2079
2133
|
return { defaultWidth: 1920, defaultHeight: 1080, maxDimension: 1920, dimensionMultiple: 1 };
|
|
2080
2134
|
}
|
|
2081
2135
|
if (isWan3ModelSelectionLocal(modelId)) {
|
|
2136
|
+
// Placeholder only: the Wan 3 preflight replaces it with the exact size for
|
|
2137
|
+
// the requested tier and ratio (WAN3_DIMENSION_BUCKETS).
|
|
2082
2138
|
return {
|
|
2083
|
-
defaultWidth:
|
|
2084
|
-
defaultHeight:
|
|
2139
|
+
defaultWidth: 1280,
|
|
2140
|
+
defaultHeight: 720,
|
|
2085
2141
|
minDimension: 480,
|
|
2086
|
-
maxDimension:
|
|
2142
|
+
maxDimension: WAN3_MAX_SIDE,
|
|
2087
2143
|
dimensionMultiple: 1,
|
|
2088
2144
|
};
|
|
2089
2145
|
}
|
|
@@ -4656,7 +4712,7 @@ Video Options:
|
|
|
4656
4712
|
--fps <num> Frames per second (model default unless set)
|
|
4657
4713
|
--duration <sec> Duration in seconds (default: 5); Seedance 2.5 edit requires @Video1's source duration
|
|
4658
4714
|
--frames <num> Override total frames (optional)
|
|
4659
|
-
--target-resolution <px> Short-side target that preserves aspect ratio (Seedance 2.5: 480, 720 or 1080).
|
|
4715
|
+
--target-resolution <px> Short-side target that preserves aspect ratio (Seedance 2.5: 480, 720 or 1080; Wan 3: 480, 720 (default) or 1080).
|
|
4660
4716
|
MiniMax H3 FastH3 and Ref2VA Two-Stage: the delivered size, 720, 1080, or 2K (1440; default),
|
|
4661
4717
|
rendered on a half-size canvas (672x384, 960x544, 1344x768)
|
|
4662
4718
|
--auto-resize-assets Auto-resize video reference assets (default)
|
|
@@ -5980,7 +6036,13 @@ if (options.music) {
|
|
|
5980
6036
|
options.height = canvas.height;
|
|
5981
6037
|
}
|
|
5982
6038
|
}
|
|
5983
|
-
|
|
6039
|
+
// Wan 3 takes Alibaba's exact sizes (applyWan3Canvas), never the generic
|
|
6040
|
+
// short-side or prompt-aspect scaling below.
|
|
6041
|
+
const isWan3Canvas = isWan3ModelLocal(options.model);
|
|
6042
|
+
if (isWan3Canvas && !hasExplicitVideoCanvas) {
|
|
6043
|
+
applyWan3Canvas();
|
|
6044
|
+
}
|
|
6045
|
+
const videoShortSide = (isTwoStageVideo || isWan3Canvas)
|
|
5984
6046
|
? null
|
|
5985
6047
|
: ((cliSet.targetResolution || targetResolutionFromPrompt)
|
|
5986
6048
|
? options.targetResolution
|
|
@@ -5990,7 +6052,7 @@ if (options.music) {
|
|
|
5990
6052
|
options.width = dims.width;
|
|
5991
6053
|
options.height = dims.height;
|
|
5992
6054
|
}
|
|
5993
|
-
if (aspectRatioFromPrompt && !cliSet.width && !cliSet.height && !isTwoStageVideo) {
|
|
6055
|
+
if (aspectRatioFromPrompt && !cliSet.width && !cliSet.height && !isTwoStageVideo && !isWan3Canvas) {
|
|
5994
6056
|
const dims = dimensionsForAspectRatio(options.width, options.height, aspectRatioFromPrompt);
|
|
5995
6057
|
if (dims) {
|
|
5996
6058
|
options.width = dims.width;
|
|
@@ -13120,6 +13182,60 @@ async function runMultiAngleFlow(client, log) {
|
|
|
13120
13182
|
}
|
|
13121
13183
|
}
|
|
13122
13184
|
|
|
13185
|
+
// Wan 3 preflight canvas: the requested tier (480/720/1080, default 720) at the
|
|
13186
|
+
// requested ratio, or in the first frame's shape for image-to-video. Explicit
|
|
13187
|
+
// -w/-h (or exact pixels in the prompt) skip this and are sent as given.
|
|
13188
|
+
function applyWan3Canvas() {
|
|
13189
|
+
const requestedTier = (cliSet.targetResolution || targetResolutionFromPrompt)
|
|
13190
|
+
? options.targetResolution
|
|
13191
|
+
: WAN3_DEFAULT_RESOLUTION;
|
|
13192
|
+
options._wan3Tier = wan3ResolutionTier(requestedTier);
|
|
13193
|
+
if (options.videoWorkflow === 'i2v' && (options.refImage || options.refImageEnd)) {
|
|
13194
|
+
// A URL frame is measured again once it is downloaded (see
|
|
13195
|
+
// applyWan3FrameCanvas at the render), so its canvas is provisional here.
|
|
13196
|
+
options._wan3CanvasFollowsFrame = true;
|
|
13197
|
+
const framePath = options.refImage || options.refImageEnd;
|
|
13198
|
+
if (!isHttpUrl(framePath) && existsSync(framePath)) {
|
|
13199
|
+
const dims = getImageDimensionsFromBuffer(readFileSync(framePath));
|
|
13200
|
+
if (dims?.width && dims?.height) {
|
|
13201
|
+
applyWan3FrameCanvas(dims.width, dims.height);
|
|
13202
|
+
return;
|
|
13203
|
+
}
|
|
13204
|
+
}
|
|
13205
|
+
}
|
|
13206
|
+
let ratio = wan3FixedRatio();
|
|
13207
|
+
if (!ratio && aspectRatioFromPrompt) {
|
|
13208
|
+
const promptShape = dimensionsForAspectRatio(1000, 1000, aspectRatioFromPrompt);
|
|
13209
|
+
if (promptShape) ratio = nearestWan3Ratio(promptShape.width, promptShape.height);
|
|
13210
|
+
}
|
|
13211
|
+
const canvas = wan3BucketCanvas(ratio || '16:9', options._wan3Tier);
|
|
13212
|
+
options.width = canvas.width;
|
|
13213
|
+
options.height = canvas.height;
|
|
13214
|
+
}
|
|
13215
|
+
|
|
13216
|
+
function wan3FixedRatio() {
|
|
13217
|
+
return options.wan3Ratio !== 'adaptive' && Object.hasOwn(WAN3_DIMENSION_BUCKETS, options.wan3Ratio)
|
|
13218
|
+
? options.wan3Ratio
|
|
13219
|
+
: null;
|
|
13220
|
+
}
|
|
13221
|
+
|
|
13222
|
+
// Returns true when the canvas changed.
|
|
13223
|
+
function applyWan3FrameCanvas(frameWidth, frameHeight) {
|
|
13224
|
+
const fixedRatio = wan3FixedRatio();
|
|
13225
|
+
if (fixedRatio && nearestWan3Ratio(frameWidth, frameHeight) !== fixedRatio && !options.quiet && !options._wan3RatioNoticeShown) {
|
|
13226
|
+
options._wan3RatioNoticeShown = true;
|
|
13227
|
+
console.error(
|
|
13228
|
+
`Wan 3 image-to-video follows the first frame's shape (${frameWidth}x${frameHeight}); ` +
|
|
13229
|
+
`--wan3-ratio ${fixedRatio} does not crop it. Crop the image first for a ${fixedRatio} video.`
|
|
13230
|
+
);
|
|
13231
|
+
}
|
|
13232
|
+
const canvas = wan3FrameCanvas(frameWidth, frameHeight, options._wan3Tier);
|
|
13233
|
+
const changed = canvas.width !== options.width || canvas.height !== options.height;
|
|
13234
|
+
options.width = canvas.width;
|
|
13235
|
+
options.height = canvas.height;
|
|
13236
|
+
return changed;
|
|
13237
|
+
}
|
|
13238
|
+
|
|
13123
13239
|
// The images of the MiniMax H3 FastH3 ia2v/flfa2v audio guide are first/last
|
|
13124
13240
|
// frame anchors exactly like i2v's, so they follow i2v's canvas and
|
|
13125
13241
|
// reference-resize rules. (Other ia2v models treat --ref as a loose reference.)
|
|
@@ -14560,6 +14676,15 @@ async function main() {
|
|
|
14560
14676
|
}
|
|
14561
14677
|
}
|
|
14562
14678
|
|
|
14679
|
+
// Wan 3: size the canvas from the frame actually being sent, which the
|
|
14680
|
+
// preflight could not measure when --ref/--ref-end is a URL.
|
|
14681
|
+
if (isWan3Video && options._wan3CanvasFollowsFrame && (imageBuffer || endImageBuffer)) {
|
|
14682
|
+
const frameDims = await getVideoImageDimensionsFromBuffer(imageBuffer || endImageBuffer);
|
|
14683
|
+
if (frameDims?.width && frameDims?.height && applyWan3FrameCanvas(frameDims.width, frameDims.height) && !options.quiet) {
|
|
14684
|
+
console.error(`Sized the Wan 3 canvas to the first frame: ${options.width}x${options.height} (${options._wan3Tier}p).`);
|
|
14685
|
+
}
|
|
14686
|
+
}
|
|
14687
|
+
|
|
14563
14688
|
// Pre-resize reference images to model-compatible dimensions if needed for i2v workflow.
|
|
14564
14689
|
// The earlier preflight can inspect local files, but HTTPS references are downloaded only
|
|
14565
14690
|
// here. Re-check the actual buffer so remote and local inputs follow the same grid rules.
|
package/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PACKAGE_VERSION = '3.54.
|
|
1
|
+
export const PACKAGE_VERSION = '3.54.2';
|