@sogni-ai/sogni-creative-agent-skill 3.50.0 → 3.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/sogni-creative-agent-skill/SKILL.md +3 -1
- package/.agents/skills/sogni-creative-agent-skill/references/hosted-api.md +16 -0
- package/.agents/skills/sogni-creative-agent-skill/references/models.md +32 -7
- package/.agents/skills/sogni-creative-agent-skill/references/personal-loras.md +33 -0
- package/.agents/skills/sogni-creative-agent-skill/references/video-prompting.md +12 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +24 -0
- package/README.md +12 -7
- package/SKILL.md +7 -7
- package/desktop-extension/manifest.json +1 -1
- package/generated/creative-agent-runtime.mjs +318 -3
- package/openclaw.plugin.json +1 -1
- package/package.json +3 -3
- package/plugin-skills/sogni-creative-agent/SKILL.md +2 -0
- package/references/hosted-api.md +16 -0
- package/references/models.md +32 -7
- package/references/personal-loras.md +33 -0
- package/references/video-prompting.md +12 -1
- package/scripts/sync-hermes-skill.mjs +1 -0
- package/skill-package.json +2 -2
- package/sogni-agent.mjs +206 -38
- package/version.mjs +1 -1
package/sogni-agent.mjs
CHANGED
|
@@ -2372,6 +2372,8 @@ const MINIMAX_H3_MODEL_MODES = new Map([
|
|
|
2372
2372
|
['minimax-h3-fl2va-fp8_i2v_balanced', 'i2v'],
|
|
2373
2373
|
['minimax-h3-fl2va-fp8_flf2v_balanced', 'flf2v'],
|
|
2374
2374
|
['minimax-h3-ref2va-fp8_r2v_balanced', 'r2v'],
|
|
2375
|
+
['minimax-h3-ref2va-fp8_r2v_2stage', 'r2v'],
|
|
2376
|
+
['minimax-h3-ref2va-fp8_r2v_balanced_2stage', 'r2v'],
|
|
2375
2377
|
['minimax-h3-fastvideo-int8_t2v_turbo', 't2v'],
|
|
2376
2378
|
['minimax-h3-fastvideo-int8_i2v_turbo', 'i2v'],
|
|
2377
2379
|
['minimax-h3-fastvideo-int8_flf2v_turbo', 'flf2v'],
|
|
@@ -2453,6 +2455,14 @@ const MINIMAX_H3_TURBO_SAMPLER_SET = new Set(MINIMAX_H3_TURBO_SAMPLERS);
|
|
|
2453
2455
|
const MINIMAX_H3_R2V_MODEL_ID = 'minimax-h3-ref2va-fp8_r2v';
|
|
2454
2456
|
const MINIMAX_H3_R2V_TURBO_MODEL_ID = 'minimax-h3-ref2va-fp8_r2v_turbo';
|
|
2455
2457
|
const MINIMAX_H3_R2V_BALANCED_MODEL_ID = 'minimax-h3-ref2va-fp8_r2v_balanced';
|
|
2458
|
+
// Ref2VA Two-Stage: the Standard (20-step) or Balanced (8-step) R2V request on
|
|
2459
|
+
// its own id, rendered on the FastH3 Two-Stage canvas (384, 544 or 768 px short
|
|
2460
|
+
// edge) and delivered at exactly twice it. Never Turbo; references, durations
|
|
2461
|
+
// and LoRAs are its one-stage tier's.
|
|
2462
|
+
const MINIMAX_H3_R2V_TWO_STAGE_MODEL_ID = 'minimax-h3-ref2va-fp8_r2v_2stage';
|
|
2463
|
+
const MINIMAX_H3_R2V_BALANCED_TWO_STAGE_MODEL_ID = 'minimax-h3-ref2va-fp8_r2v_balanced_2stage';
|
|
2464
|
+
const MINIMAX_H3_R2V_SELECTOR_HINT = 'Reference-to-video is -m minimax-h3-r2v, -r2v-balanced or -r2v-turbo; '
|
|
2465
|
+
+ 'for 1080p or 2K use -m minimax-h3-r2v-2stage or minimax-h3-r2v-balanced-2stage.';
|
|
2456
2466
|
const MINIMAX_H3_REFERENCE_LIMITS = Object.freeze({
|
|
2457
2467
|
images: 9,
|
|
2458
2468
|
videos: 3,
|
|
@@ -2558,7 +2568,8 @@ function resolveSkillVideoModelAlias(
|
|
|
2558
2568
|
if (workflow === 'r2v') {
|
|
2559
2569
|
fatalCliError('MiniMax H3 FastH3 Turbo has no r2v workflow.', {
|
|
2560
2570
|
code: 'INVALID_ARGUMENT',
|
|
2561
|
-
details: { model: modelId, workflow }
|
|
2571
|
+
details: { model: modelId, workflow },
|
|
2572
|
+
hint: MINIMAX_H3_R2V_SELECTOR_HINT
|
|
2562
2573
|
});
|
|
2563
2574
|
}
|
|
2564
2575
|
if (workflow === 'i2v') {
|
|
@@ -2590,7 +2601,8 @@ function resolveSkillVideoModelAlias(
|
|
|
2590
2601
|
if (workflow === 'r2v') {
|
|
2591
2602
|
fatalCliError('MiniMax H3 FastH3 Two-Stage has no r2v workflow.', {
|
|
2592
2603
|
code: 'INVALID_ARGUMENT',
|
|
2593
|
-
details: { model: modelId, workflow }
|
|
2604
|
+
details: { model: modelId, workflow },
|
|
2605
|
+
hint: MINIMAX_H3_R2V_SELECTOR_HINT
|
|
2594
2606
|
});
|
|
2595
2607
|
}
|
|
2596
2608
|
if (workflow === 'i2v') {
|
|
@@ -2638,6 +2650,8 @@ function resolveSkillVideoModelAlias(
|
|
|
2638
2650
|
if (normalized === 'minimax-h3-r2v-balanced') {
|
|
2639
2651
|
return MINIMAX_H3_R2V_BALANCED_MODEL_ID;
|
|
2640
2652
|
}
|
|
2653
|
+
if (normalized === 'minimax-h3-r2v-2stage') return MINIMAX_H3_R2V_TWO_STAGE_MODEL_ID;
|
|
2654
|
+
if (normalized === 'minimax-h3-r2v-balanced-2stage') return MINIMAX_H3_R2V_BALANCED_TWO_STAGE_MODEL_ID;
|
|
2641
2655
|
return normalized === '10eros' || normalized === 'ltx23-eros'
|
|
2642
2656
|
? LTX23_10EROS_MODEL_ID
|
|
2643
2657
|
: modelId;
|
|
@@ -2672,7 +2686,10 @@ const MINIMAX_H3_TWO_STAGE_CANVAS_MODE = Object.freeze({ ia2v: 'i2v', flfa2v: 'f
|
|
|
2672
2686
|
*/
|
|
2673
2687
|
function miniMaxH3TwoStageCanvas(modelId, deliveredClass, sourceWidth, sourceHeight, aspectRatio) {
|
|
2674
2688
|
const mode = miniMaxH3ModeFromModelId(modelId);
|
|
2675
|
-
|
|
2689
|
+
// Ref2VA Two-Stage has its own size table entries with the same 384/544/768 canvases.
|
|
2690
|
+
const selector = mode === 'r2v'
|
|
2691
|
+
? miniMaxH3R2vTwoStageSelector(modelId)
|
|
2692
|
+
: `minimax-h3-fasth3-${MINIMAX_H3_TWO_STAGE_CANVAS_MODE[mode] || mode}-turbo-2stage`;
|
|
2676
2693
|
return calculateSharedVideoDimensions(sourceWidth, sourceHeight, deliveredClass, selector, aspectRatio || undefined);
|
|
2677
2694
|
}
|
|
2678
2695
|
|
|
@@ -2692,7 +2709,17 @@ function isMiniMaxH3R2vModel(modelId) {
|
|
|
2692
2709
|
const normalized = String(modelId || '').trim().toLowerCase();
|
|
2693
2710
|
return normalized === MINIMAX_H3_R2V_MODEL_ID
|
|
2694
2711
|
|| normalized === MINIMAX_H3_R2V_TURBO_MODEL_ID
|
|
2695
|
-
|| normalized === MINIMAX_H3_R2V_BALANCED_MODEL_ID
|
|
2712
|
+
|| normalized === MINIMAX_H3_R2V_BALANCED_MODEL_ID
|
|
2713
|
+
|| normalized === MINIMAX_H3_R2V_TWO_STAGE_MODEL_ID
|
|
2714
|
+
|| normalized === MINIMAX_H3_R2V_BALANCED_TWO_STAGE_MODEL_ID;
|
|
2715
|
+
}
|
|
2716
|
+
|
|
2717
|
+
// The Intelligence Client selector for a Ref2VA Two-Stage selector or id.
|
|
2718
|
+
function miniMaxH3R2vTwoStageSelector(modelId) {
|
|
2719
|
+
const normalized = String(modelId || '').trim().toLowerCase();
|
|
2720
|
+
return normalized === 'minimax-h3-r2v-balanced-2stage' || normalized === MINIMAX_H3_R2V_BALANCED_TWO_STAGE_MODEL_ID
|
|
2721
|
+
? 'minimax-h3-r2v-balanced-2stage'
|
|
2722
|
+
: 'minimax-h3-r2v-2stage';
|
|
2696
2723
|
}
|
|
2697
2724
|
|
|
2698
2725
|
function isMiniMaxH3R2vTurboSelectionLocal(modelId, workflow = null) {
|
|
@@ -2754,6 +2781,8 @@ function isMiniMaxH3ModelSelectionLocal(modelId) {
|
|
|
2754
2781
|
|| normalized === 'minimax-h3-i2v-balanced'
|
|
2755
2782
|
|| normalized === 'minimax-h3-flf2v-balanced'
|
|
2756
2783
|
|| normalized === 'minimax-h3-r2v-balanced'
|
|
2784
|
+
|| normalized === 'minimax-h3-r2v-2stage'
|
|
2785
|
+
|| normalized === 'minimax-h3-r2v-balanced-2stage'
|
|
2757
2786
|
|| isMiniMaxH3Model(normalized);
|
|
2758
2787
|
}
|
|
2759
2788
|
|
|
@@ -2796,6 +2825,8 @@ function miniMaxH3ModeFromModelId(modelId) {
|
|
|
2796
2825
|
if (normalized === 'minimax-h3-i2v-balanced') return 'i2v';
|
|
2797
2826
|
if (normalized === 'minimax-h3-flf2v-balanced') return 'flf2v';
|
|
2798
2827
|
if (normalized === 'minimax-h3-r2v-balanced') return 'r2v';
|
|
2828
|
+
if (normalized === 'minimax-h3-r2v-2stage') return 'r2v';
|
|
2829
|
+
if (normalized === 'minimax-h3-r2v-balanced-2stage') return 'r2v';
|
|
2799
2830
|
if (MINIMAX_H3_AUDIO_GUIDE_SELECTORS.has(normalized)) {
|
|
2800
2831
|
return MINIMAX_H3_MODEL_MODES.get(MINIMAX_H3_AUDIO_GUIDE_SELECTORS.get(normalized));
|
|
2801
2832
|
}
|
|
@@ -3219,6 +3250,12 @@ const options = {
|
|
|
3219
3250
|
loraCatalogQuery: null,
|
|
3220
3251
|
loraCatalogModel: null, // restrict to LoRAs compatible with this model id
|
|
3221
3252
|
loraCatalogCategory: null, // restrict to one catalog category
|
|
3253
|
+
includePersonalLoras: false,
|
|
3254
|
+
personalLoraAction: null,
|
|
3255
|
+
personalLoraValue: null,
|
|
3256
|
+
personalLoraName: null,
|
|
3257
|
+
personalLoraModel: null,
|
|
3258
|
+
personalLoraRightsConfirmed: false,
|
|
3222
3259
|
apiReplayAction: null, // list|get|ingest
|
|
3223
3260
|
apiReplayId: null,
|
|
3224
3261
|
apiReplayInput: null,
|
|
@@ -4051,6 +4088,21 @@ for (let i = 0; i < args.length; i++) {
|
|
|
4051
4088
|
const raw = requireFlagValue(args, i, arg);
|
|
4052
4089
|
i++;
|
|
4053
4090
|
options.liveModelTags.push(raw);
|
|
4091
|
+
} else if (arg === '--list-personal-loras') {
|
|
4092
|
+
if (options.personalLoraAction) fatalCliError('Choose one personal LoRA action.', { code: 'INVALID_ARGUMENT' });
|
|
4093
|
+
options.personalLoraAction = 'list';
|
|
4094
|
+
} else if ((arg === '--get-personal-lora' || arg === '--import-lora' || arg === '--remove-personal-lora')) {
|
|
4095
|
+
if (options.personalLoraAction) fatalCliError('Choose one personal LoRA action.', { code: 'INVALID_ARGUMENT' });
|
|
4096
|
+
options.personalLoraAction = { '--get-personal-lora': 'get', '--import-lora': 'import', '--remove-personal-lora': 'remove' }[arg];
|
|
4097
|
+
options.personalLoraValue = requireFlagValue(args, i, arg);
|
|
4098
|
+
i++;
|
|
4099
|
+
} else if (arg === '--personal-lora-name' || arg === '--personal-lora-model') {
|
|
4100
|
+
options[arg === '--personal-lora-name' ? 'personalLoraName' : 'personalLoraModel'] = requireFlagValue(args, i, arg);
|
|
4101
|
+
i++;
|
|
4102
|
+
} else if (arg === '--confirm-lora-rights') {
|
|
4103
|
+
options.personalLoraRightsConfirmed = true;
|
|
4104
|
+
} else if (arg === '--include-personal-loras') {
|
|
4105
|
+
options.includePersonalLoras = true;
|
|
4054
4106
|
} else if (arg === '--list-loras' || arg === '--loras-catalog') {
|
|
4055
4107
|
options.loraCatalogAction = 'list';
|
|
4056
4108
|
const next = args[i + 1];
|
|
@@ -4487,7 +4539,7 @@ Video Options:
|
|
|
4487
4539
|
--duration <sec> Duration in seconds (default: 5); Seedance 2.5 edit requires @Video1's source duration
|
|
4488
4540
|
--frames <num> Override total frames (optional)
|
|
4489
4541
|
--target-resolution <px> Short-side target that preserves aspect ratio (Seedance 2.5: 480, 720 or 1080).
|
|
4490
|
-
MiniMax H3 FastH3 Two-Stage: the delivered size, 720, 1080, or 2K (1440; default),
|
|
4542
|
+
MiniMax H3 FastH3 and Ref2VA Two-Stage: the delivered size, 720, 1080, or 2K (1440; default),
|
|
4491
4543
|
rendered on a half-size canvas (672x384, 960x544, 1344x768)
|
|
4492
4544
|
--auto-resize-assets Auto-resize video reference assets (default)
|
|
4493
4545
|
--no-auto-resize-assets Disable auto-resize for video assets
|
|
@@ -4608,6 +4660,14 @@ General:
|
|
|
4608
4660
|
--search-loras <q> Search LoRAs by ID, name, category, or description
|
|
4609
4661
|
--lora-catalog-model <id> Only LoRAs compatible with that model id
|
|
4610
4662
|
--lora-category <c> Filter by catalog category, e.g. character or lighting
|
|
4663
|
+
--include-personal-loras Include your ready imports in --list-loras / --search-loras
|
|
4664
|
+
--list-personal-loras List all your imports, statuses, supported models and limits
|
|
4665
|
+
--get-personal-lora <id> Read one import's current status and requirements
|
|
4666
|
+
--import-lora <url> Import a public Hugging Face or Civitai LoRA
|
|
4667
|
+
--personal-lora-name <name> Name for --import-lora
|
|
4668
|
+
--personal-lora-model <id> Base model for --import-lora (see --list-personal-loras)
|
|
4669
|
+
--confirm-lora-rights Confirm permission to use the imported file on Sogni
|
|
4670
|
+
--remove-personal-lora <id> Remove an entry from your library
|
|
4611
4671
|
--doctor Health check: Node, credentials, ffmpeg, auth, plan, config, version
|
|
4612
4672
|
--snooze-update Snooze the pending update reminder (1 day → 2 days → 1 week)
|
|
4613
4673
|
--whats-new [version] Show bundled CHANGELOG entries (everything after <version> if given)
|
|
@@ -4713,7 +4773,7 @@ Seedance Video Model Selectors:
|
|
|
4713
4773
|
seedance2-v2v Video-to-video without ControlNet
|
|
4714
4774
|
seedance2-5 Seedance 2.5 text-to-video (alias seedance2-5-t2v): 4-30s single clips,
|
|
4715
4775
|
480p/720p/1080p (no 4K), MP4/MOV and last-frame export, native audio, first/last frame via
|
|
4716
|
-
--ref/--ref-end, up to 30 image / 10 video / 10 audio refs (
|
|
4776
|
+
--ref/--ref-end, up to 30 image / 10 video / 10 audio refs (50 total)
|
|
4717
4777
|
seedance2-5-ia2v Seedance 2.5 image+audio-to-video
|
|
4718
4778
|
seedance2-5-v2v Seedance 2.5 video-to-video, editing, and extension, no ControlNet
|
|
4719
4779
|
|
|
@@ -4739,6 +4799,10 @@ state negatives in the structured prompt.):
|
|
|
4739
4799
|
minimax-h3-i2v-balanced Balanced I2VA (--ref) or L2VA (--ref-end)
|
|
4740
4800
|
minimax-h3-flf2v-balanced Balanced first-frame -> last-frame (--ref plus --ref-end)
|
|
4741
4801
|
minimax-h3-r2v-balanced Balanced Ref2VA with loose image/video/audio references
|
|
4802
|
+
minimax-h3-r2v-2stage Ref2VA Two-Stage: the minimax-h3-r2v request (20 steps), delivered at twice the
|
|
4803
|
+
canvas, 2K by default (1344x768 -> 2688x1536); --target-resolution 1080 or 720
|
|
4804
|
+
minimax-h3-r2v-balanced-2stage Balanced Ref2VA Two-Stage: the minimax-h3-r2v-balanced request (8 steps),
|
|
4805
|
+
delivered at twice the canvas like minimax-h3-r2v-2stage
|
|
4742
4806
|
minimax-h3-turbo 4-step LightX2V Turbo; --ref selects I2VA, --ref-end L2VA, and both FL2VA
|
|
4743
4807
|
minimax-h3-t2v-turbo 4-step LightX2V Turbo text-to-video
|
|
4744
4808
|
minimax-h3-i2v-turbo 4-step LightX2V Turbo I2VA (--ref) or L2VA (--ref-end)
|
|
@@ -4816,7 +4880,7 @@ Examples:
|
|
|
4816
4880
|
sogni-agent --api-chat "Create a 4-shot product video concept for a red sneaker"
|
|
4817
4881
|
sogni-agent --api-workflow --video-prompt "slow push-in as it comes alive" "a graphite robot sketch"
|
|
4818
4882
|
sogni-agent --api-workflow --workflow-input @workflow.json
|
|
4819
|
-
sogni-agent --api-workflow storyboard-video --storyboard-frames 6 "Create a 12s 9:16 bakery launch video with GPT Image 2 and Seedance"
|
|
4883
|
+
sogni-agent --api-workflow storyboard-video --storyboard-frames 6 "Create a 12s 9:16 bakery launch video with GPT Image 2.5 Sunburst and Seedance 2.5 at 1080p"
|
|
4820
4884
|
sogni-agent --video -m ltx25 --duration 20 "A wide cinematic aerial shot opens over steep tropical cliffs at golden hour, warm sunlight grazing the rock faces while sea mist drifts above the water below. Palm trees bend gently along the ridge as waves roll against the shoreline, leaving bright bands of foam across the dark stone. The camera glides forward in one continuous pass, revealing more of the coastline as sunlight flickers across wet surfaces and distant birds wheel through the haze. The scene holds a calm, upscale travel-film mood with smooth stabilized motion and crisp environmental detail."
|
|
4821
4885
|
sogni-agent --video --ref subject.jpg --ref-video motion.mp4 --workflow animate-move "transfer motion"
|
|
4822
4886
|
sogni-agent --video --last-image "gentle camera pan"
|
|
@@ -5299,7 +5363,7 @@ if (options.video && options.loras.length > 0) {
|
|
|
5299
5363
|
// dropped server-side and rendering as if no LoRA had been asked for.
|
|
5300
5364
|
let videoLoraCatalog;
|
|
5301
5365
|
try {
|
|
5302
|
-
videoLoraCatalog = await fetchLoraCatalog(options.model);
|
|
5366
|
+
videoLoraCatalog = await fetchLoraCatalog(options.model, options.loras.some(id => id.startsWith('personal-')));
|
|
5303
5367
|
} catch (cause) {
|
|
5304
5368
|
fatalCliError(
|
|
5305
5369
|
`Could not read the LoRA catalog for "${options.model}": ${cause?.message || cause}`,
|
|
@@ -5323,7 +5387,7 @@ if (options.video && options.loras.length > 0) {
|
|
|
5323
5387
|
: isUnresolvedH3Alias
|
|
5324
5388
|
? 'Name an explicit H3 mode (for example -m minimax-h3-i2v); LoRA availability differs per mode.'
|
|
5325
5389
|
: 'That model loads no LoRAs.') +
|
|
5326
|
-
' Run --list-loras --lora-model <id> for the live catalog.',
|
|
5390
|
+
' Run --list-loras --include-personal-loras --lora-catalog-model <id> for the live catalog.',
|
|
5327
5391
|
{ code: 'INVALID_ARGUMENT' }
|
|
5328
5392
|
);
|
|
5329
5393
|
}
|
|
@@ -5349,6 +5413,20 @@ if (options.video && options.loras.length > 0) {
|
|
|
5349
5413
|
}
|
|
5350
5414
|
}
|
|
5351
5415
|
|
|
5416
|
+
if (!options.video && options.loras.some(id => id.startsWith('personal-'))) {
|
|
5417
|
+
try {
|
|
5418
|
+
const catalog = await fetchLoraCatalog(options.model, true);
|
|
5419
|
+
const entries = new Map(catalog.loras.map(loraCatalogEntryFromPayload).map(entry => [entry.loraId, entry]));
|
|
5420
|
+
for (const id of options.loras.filter(id => id.startsWith('personal-'))) {
|
|
5421
|
+
if (!entries.has(id)) fatalCliError(`Personal LoRA "${id}" is not ready or compatible with model "${options.model}". Run --list-personal-loras and --list-loras --include-personal-loras.`, { code: 'INVALID_ARGUMENT' });
|
|
5422
|
+
if (entries.get(id).nsfw && !options.noFilter) fatalCliError(`Personal LoRA "${id}" requires --no-filter.`, { code: 'INVALID_ARGUMENT' });
|
|
5423
|
+
}
|
|
5424
|
+
if (options.loraStrengths.length === 0) options.loraStrengths = options.loras.map(id => entries.get(id)?.default ?? 1);
|
|
5425
|
+
} catch (cause) {
|
|
5426
|
+
fatalCliError(`Could not read your personal LoRA catalog: ${cause?.message || cause}`, { code: cause?.code || 'LORA_CATALOG_UNAVAILABLE' });
|
|
5427
|
+
}
|
|
5428
|
+
}
|
|
5429
|
+
|
|
5352
5430
|
if (options.video && options.scheduler) {
|
|
5353
5431
|
fatalCliError('--scheduler is an image-only option.', { code: 'INVALID_ARGUMENT' });
|
|
5354
5432
|
}
|
|
@@ -5468,7 +5546,9 @@ if (options.video) {
|
|
|
5468
5546
|
}
|
|
5469
5547
|
|
|
5470
5548
|
// Standard, Balanced, and LightX2V Turbo each have four concrete worker
|
|
5471
|
-
// selectors
|
|
5549
|
+
// selectors (Standard and Balanced r2v also have a two-stage id, picked only
|
|
5550
|
+
// by its own minimax-h3-r2v[-balanced]-2stage selector); FastH3 has three and
|
|
5551
|
+
// deliberately has no r2v. The FL2VA and
|
|
5472
5552
|
// FastVideo checkpoints cover t2v, first-frame i2v, last-frame-only
|
|
5473
5553
|
// l2v, and first/last-frame (represented by the CLI's i2v workflow); Ref2VA
|
|
5474
5554
|
// is a separate r2v checkpoint and is never inferred from loose references.
|
|
@@ -5737,15 +5817,18 @@ if (options.music) {
|
|
|
5737
5817
|
options.steps = videoQuality.steps;
|
|
5738
5818
|
}
|
|
5739
5819
|
}
|
|
5740
|
-
// MiniMax H3
|
|
5741
|
-
// (720, 1080, or 1440/2K; omitted is 2K) and the canvas is half
|
|
5742
|
-
// Intelligence Client's size table. Anything else is refused,
|
|
5820
|
+
// MiniMax H3 Two-Stage (FastH3 and Ref2VA): --target-resolution names the
|
|
5821
|
+
// delivered class (720, 1080, or 1440/2K; omitted is 2K) and the canvas is half
|
|
5822
|
+
// of it, from the Intelligence Client's size table. Anything else is refused,
|
|
5823
|
+
// never guessed.
|
|
5743
5824
|
const isTwoStageVideo = isMiniMaxH3TwoStageModel(options.model);
|
|
5744
5825
|
if (cliSet.targetResolution2K && !isTwoStageVideo) {
|
|
5745
|
-
fatalCliError(`--target-resolution 2K is the MiniMax H3
|
|
5826
|
+
fatalCliError(`--target-resolution 2K is the MiniMax H3 Two-Stage delivered size; ${options.model} takes a short side in pixels.`, {
|
|
5746
5827
|
code: 'INVALID_ARGUMENT',
|
|
5747
5828
|
details: { flag: '--target-resolution', value: '2K', model: options.model },
|
|
5748
|
-
hint:
|
|
5829
|
+
hint: isMiniMaxH3R2vModel(options.model)
|
|
5830
|
+
? 'Use -m minimax-h3-r2v-2stage (or minimax-h3-r2v-balanced-2stage) for 2K MiniMax H3 reference-to-video, or pass the short side in pixels.'
|
|
5831
|
+
: 'Use -m minimax-h3-fasth3-turbo-2stage for 2K MiniMax H3 video, or pass the short side in pixels.'
|
|
5749
5832
|
});
|
|
5750
5833
|
}
|
|
5751
5834
|
const hasExplicitVideoCanvas = cliSet.width || cliSet.height || widthFromConfig || heightFromConfig || widthFromPrompt || heightFromPrompt;
|
|
@@ -5757,7 +5840,7 @@ if (options.music) {
|
|
|
5757
5840
|
fatalCliError(`${error.message}.`, {
|
|
5758
5841
|
code: 'INVALID_ARGUMENT',
|
|
5759
5842
|
details: { flag: '--target-resolution', value: requestedClass, model: options.model },
|
|
5760
|
-
hint: 'MiniMax H3
|
|
5843
|
+
hint: 'MiniMax H3 Two-Stage --target-resolution is the delivered size: 720, 1080, or 2K (1440). Omit it for 2K.'
|
|
5761
5844
|
});
|
|
5762
5845
|
}
|
|
5763
5846
|
options._miniMaxH3TwoStageClass = requestedClass;
|
|
@@ -5920,7 +6003,7 @@ const apiWorkflowStartHasExternalInput = options.apiWorkflowAction === 'start' &
|
|
|
5920
6003
|
const apiWorkflowTemplate = options.apiWorkflowTemplate || 'generated_keyframe_video';
|
|
5921
6004
|
const apiModelUtilityAction = Boolean(options.apiModelAction);
|
|
5922
6005
|
const liveModelUtilityAction = Boolean(options.liveModelAction);
|
|
5923
|
-
const loraCatalogUtilityAction = Boolean(options.loraCatalogAction);
|
|
6006
|
+
const loraCatalogUtilityAction = Boolean(options.loraCatalogAction || options.personalLoraAction);
|
|
5924
6007
|
const apiReplayUtilityAction = Boolean(options.apiReplayAction);
|
|
5925
6008
|
const personaUtilityAction = Boolean(options.personaAction && options.personaAction !== 'generate');
|
|
5926
6009
|
const contractUtilityAction = Boolean(options.contractAction);
|
|
@@ -5963,11 +6046,20 @@ if (!liveModelUtilityAction && (options.liveModelMedia !== 'all' || options.live
|
|
|
5963
6046
|
code: 'INVALID_ARGUMENT'
|
|
5964
6047
|
});
|
|
5965
6048
|
}
|
|
5966
|
-
if (!
|
|
6049
|
+
if (!options.loraCatalogAction && (options.loraCatalogModel || options.loraCatalogCategory || options.includePersonalLoras)) {
|
|
5967
6050
|
fatalCliError('--lora-catalog-model and --lora-category require --list-loras or --search-loras.', {
|
|
5968
6051
|
code: 'INVALID_ARGUMENT'
|
|
5969
6052
|
});
|
|
5970
6053
|
}
|
|
6054
|
+
if (options.personalLoraAction && (options.prompt || options.video || options.music || options.speech || options.imageTo3d || options.removeBackground || options.apiChat || options.apiWorkflowAction || options.loraCatalogAction || options.loras.length)) {
|
|
6055
|
+
fatalCliError('Run personal LoRA management separately from generation or catalog discovery.', { code: 'INVALID_ARGUMENT' });
|
|
6056
|
+
}
|
|
6057
|
+
if (options.personalLoraAction === 'import' && (!options.personalLoraName || !options.personalLoraModel || !options.personalLoraRightsConfirmed)) {
|
|
6058
|
+
fatalCliError('--import-lora requires --personal-lora-name, --personal-lora-model and --confirm-lora-rights.', { code: 'INVALID_ARGUMENT' });
|
|
6059
|
+
}
|
|
6060
|
+
if (options.personalLoraAction !== 'import' && (options.personalLoraName || options.personalLoraModel || options.personalLoraRightsConfirmed)) {
|
|
6061
|
+
fatalCliError('Personal LoRA import options require --import-lora.', { code: 'INVALID_ARGUMENT' });
|
|
6062
|
+
}
|
|
5971
6063
|
// Normalize a whitespace-only prompt to empty so the guard below treats it as
|
|
5972
6064
|
// "no prompt" rather than silently sending blank text to the server.
|
|
5973
6065
|
if (typeof options.prompt === 'string' && options.prompt.trim() === '') {
|
|
@@ -8504,6 +8596,31 @@ function storyboardWorkflowImageQualityFromCli() {
|
|
|
8504
8596
|
return 'medium';
|
|
8505
8597
|
}
|
|
8506
8598
|
|
|
8599
|
+
function normalizeSeedance25StoryboardPlanDimensions(plan, targetResolution) {
|
|
8600
|
+
if (!plan?.video || plan.video.model !== 'seedance2-5') return plan;
|
|
8601
|
+
const videoStep = plan.input?.steps?.find((step) => step?.toolName === 'generate_video');
|
|
8602
|
+
const ratioParts = String(plan.storyboardProject?.targetVideoAspectRatio || '')
|
|
8603
|
+
.split(':')
|
|
8604
|
+
.map(Number);
|
|
8605
|
+
if (!Number.isFinite(targetResolution) || targetResolution <= 0 || ratioParts.length !== 2) return plan;
|
|
8606
|
+
const [ratioWidth, ratioHeight] = ratioParts;
|
|
8607
|
+
if (!Number.isFinite(ratioWidth) || !Number.isFinite(ratioHeight) || ratioWidth <= 0 || ratioHeight <= 0) return plan;
|
|
8608
|
+
if (videoStep?.arguments) {
|
|
8609
|
+
videoStep.arguments.targetResolution = targetResolution;
|
|
8610
|
+
delete videoStep.arguments.width;
|
|
8611
|
+
delete videoStep.arguments.height;
|
|
8612
|
+
}
|
|
8613
|
+
const roundEven = (value) => Math.round(value / 2) * 2;
|
|
8614
|
+
if (ratioWidth >= ratioHeight) {
|
|
8615
|
+
plan.video.width = roundEven(targetResolution * ratioWidth / ratioHeight);
|
|
8616
|
+
plan.video.height = targetResolution;
|
|
8617
|
+
} else {
|
|
8618
|
+
plan.video.width = targetResolution;
|
|
8619
|
+
plan.video.height = roundEven(targetResolution * ratioHeight / ratioWidth);
|
|
8620
|
+
}
|
|
8621
|
+
return plan;
|
|
8622
|
+
}
|
|
8623
|
+
|
|
8507
8624
|
function storyboardWorkflowInputFromParsedValue(parsed) {
|
|
8508
8625
|
if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) return null;
|
|
8509
8626
|
if (Array.isArray(parsed.steps)) return parsed;
|
|
@@ -8519,8 +8636,13 @@ function storyboardWorkflowInputFromParsedValue(parsed) {
|
|
|
8519
8636
|
const explicitCliVideoModel = options.videoModel
|
|
8520
8637
|
|| (cliSet.model && isSeedanceModelSelection(options.model) ? options.model : undefined);
|
|
8521
8638
|
const explicitCliImageModel = cliSet.model && !isSeedanceModelSelection(options.model) ? options.model : undefined;
|
|
8639
|
+
const storyboardVideoTargetResolution = Number.isFinite(parsed.videoTargetResolution)
|
|
8640
|
+
? parsed.videoTargetResolution
|
|
8641
|
+
: cliSet.targetResolution && Number.isFinite(options.targetResolution)
|
|
8642
|
+
? options.targetResolution
|
|
8643
|
+
: 1080;
|
|
8522
8644
|
|
|
8523
|
-
return buildStoryboardVideoHostedToolSequenceInput({
|
|
8645
|
+
return normalizeSeedance25StoryboardPlanDimensions(buildStoryboardVideoHostedToolSequenceInput({
|
|
8524
8646
|
storyline,
|
|
8525
8647
|
userIntentText: typeof parsed.userIntentText === 'string'
|
|
8526
8648
|
? parsed.userIntentText
|
|
@@ -8538,12 +8660,10 @@ function storyboardWorkflowInputFromParsedValue(parsed) {
|
|
|
8538
8660
|
: cliSet.duration && Number.isFinite(options.duration)
|
|
8539
8661
|
? options.duration
|
|
8540
8662
|
: undefined,
|
|
8541
|
-
videoTargetResolution:
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
: undefined,
|
|
8546
|
-
imageModel: typeof parsed.imageModel === 'string' ? parsed.imageModel : explicitCliImageModel,
|
|
8663
|
+
videoTargetResolution: storyboardVideoTargetResolution,
|
|
8664
|
+
imageModel: typeof parsed.imageModel === 'string'
|
|
8665
|
+
? parsed.imageModel
|
|
8666
|
+
: explicitCliImageModel ?? 'gpt-image-2.5-sunburst',
|
|
8547
8667
|
imageQuality: typeof parsed.imageQuality === 'string'
|
|
8548
8668
|
? parsed.imageQuality
|
|
8549
8669
|
: typeof parsed.gptImageQuality === 'string'
|
|
@@ -8556,15 +8676,17 @@ function storyboardWorkflowInputFromParsedValue(parsed) {
|
|
|
8556
8676
|
: cliSet.outputFormat
|
|
8557
8677
|
? options.outputFormat
|
|
8558
8678
|
: undefined,
|
|
8559
|
-
videoModel: typeof parsed.videoModel === 'string'
|
|
8679
|
+
videoModel: typeof parsed.videoModel === 'string'
|
|
8680
|
+
? parsed.videoModel
|
|
8681
|
+
: explicitCliVideoModel ?? 'seedance2-5',
|
|
8560
8682
|
generateAudio: typeof parsed.generateAudio === 'boolean' ? parsed.generateAudio : options.apiGenerateAudio ?? undefined,
|
|
8561
|
-
});
|
|
8683
|
+
}), storyboardVideoTargetResolution);
|
|
8562
8684
|
}
|
|
8563
8685
|
|
|
8564
8686
|
function buildStoryboardStorylineMessages() {
|
|
8565
8687
|
const durationLine = cliSet.duration && Number.isFinite(options.duration)
|
|
8566
8688
|
? `Target duration: ${options.duration} seconds.`
|
|
8567
|
-
: 'Target duration: infer a Seedance-safe duration between 4 and
|
|
8689
|
+
: 'Target duration: infer a Seedance 2.5-safe duration between 4 and 30 seconds from the request.';
|
|
8568
8690
|
const frameLine = Number.isFinite(options.storyboardFrames)
|
|
8569
8691
|
? `Storyboard beat count: exactly ${options.storyboardFrames}.`
|
|
8570
8692
|
: 'Storyboard beat count: infer a compact 4-8 beat plan unless the user asks otherwise.';
|
|
@@ -8572,13 +8694,13 @@ function buildStoryboardStorylineMessages() {
|
|
|
8572
8694
|
? `Video target short-side resolution: ${options.targetResolution}p.`
|
|
8573
8695
|
: '';
|
|
8574
8696
|
const system = [
|
|
8575
|
-
'You write production-ready video storyboard storylines for a GPT Image 2 storyboard sheet that will be rendered into a Seedance 2.
|
|
8697
|
+
'You write production-ready video storyboard storylines for a GPT Image 2.5 Sunburst storyboard sheet that will be rendered into a Seedance 2.5 video at 1080p.',
|
|
8576
8698
|
'Return only the storyline/script. Do not call tools, do not ask follow-up questions, and do not include markdown fences.',
|
|
8577
8699
|
'Use this exact plain-text structure so downstream compilers can parse it: Project Title, Total Duration, then one SCENE NN - Title block per beat.',
|
|
8578
8700
|
'Each scene block must put each field on its own line: TIME, PURPOSE, VISUAL, ACTION, CAMERA, LIGHTING/STYLE, TRANSITION, DIALOGUE/VO, AUDIO/SFX, MUSIC, VISIBLE TEXT.',
|
|
8579
8701
|
'When there is no spoken dialogue or voiceover, write DIALOGUE/VO: [no dialogue]. Do not write None, N/A, or leave it blank.',
|
|
8580
8702
|
'If the user requires exact visible text, repeat that exact text only in the relevant VISIBLE TEXT field and preserve spelling exactly.',
|
|
8581
|
-
'Keep it concise enough for one GPT Image 2 storyboard image and one Seedance video prompt, while preserving cause-and-effect story progression.',
|
|
8703
|
+
'Keep it concise enough for one GPT Image 2.5 Sunburst storyboard image and one Seedance 2.5 video prompt, while preserving cause-and-effect story progression.',
|
|
8582
8704
|
].join(' ');
|
|
8583
8705
|
const user = [
|
|
8584
8706
|
'Original user request:',
|
|
@@ -8646,19 +8768,22 @@ async function buildStoryboardVideoWorkflowInput(apiKey) {
|
|
|
8646
8768
|
const explicitCliVideoModel = options.videoModel
|
|
8647
8769
|
|| (cliSet.model && isSeedanceModelSelection(options.model) ? options.model : undefined);
|
|
8648
8770
|
const explicitCliImageModel = cliSet.model && !isSeedanceModelSelection(options.model) ? options.model : undefined;
|
|
8649
|
-
const
|
|
8771
|
+
const storyboardVideoTargetResolution = cliSet.targetResolution && Number.isFinite(options.targetResolution)
|
|
8772
|
+
? options.targetResolution
|
|
8773
|
+
: 1080;
|
|
8774
|
+
const plan = normalizeSeedance25StoryboardPlanDimensions(buildStoryboardVideoHostedToolSequenceInput({
|
|
8650
8775
|
storyline,
|
|
8651
8776
|
userIntentText: options.prompt,
|
|
8652
8777
|
title: options.apiWorkflowTitle,
|
|
8653
8778
|
frameCount: options.storyboardFrames ?? undefined,
|
|
8654
8779
|
videoDurationSec: cliSet.duration && Number.isFinite(options.duration) ? options.duration : undefined,
|
|
8655
|
-
videoTargetResolution:
|
|
8656
|
-
imageModel: explicitCliImageModel,
|
|
8780
|
+
videoTargetResolution: storyboardVideoTargetResolution,
|
|
8781
|
+
imageModel: explicitCliImageModel ?? 'gpt-image-2.5-sunburst',
|
|
8657
8782
|
imageQuality: storyboardWorkflowImageQualityFromCli(),
|
|
8658
8783
|
imageOutputFormat: cliSet.outputFormat ? options.outputFormat : undefined,
|
|
8659
|
-
videoModel: explicitCliVideoModel,
|
|
8784
|
+
videoModel: explicitCliVideoModel ?? 'seedance2-5',
|
|
8660
8785
|
generateAudio: options.apiGenerateAudio ?? undefined,
|
|
8661
|
-
});
|
|
8786
|
+
}), storyboardVideoTargetResolution);
|
|
8662
8787
|
return { plan, planningRaw: raw };
|
|
8663
8788
|
}
|
|
8664
8789
|
|
|
@@ -8911,7 +9036,7 @@ async function runLiveModels() {
|
|
|
8911
9036
|
//
|
|
8912
9037
|
// This path is deliberately socket-free and credential-free: the catalog is
|
|
8913
9038
|
// public, so `--list-loras` answers without connecting a worker session.
|
|
8914
|
-
async function
|
|
9039
|
+
async function fetchPublicLoraCatalog(modelId) {
|
|
8915
9040
|
const fixtureJson = getEnv('SOGNI_AGENT_TEST_LORA_CATALOG_JSON');
|
|
8916
9041
|
if (fixtureJson) {
|
|
8917
9042
|
const payload = JSON.parse(fixtureJson);
|
|
@@ -8975,6 +9100,43 @@ async function fetchLoraCatalog(modelId) {
|
|
|
8975
9100
|
}
|
|
8976
9101
|
}
|
|
8977
9102
|
|
|
9103
|
+
async function personalLoraRequest(path = '', init = {}) {
|
|
9104
|
+
const apiKey = requireApiKeyCredentials(loadCredentials(), 'Personal LoRAs');
|
|
9105
|
+
// Video preflight can run before the module's default timeout is initialized.
|
|
9106
|
+
const payload = await fetchApiJson(`/v1/loras/personal${path}`, { ...init, apiKey, timeoutMs: 30000 });
|
|
9107
|
+
if (payload?.status !== 'success' || !payload.data) throw new Error('Invalid personal LoRA response.');
|
|
9108
|
+
return payload.data;
|
|
9109
|
+
}
|
|
9110
|
+
|
|
9111
|
+
async function fetchLoraCatalog(modelId, includePersonal = false) {
|
|
9112
|
+
const catalog = await fetchPublicLoraCatalog(modelId);
|
|
9113
|
+
if (!includePersonal) return catalog;
|
|
9114
|
+
const personal = await personalLoraRequest('/catalog');
|
|
9115
|
+
if (!Array.isArray(personal.loras)) throw new Error('Invalid personal LoRA catalog.');
|
|
9116
|
+
return {
|
|
9117
|
+
...catalog,
|
|
9118
|
+
loras: [...catalog.loras, ...personal.loras.filter(row => !modelId || row.modelIds?.includes(modelId))],
|
|
9119
|
+
models: [...new Set([...(catalog.models || []), ...personal.loras.flatMap(row => row.modelIds || [])])].sort()
|
|
9120
|
+
};
|
|
9121
|
+
}
|
|
9122
|
+
|
|
9123
|
+
async function runPersonalLoras() {
|
|
9124
|
+
const action = options.personalLoraAction;
|
|
9125
|
+
const id = options.personalLoraValue;
|
|
9126
|
+
let data;
|
|
9127
|
+
if (action === 'import') {
|
|
9128
|
+
data = await personalLoraRequest('', { method: 'POST', body: {
|
|
9129
|
+
url: id, name: options.personalLoraName, modelId: options.personalLoraModel,
|
|
9130
|
+
rightsConfirmed: options.personalLoraRightsConfirmed
|
|
9131
|
+
} });
|
|
9132
|
+
} else if (action === 'remove') {
|
|
9133
|
+
data = await personalLoraRequest(`/${encodeURIComponent(id)}`, { method: 'DELETE' });
|
|
9134
|
+
} else {
|
|
9135
|
+
data = await personalLoraRequest(action === 'get' ? `/${encodeURIComponent(id)}` : '');
|
|
9136
|
+
}
|
|
9137
|
+
console.log(JSON.stringify({ success: true, type: 'personal-loras', action, data }, null, options.json ? undefined : 2));
|
|
9138
|
+
}
|
|
9139
|
+
|
|
8978
9140
|
function loraCatalogEntryFromPayload(entry) {
|
|
8979
9141
|
const ui = entry?.ui || {};
|
|
8980
9142
|
return {
|
|
@@ -9020,7 +9182,7 @@ async function runLoraCatalog() {
|
|
|
9020
9182
|
|
|
9021
9183
|
// The model filter is applied server-side by the catalog endpoint; category
|
|
9022
9184
|
// and free-text search are presentation-layer narrowing over what it returns.
|
|
9023
|
-
const catalog = await fetchLoraCatalog(modelFilter || undefined);
|
|
9185
|
+
const catalog = await fetchLoraCatalog(modelFilter || undefined, options.includePersonalLoras);
|
|
9024
9186
|
let loras = catalog.loras.map(loraCatalogEntryFromPayload).filter(entry => entry.loraId);
|
|
9025
9187
|
if (categoryFilter) loras = loras.filter(entry => normalizeLiveModelTag(entry.category) === categoryFilter);
|
|
9026
9188
|
if (normalizedQuery) {
|
|
@@ -12730,6 +12892,11 @@ async function main() {
|
|
|
12730
12892
|
return;
|
|
12731
12893
|
}
|
|
12732
12894
|
|
|
12895
|
+
if (options.personalLoraAction) {
|
|
12896
|
+
await runPersonalLoras();
|
|
12897
|
+
return;
|
|
12898
|
+
}
|
|
12899
|
+
|
|
12733
12900
|
if (options.loraCatalogAction) {
|
|
12734
12901
|
await runLoraCatalog();
|
|
12735
12902
|
return;
|
|
@@ -13807,8 +13974,9 @@ async function main() {
|
|
|
13807
13974
|
if (isMiniMaxH3TwoStageModel(options.model) && !options.quiet) {
|
|
13808
13975
|
// Two-stage renders this canvas and delivers twice it: same frames and audio.
|
|
13809
13976
|
const delivered = minimaxH3TwoStageDeliveredSize(projectConfig.width, projectConfig.height);
|
|
13977
|
+
const twoStageLabel = isMiniMaxH3R2vModel(options.model) ? 'Ref2VA Two-Stage' : 'FastH3 Two-Stage';
|
|
13810
13978
|
console.error(
|
|
13811
|
-
`MiniMax H3
|
|
13979
|
+
`MiniMax H3 ${twoStageLabel}: delivered at ${delivered.width}x${delivered.height} ` +
|
|
13812
13980
|
`(twice the ${projectConfig.width}x${projectConfig.height} canvas), same length and audio.`
|
|
13813
13981
|
);
|
|
13814
13982
|
}
|
package/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PACKAGE_VERSION = '3.
|
|
1
|
+
export const PACKAGE_VERSION = '3.52.0';
|