@sogni-ai/sogni-intelligence-client 4.22.10 → 4.23.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/README.md +1 -0
- package/dist/contracts/imagePrompt.d.ts +1 -0
- package/dist/contracts/imagePrompt.d.ts.map +1 -1
- package/dist/contracts/imagePrompt.js +4 -4
- package/dist/contracts/imagePrompt.js.map +1 -1
- package/dist/prompt-guides/happyhorse.d.ts +8 -0
- package/dist/prompt-guides/happyhorse.d.ts.map +1 -0
- package/dist/prompt-guides/happyhorse.js +55 -0
- package/dist/prompt-guides/happyhorse.js.map +1 -0
- package/dist/prompt-guides/image.d.ts +5 -0
- package/dist/prompt-guides/image.d.ts.map +1 -0
- package/dist/prompt-guides/image.js +80 -0
- package/dist/prompt-guides/image.js.map +1 -0
- package/dist/prompt-guides/index.d.ts +9 -0
- package/dist/prompt-guides/index.d.ts.map +1 -0
- package/dist/prompt-guides/index.js +70 -0
- package/dist/prompt-guides/index.js.map +1 -0
- package/dist/prompt-guides/ltx.d.ts +8 -0
- package/dist/prompt-guides/ltx.d.ts.map +1 -0
- package/dist/prompt-guides/ltx.js +135 -0
- package/dist/prompt-guides/ltx.js.map +1 -0
- package/dist/prompt-guides/minimax.d.ts +31 -0
- package/dist/prompt-guides/minimax.d.ts.map +1 -0
- package/dist/prompt-guides/minimax.js +172 -0
- package/dist/prompt-guides/minimax.js.map +1 -0
- package/dist/prompt-guides/registry.d.ts +7 -0
- package/dist/prompt-guides/registry.d.ts.map +1 -0
- package/dist/prompt-guides/registry.js +100 -0
- package/dist/prompt-guides/registry.js.map +1 -0
- package/dist/prompt-guides/seedance.d.ts +10 -0
- package/dist/prompt-guides/seedance.d.ts.map +1 -0
- package/dist/prompt-guides/seedance.js +155 -0
- package/dist/prompt-guides/seedance.js.map +1 -0
- package/dist/prompt-guides/shared.d.ts +3 -0
- package/dist/prompt-guides/shared.d.ts.map +1 -0
- package/dist/prompt-guides/shared.js +6 -0
- package/dist/prompt-guides/shared.js.map +1 -0
- package/dist/prompt-guides/types.d.ts +19 -0
- package/dist/prompt-guides/types.d.ts.map +1 -0
- package/dist/prompt-guides/types.js +15 -0
- package/dist/prompt-guides/types.js.map +1 -0
- package/dist/prompt-guides/wan.d.ts +3 -0
- package/dist/prompt-guides/wan.d.ts.map +1 -0
- package/dist/prompt-guides/wan.js +78 -0
- package/dist/prompt-guides/wan.js.map +1 -0
- package/dist/prompt-guides/wan3.d.ts +12 -0
- package/dist/prompt-guides/wan3.d.ts.map +1 -0
- package/dist/prompt-guides/wan3.js +51 -0
- package/dist/prompt-guides/wan3.js.map +1 -0
- package/dist-esm/contracts/imagePrompt.js +1 -1
- package/dist-esm/contracts/imagePrompt.js.map +1 -1
- package/dist-esm/prompt-guides/happyhorse.js +52 -0
- package/dist-esm/prompt-guides/happyhorse.js.map +1 -0
- package/dist-esm/prompt-guides/image.js +77 -0
- package/dist-esm/prompt-guides/image.js.map +1 -0
- package/dist-esm/prompt-guides/index.js +8 -0
- package/dist-esm/prompt-guides/index.js.map +1 -0
- package/dist-esm/prompt-guides/ltx.js +132 -0
- package/dist-esm/prompt-guides/ltx.js.map +1 -0
- package/dist-esm/prompt-guides/minimax.js +169 -0
- package/dist-esm/prompt-guides/minimax.js.map +1 -0
- package/dist-esm/prompt-guides/registry.js +95 -0
- package/dist-esm/prompt-guides/registry.js.map +1 -0
- package/dist-esm/prompt-guides/seedance.js +152 -0
- package/dist-esm/prompt-guides/seedance.js.map +1 -0
- package/dist-esm/prompt-guides/shared.js +3 -0
- package/dist-esm/prompt-guides/shared.js.map +1 -0
- package/dist-esm/prompt-guides/types.js +12 -0
- package/dist-esm/prompt-guides/types.js.map +1 -0
- package/dist-esm/prompt-guides/wan.js +75 -0
- package/dist-esm/prompt-guides/wan.js.map +1 -0
- package/dist-esm/prompt-guides/wan3.js +48 -0
- package/dist-esm/prompt-guides/wan3.js.map +1 -0
- package/package.json +11 -2
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { resolveImagePromptAuthoringProfile } from '../contracts/imagePrompt.js';
|
|
2
|
+
import { minimaxH3AudioGuideMode } from '../media/videoSettings.js';
|
|
3
|
+
import { inferVideoWorkflowFromModel, resolveImageModelAlias, resolveVideoModelAlias, } from '../public-skill-runtime/index.js';
|
|
4
|
+
import { isSeedance25VideoModelId } from '../utils/seedanceModelIds.js';
|
|
5
|
+
import { isRegisteredLooseReferenceVideoModelId, resolveRegisteredVideoModelFamily, } from '../utils/videoModelIds.js';
|
|
6
|
+
import { HAPPYHORSE_PROMPT_GUIDES } from './happyhorse.js';
|
|
7
|
+
import { IMAGE_PROMPT_GUIDE_KEYS, IMAGE_PROMPT_GUIDES } from './image.js';
|
|
8
|
+
import { LTX_PROMPT_GUIDES } from './ltx.js';
|
|
9
|
+
import { MINIMAX_PROMPT_GUIDES } from './minimax.js';
|
|
10
|
+
import { SEEDANCE_PROMPT_GUIDES } from './seedance.js';
|
|
11
|
+
import { WAN_PROMPT_GUIDES } from './wan.js';
|
|
12
|
+
import { WAN3_PROMPT_GUIDES } from './wan3.js';
|
|
13
|
+
export const MODEL_PROMPT_GUIDES = Object.freeze({
|
|
14
|
+
...SEEDANCE_PROMPT_GUIDES,
|
|
15
|
+
...LTX_PROMPT_GUIDES,
|
|
16
|
+
...WAN_PROMPT_GUIDES,
|
|
17
|
+
...WAN3_PROMPT_GUIDES,
|
|
18
|
+
...HAPPYHORSE_PROMPT_GUIDES,
|
|
19
|
+
...MINIMAX_PROMPT_GUIDES,
|
|
20
|
+
...IMAGE_PROMPT_GUIDES,
|
|
21
|
+
});
|
|
22
|
+
const VIDEO_MODE_SYNONYMS = { flf2v: 'flf' };
|
|
23
|
+
function videoGuideFamily(modelId) {
|
|
24
|
+
switch (resolveRegisteredVideoModelFamily(modelId)) {
|
|
25
|
+
case 'seedance':
|
|
26
|
+
return isSeedance25VideoModelId(modelId) ? 'seedance-2.5' : 'seedance-2.0';
|
|
27
|
+
case 'ltx25':
|
|
28
|
+
return 'ltx-2.5';
|
|
29
|
+
case 'ltx23':
|
|
30
|
+
case 'ltx2':
|
|
31
|
+
return 'ltx-2.3';
|
|
32
|
+
case 'wan22':
|
|
33
|
+
return 'wan-2.2';
|
|
34
|
+
case 'wan3':
|
|
35
|
+
return 'wan-3';
|
|
36
|
+
case 'happyhorse-1.1':
|
|
37
|
+
return 'happyhorse-1.1';
|
|
38
|
+
case 'minimax-h3':
|
|
39
|
+
return 'minimax-h3';
|
|
40
|
+
default:
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function modelIdSegments(modelId) {
|
|
45
|
+
return modelId.toLowerCase().split('_').join('-').split('.').join('-').split('-');
|
|
46
|
+
}
|
|
47
|
+
function videoModeForModel(family, modelId) {
|
|
48
|
+
const audioGuideMode = family === 'minimax-h3' ? minimaxH3AudioGuideMode(modelId) : null;
|
|
49
|
+
if (audioGuideMode)
|
|
50
|
+
return audioGuideMode;
|
|
51
|
+
if (isRegisteredLooseReferenceVideoModelId(modelId))
|
|
52
|
+
return 'r2v';
|
|
53
|
+
if (modelIdSegments(modelId).includes('flf2v'))
|
|
54
|
+
return 'flf';
|
|
55
|
+
const workflow = inferVideoWorkflowFromModel(modelId);
|
|
56
|
+
return workflow && MODEL_PROMPT_GUIDES[family][workflow] ? workflow : 't2v';
|
|
57
|
+
}
|
|
58
|
+
export function getModelPromptGuide(modelOrAlias, mode) {
|
|
59
|
+
const model = typeof modelOrAlias === 'string' ? modelOrAlias.trim() : '';
|
|
60
|
+
if (!model)
|
|
61
|
+
return null;
|
|
62
|
+
const requestedMode = typeof mode === 'string' && mode.trim() ? mode.trim().toLowerCase() : undefined;
|
|
63
|
+
const videoModelId = resolveVideoModelAlias(model) || model;
|
|
64
|
+
const videoFamily = videoGuideFamily(videoModelId);
|
|
65
|
+
if (videoFamily) {
|
|
66
|
+
const videoMode = requestedMode
|
|
67
|
+
? VIDEO_MODE_SYNONYMS[requestedMode] ?? requestedMode
|
|
68
|
+
: videoModeForModel(videoFamily, videoModelId);
|
|
69
|
+
return MODEL_PROMPT_GUIDES[videoFamily][videoMode] ?? null;
|
|
70
|
+
}
|
|
71
|
+
const profile = resolveImagePromptAuthoringProfile(model, requestedMode)
|
|
72
|
+
?? resolveImagePromptAuthoringProfile(resolveImageModelAlias(model) || model, requestedMode);
|
|
73
|
+
const key = profile ? IMAGE_PROMPT_GUIDE_KEYS[profile.promptingType] : null;
|
|
74
|
+
return key ? MODEL_PROMPT_GUIDES[key[0]][key[1]] ?? null : null;
|
|
75
|
+
}
|
|
76
|
+
const AGENT_READING_NOTE = "Each rule below is quoted from the system prompt Sogni's own prompt writer uses for this model and mode, so some rules speak to that writer about its base request or user message.";
|
|
77
|
+
export function renderModelPromptGuide(guide, options) {
|
|
78
|
+
if (options.audience === 'shaper')
|
|
79
|
+
return guide.rules.join('\n\n');
|
|
80
|
+
if (options.audience !== 'agent') {
|
|
81
|
+
throw new Error(`Unknown prompt guide audience "${String(options.audience)}": use "agent" or "shaper".`);
|
|
82
|
+
}
|
|
83
|
+
const sections = [
|
|
84
|
+
`# ${guide.title}`,
|
|
85
|
+
`Guide: ${guide.family} ${guide.mode}\nModels: ${guide.models.join(', ')}`,
|
|
86
|
+
AGENT_READING_NOTE,
|
|
87
|
+
];
|
|
88
|
+
if (guide.referenceGrammar !== null)
|
|
89
|
+
sections.push('## Reference grammar', guide.referenceGrammar);
|
|
90
|
+
sections.push('## Rules', ...guide.rules.filter((rule) => rule !== guide.referenceGrammar));
|
|
91
|
+
if (guide.notes.length > 0)
|
|
92
|
+
sections.push('## Model notes', guide.notes.map((note) => `- ${note}`).join('\n'));
|
|
93
|
+
return sections.join('\n\n');
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/prompt-guides/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM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AAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,kCAAkC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,6BAA6B,CAAC,CAAC;IAC3G,CAAC;IACD,MAAM,QAAQ,GAAG;QACf,KAAK,KAAK,CAAC,KAAK,EAAE;QAClB,UAAU,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,aAAa,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QAC1E,kBAAkB;KACnB,CAAC;IACF,IAAI,KAAK,CAAC,gBAAgB,KAAK,IAAI;QAAE,QAAQ,CAAC,IAAI,CAAC,sBAAsB,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACnG,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC5F,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,QAAQ,CAAC,IAAI,CAAC,gBAAgB,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/G,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { modelPromptGuide } from './types.js';
|
|
2
|
+
export const SEEDANCE_25_CAPABILITY_GUIDANCE = `TARGET CAPABILITIES: Seedance 2.5 uses the same director-style prompt grammar and per-modality @Image / @Video / @Audio reference syntax as the Seedance 2.0 series. Its capability envelope is larger: 4-30 second clips and up to 30 image references, 10 video references, and 10 audio references, with 50 files total across those per-modality caps. For new footage longer than 15 seconds, use a coherent chronology with time-coded beats that cover the requested duration; do not split the request into multiple clips.`;
|
|
3
|
+
export const SEEDANCE_REFERENCE_GRAMMAR_GUIDANCE = `REFERENCE GRAMMAR: Use BytePlus-style @ tags as the canonical prompt-visible reference labels. Refer to attached assets by 1-indexed counters per modality, written exactly as @Image1, @Video1, or @Audio1 with no brackets and no spaces. Counting is independent per modality and follows attachment order. If the base request uses aliases such as Image 1, Video 2, Audio 1, @Image 1, or @Video 2, normalize them to @Image1, @Video2, or @Audio1 in the rewritten prompt. Never mention reference URLs or asset IDs.`;
|
|
4
|
+
export const SEEDANCE_REFERENCE_ROLE_GUIDANCE = `REFERENCE ROLE DISCIPLINE: Assign every useful reference asset a clear creative role. Do not write vague phrases like "use the attached files." State whether each useful file is an edit target or only a reference. Use role language such as "Use @Image1 as the character identity reference," "Use @Image2 for wardrobe and color palette," "Use @Video1 for camera movement and action timing only," or "Use @Audio1 as the rhythm and background music guide."`;
|
|
5
|
+
export const SEEDANCE_DIRECTORIAL_GUIDANCE = `DIRECTORIAL BRIEF: Write like a concise director's shot brief, not a static image caption. Include concrete physical interactions, motion timing, mood, lighting, and sound cues that help the model understand both what the scene looks like and how it changes over time. Turn each quality the shot must convey, such as speed, size, weight, danger or feeling, into what a camera and microphone would capture at real-world proportions, because the model renders what it can see and hear, not a number or an adjective.`;
|
|
6
|
+
export const SEEDANCE_CAMERA_PHYSICS_GUIDANCE = `CAMERA AND PHYSICS: Prefer one primary camera move. Separate subject motion from camera motion. Describe pace in words that match the shot instead of technical camera settings: slow, smooth, gradual, or controlled for calm moments; for fast action, show the speed through what rushes past the camera, the ground covered within a beat, and impacts with their consequences, because a stated speed or the word "fast" alone renders slower than intended. Ground action in physical details such as fabric movement, reflections, dust, water, contact, momentum, and object interaction when relevant.`;
|
|
7
|
+
export const SEEDANCE_POSITIVE_CONSTRAINT_GUIDANCE = `POSITIVE CONSTRAINTS: Prefer positive preservation language over negative-only phrasing. Say "Keep the logo crisp and readable," "Maintain the same face structure, outfit, silhouette, and proportions from @Image1," and "Keep every person, prop and color consistent from the first frame to the last."`;
|
|
8
|
+
const SEEDANCE_SPEECH_LINE_GUIDANCE = `SPEECH: Write every spoken line in double quotes with who says it, and state plainly that an on-screen speaker's lips move with the words.`;
|
|
9
|
+
export const SEEDANCE_LIMITATION_GUIDANCE = `${SEEDANCE_SPEECH_LINE_GUIDANCE} When the request gives an @Audio reference the role of a person's voice, keep that role: it is the character's voice identity, not background music or the soundtrack.`;
|
|
10
|
+
const SEEDANCE_VISIBLE_TEXT_GUIDANCE = `VISIBLE TEXT: Put every word that must appear on screen in double quotes after "reads", such as a sign that reads "OPEN 24H", with the request's exact spelling.`;
|
|
11
|
+
const SEEDANCE_SHOT_GUIDANCE = `SHOTS: Use one continuous shot when the request describes one continuous action, place or camera move, and separate shots when it asks for cuts or a montage or moves between places, viewpoints or moments. Open each new shot with its own time-coded beat that names the cut, such as "4-7s: Cut to a close-up of ...".`;
|
|
12
|
+
const SEEDANCE_FRAME_SHOT_GUIDANCE = `SHOTS: Keep one continuous shot unless the request asks for a cut; then open the new shot with its own time-coded beat that names the cut, such as "3-5s: Cut to a close-up of ...".`;
|
|
13
|
+
const SEEDANCE_LENGTH_GUIDANCE = `LENGTH: About 80–150 words for a single-beat shot, plus about 30–50 words for each further time-coded beat. Never drop a detail, beat, quoted line or reference role from the request to save words.`;
|
|
14
|
+
const SEEDANCE_FRAME_PROMPT_ANATOMY_GUIDANCE = `PROMPT ANATOMY: Include task intent, subject/action, scene, camera, style/lighting, requested audio behavior, continuity, and any final message only when needed. For multi-beat clips, use compact time-coded beats or shot-script phrasing instead of a dense unordered list.`;
|
|
15
|
+
const SEEDANCE_FRAME_POSITIVE_CONSTRAINT_GUIDANCE = `POSITIVE CONSTRAINTS: Prefer positive preservation language over negative-only phrasing. Describe consistent temporal continuity, motion at the pace the request calls for, and preservation of the supplied frame's face structure, outfit, silhouette, proportions, and composition when relevant.`;
|
|
16
|
+
const SEEDANCE_PROMPT_ANATOMY_GUIDANCE = `PROMPT ANATOMY: Include task intent, reference-role assignments, subject/action, scene, camera, style/lighting, audio behavior, continuity, and any final message only when needed. For multi-beat clips, use compact time-coded beats or shot-script phrasing instead of a dense unordered list.`;
|
|
17
|
+
const SEEDANCE_FORMAT_GUIDANCE = `FORMAT: Single present-tense paragraph of short sentences. No bullets, headers, markdown, preamble, or labels. Output ONLY the rewritten prompt.`;
|
|
18
|
+
const SEEDANCE_CAMERA_GUIDANCE = `CAMERA: Choose one primary camera behavior for the shot or beat in concrete cinematographic language, matched to scene geometry, subject motion, and mood. The camera may move, hold a POV, or stay locked/static when stillness best serves the shot. Keep camera motion separate from subject motion and do not stack multiple camera moves in one sentence.`;
|
|
19
|
+
const SEEDANCE_TIME_CODED_BEATS_GUIDANCE = `TIME-CODED BEATS: For clips longer than 5 seconds, segment the action with time-coded beats such as "0-2s: ..., 2-4s: ..., 4-6s: ...".`;
|
|
20
|
+
const SEEDANCE_FRAME_DIALOGUE_AUDIO_GUIDANCE = `DIALOGUE & AUDIO: Preserve quoted dialogue verbatim. Foley and ambience belong in plain sentences. Do not invent music when none was requested.`;
|
|
21
|
+
const SEEDANCE_FRAME_DISCIPLINE_GUIDANCE = `FRAME DISCIPLINE: Treat the supplied images as locked native frame parameters. Do not emit @Image tags. Rather than re-describing the frames, name the few visible traits that must hold through the motion, such as hair, outfit and colors.`;
|
|
22
|
+
const SEEDANCE_PROPER_NOUN_GUIDANCE = `PROPER NOUNS: Preserve exact spelling and punctuation of brand or product names from the base request, including dotted names such as Sogni.ai.`;
|
|
23
|
+
const SEEDANCE_AVOID_GUIDANCE = `AVOID: Contradictions, semicolons, em dashes, parentheticals.`;
|
|
24
|
+
const SEEDANCE_I2V_ANCHOR_GUIDANCE = `ANCHOR DISCIPLINE: Treat the supplied image as the locked first-frame anchor. Do not emit an @Image tag. Describe motion, action, and camera that flow forward from it, naming only the few visible traits that must hold as things move, such as hair, outfit and colors, rather than re-describing the frame.`;
|
|
25
|
+
const SEEDANCE_I2V_AVOID_GUIDANCE = `AVOID: Contradictions, semicolons, em dashes, parentheticals, and any reference to a second frame, target frame, or interpolation toward another input.`;
|
|
26
|
+
const SEEDANCE_L2V_ANCHOR_GUIDANCE = `ANCHOR DISCIPLINE: Treat the supplied image as the locked last-frame anchor. Do not emit an @Image tag. Describe motion, action, and camera that naturally arrive at it, naming only the few visible traits that must hold as things move, such as hair, outfit and colors, rather than re-describing the frame. Never claim the supplied image is the opening frame.`;
|
|
27
|
+
const SEEDANCE_L2V_CAMERA_GUIDANCE = `CAMERA: Choose one primary camera behavior for the shot or beat in concrete cinematographic language, matched to scene geometry, subject motion, and mood. Keep camera motion separate from subject motion and do not stack multiple camera moves in one sentence.`;
|
|
28
|
+
const SEEDANCE_L2V_AVOID_GUIDANCE = `AVOID: Contradictions, semicolons, em dashes, parentheticals, and phrasing that treats the supplied ending frame as an opening image.`;
|
|
29
|
+
const SEEDANCE_V2V_ANCHOR_GUIDANCE = `ANCHOR DISCIPLINE: When the request edits or restyles @Video1, write it as an edit: open with "Edit @Video1.", say what changes (for example "Replace the red car with the blue pickup from @Image1"), then name in one short line what stays the same, such as camera path, timing, people and setting. Do not retell the source clip shot by shot. When the request extends @Video1 or uses it only for motion, camera or timing, give it that role and describe the new footage.`;
|
|
30
|
+
const SEEDANCE_V2V_CAMERA_GUIDANCE = `CAMERA: When the camera should change, choose one primary camera behavior for the shot or beat in concrete cinematographic language, matched to scene geometry, subject motion, and mood. The camera may move, hold a POV, or stay locked/static when stillness best serves the shot. Keep camera motion separate from subject motion and do not stack multiple camera moves in one sentence. When the transform is restyle-only, call out that the camera mirrors @Video1.`;
|
|
31
|
+
const SEEDANCE_V2V_TIME_CODED_BEATS_GUIDANCE = `TIME-CODED BEATS: For an extension or new footage longer than 5 seconds, segment the action with time-coded beats such as "0-2s: ..., 2-4s: ..., 4-6s: ...". An edit of @Video1 takes no timeline: @Video1 supplies the timing, and a timeline makes Seedance treat the edit as an extension.`;
|
|
32
|
+
const SEEDANCE_V2V_DIALOGUE_AUDIO_GUIDANCE = `DIALOGUE & AUDIO: Preserve quoted dialogue verbatim. When an audio reference is present, assign the relevant @Audio tag its role as background music, rhythm guide, sound bed, or speech reference based on the request. Foley and ambience belong in plain sentences. Do not invent music when none was requested.`;
|
|
33
|
+
const SEEDANCE_V2V_SUBJECT_IDENTITY_GUIDANCE = `SUBJECT IDENTITY: When image references are present alongside the reference video, anchor identity by reference (for example "the woman from @Image1") and add the few visible traits that must hold, such as hair, outfit and colors, when they matter to the shot.`;
|
|
34
|
+
const SEEDANCE_V2V_AVOID_GUIDANCE = `AVOID: Contradictions, semicolons, em dashes, parentheticals, and any phrasing that treats the reference video as a still image or pair of frames.`;
|
|
35
|
+
const SEEDANCE_T2V_REFERENCE_MEDIA_GUIDANCE = `When reference videos are listed, use them only for the role requested, such as camera movement, action timing, edit rhythm, or visual effects. When audio references are listed, assign them as soundtrack, rhythm guide, speech reference, or ambience based on the request.`;
|
|
36
|
+
const SEEDANCE_T2V_DIALOGUE_AUDIO_GUIDANCE = `DIALOGUE & AUDIO: Seedance generates synchronized audio natively. Preserve quoted dialogue verbatim. Add foley and ambience as plain sentences. Do not invent music when none was requested.`;
|
|
37
|
+
const SEEDANCE_25_NOTES = [
|
|
38
|
+
'Use @Image1, @Video1, and @Audio1 tags without brackets or spaces.',
|
|
39
|
+
'Assign every useful reference asset a concrete role.',
|
|
40
|
+
'Use one 4-30 second call for a continuous clip when the requested duration fits.',
|
|
41
|
+
'Prefer positive preservation constraints and concise time-coded beats for longer clips.',
|
|
42
|
+
'Write each spoken line in double quotes with its speaker, keeping the user\'s words exactly, and on-screen text in double quotes after "reads".',
|
|
43
|
+
];
|
|
44
|
+
const SEEDANCE_20_NOTES = [
|
|
45
|
+
'Use @Image1, @Video1, and @Audio1 tags without brackets or spaces.',
|
|
46
|
+
'Assign every useful reference asset a concrete role.',
|
|
47
|
+
'Prefer positive preservation constraints and concise time-coded beats for longer clips.',
|
|
48
|
+
'Write each spoken line in double quotes with its speaker, keeping the user\'s words exactly, and on-screen text in double quotes after "reads".',
|
|
49
|
+
];
|
|
50
|
+
const SEEDANCE_FRAME_CREATIVE_RULES = [
|
|
51
|
+
SEEDANCE_DIRECTORIAL_GUIDANCE,
|
|
52
|
+
SEEDANCE_FRAME_PROMPT_ANATOMY_GUIDANCE,
|
|
53
|
+
SEEDANCE_CAMERA_PHYSICS_GUIDANCE,
|
|
54
|
+
SEEDANCE_FRAME_POSITIVE_CONSTRAINT_GUIDANCE,
|
|
55
|
+
SEEDANCE_FRAME_SHOT_GUIDANCE,
|
|
56
|
+
SEEDANCE_SPEECH_LINE_GUIDANCE,
|
|
57
|
+
SEEDANCE_VISIBLE_TEXT_GUIDANCE,
|
|
58
|
+
];
|
|
59
|
+
const SEEDANCE_COMMON_CREATIVE_RULES = [
|
|
60
|
+
SEEDANCE_REFERENCE_GRAMMAR_GUIDANCE,
|
|
61
|
+
SEEDANCE_REFERENCE_ROLE_GUIDANCE,
|
|
62
|
+
SEEDANCE_DIRECTORIAL_GUIDANCE,
|
|
63
|
+
SEEDANCE_PROMPT_ANATOMY_GUIDANCE,
|
|
64
|
+
SEEDANCE_CAMERA_PHYSICS_GUIDANCE,
|
|
65
|
+
SEEDANCE_POSITIVE_CONSTRAINT_GUIDANCE,
|
|
66
|
+
SEEDANCE_SHOT_GUIDANCE,
|
|
67
|
+
SEEDANCE_LIMITATION_GUIDANCE,
|
|
68
|
+
SEEDANCE_VISIBLE_TEXT_GUIDANCE,
|
|
69
|
+
];
|
|
70
|
+
const SEEDANCE_RULES = {
|
|
71
|
+
t2v: [
|
|
72
|
+
...SEEDANCE_COMMON_CREATIVE_RULES,
|
|
73
|
+
SEEDANCE_T2V_REFERENCE_MEDIA_GUIDANCE,
|
|
74
|
+
SEEDANCE_FORMAT_GUIDANCE,
|
|
75
|
+
SEEDANCE_CAMERA_GUIDANCE,
|
|
76
|
+
SEEDANCE_TIME_CODED_BEATS_GUIDANCE,
|
|
77
|
+
SEEDANCE_T2V_DIALOGUE_AUDIO_GUIDANCE,
|
|
78
|
+
SEEDANCE_PROPER_NOUN_GUIDANCE,
|
|
79
|
+
SEEDANCE_AVOID_GUIDANCE,
|
|
80
|
+
SEEDANCE_LENGTH_GUIDANCE,
|
|
81
|
+
],
|
|
82
|
+
i2v: [
|
|
83
|
+
...SEEDANCE_FRAME_CREATIVE_RULES,
|
|
84
|
+
SEEDANCE_I2V_ANCHOR_GUIDANCE,
|
|
85
|
+
SEEDANCE_FORMAT_GUIDANCE,
|
|
86
|
+
SEEDANCE_CAMERA_GUIDANCE,
|
|
87
|
+
SEEDANCE_TIME_CODED_BEATS_GUIDANCE,
|
|
88
|
+
SEEDANCE_FRAME_DIALOGUE_AUDIO_GUIDANCE,
|
|
89
|
+
SEEDANCE_PROPER_NOUN_GUIDANCE,
|
|
90
|
+
SEEDANCE_I2V_AVOID_GUIDANCE,
|
|
91
|
+
SEEDANCE_LENGTH_GUIDANCE,
|
|
92
|
+
],
|
|
93
|
+
l2v: [
|
|
94
|
+
...SEEDANCE_FRAME_CREATIVE_RULES,
|
|
95
|
+
SEEDANCE_L2V_ANCHOR_GUIDANCE,
|
|
96
|
+
SEEDANCE_FORMAT_GUIDANCE,
|
|
97
|
+
SEEDANCE_L2V_CAMERA_GUIDANCE,
|
|
98
|
+
SEEDANCE_TIME_CODED_BEATS_GUIDANCE,
|
|
99
|
+
SEEDANCE_FRAME_DIALOGUE_AUDIO_GUIDANCE,
|
|
100
|
+
SEEDANCE_PROPER_NOUN_GUIDANCE,
|
|
101
|
+
SEEDANCE_L2V_AVOID_GUIDANCE,
|
|
102
|
+
SEEDANCE_LENGTH_GUIDANCE,
|
|
103
|
+
],
|
|
104
|
+
flf: [
|
|
105
|
+
...SEEDANCE_FRAME_CREATIVE_RULES,
|
|
106
|
+
SEEDANCE_FORMAT_GUIDANCE,
|
|
107
|
+
SEEDANCE_CAMERA_GUIDANCE,
|
|
108
|
+
SEEDANCE_TIME_CODED_BEATS_GUIDANCE,
|
|
109
|
+
SEEDANCE_FRAME_DIALOGUE_AUDIO_GUIDANCE,
|
|
110
|
+
SEEDANCE_FRAME_DISCIPLINE_GUIDANCE,
|
|
111
|
+
SEEDANCE_PROPER_NOUN_GUIDANCE,
|
|
112
|
+
SEEDANCE_AVOID_GUIDANCE,
|
|
113
|
+
SEEDANCE_LENGTH_GUIDANCE,
|
|
114
|
+
],
|
|
115
|
+
v2v: [
|
|
116
|
+
...SEEDANCE_COMMON_CREATIVE_RULES,
|
|
117
|
+
SEEDANCE_V2V_ANCHOR_GUIDANCE,
|
|
118
|
+
SEEDANCE_FORMAT_GUIDANCE,
|
|
119
|
+
SEEDANCE_V2V_CAMERA_GUIDANCE,
|
|
120
|
+
SEEDANCE_V2V_TIME_CODED_BEATS_GUIDANCE,
|
|
121
|
+
SEEDANCE_V2V_DIALOGUE_AUDIO_GUIDANCE,
|
|
122
|
+
SEEDANCE_V2V_SUBJECT_IDENTITY_GUIDANCE,
|
|
123
|
+
SEEDANCE_PROPER_NOUN_GUIDANCE,
|
|
124
|
+
SEEDANCE_V2V_AVOID_GUIDANCE,
|
|
125
|
+
SEEDANCE_LENGTH_GUIDANCE,
|
|
126
|
+
],
|
|
127
|
+
};
|
|
128
|
+
const SEEDANCE_MODE_TITLES = {
|
|
129
|
+
t2v: 'text-to-video and loose references',
|
|
130
|
+
i2v: 'first-frame image-to-video',
|
|
131
|
+
l2v: 'last-frame image-to-video',
|
|
132
|
+
flf: 'first-and-last-frame video',
|
|
133
|
+
v2v: 'video-to-video: edit, extend or reference a source video',
|
|
134
|
+
};
|
|
135
|
+
function seedanceGuides(family, models, notes) {
|
|
136
|
+
const modelTitle = family === 'seedance-2.5' ? 'Seedance 2.5' : 'Seedance 2.0';
|
|
137
|
+
const guide = (mode) => modelPromptGuide({
|
|
138
|
+
family,
|
|
139
|
+
mode,
|
|
140
|
+
title: `${modelTitle} ${SEEDANCE_MODE_TITLES[mode]}`,
|
|
141
|
+
models,
|
|
142
|
+
referenceGrammar: mode === 't2v' || mode === 'v2v' ? SEEDANCE_REFERENCE_GRAMMAR_GUIDANCE : null,
|
|
143
|
+
rules: family === 'seedance-2.5' ? [...SEEDANCE_RULES[mode], SEEDANCE_25_CAPABILITY_GUIDANCE] : SEEDANCE_RULES[mode],
|
|
144
|
+
notes,
|
|
145
|
+
});
|
|
146
|
+
return { t2v: guide('t2v'), i2v: guide('i2v'), l2v: guide('l2v'), flf: guide('flf'), v2v: guide('v2v') };
|
|
147
|
+
}
|
|
148
|
+
export const SEEDANCE_PROMPT_GUIDES = {
|
|
149
|
+
'seedance-2.0': seedanceGuides('seedance-2.0', ['seedance2', 'seedance2-mini', 'seedance2-mini-uncensored'], SEEDANCE_20_NOTES),
|
|
150
|
+
'seedance-2.5': seedanceGuides('seedance-2.5', ['seedance2-5', 'seedance2-5-uncensored'], SEEDANCE_25_NOTES),
|
|
151
|
+
};
|
|
152
|
+
//# sourceMappingURL=seedance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seedance.js","sourceRoot":"","sources":["../../src/prompt-guides/seedance.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,gBAAgB,EAAwD,MAAM,YAAY,CAAC;AAEpG,MAAM,CAAC,MAAM,+BAA+B,GAAG,qgBAAqgB,CAAC;AAErjB,MAAM,CAAC,MAAM,mCAAmC,GAAG,8fAA8f,CAAC;AAEljB,MAAM,CAAC,MAAM,gCAAgC,GAAG,ucAAuc,CAAC;AAExf,MAAM,CAAC,MAAM,6BAA6B,GAAG,mgBAAmgB,CAAC;AAEjjB,MAAM,CAAC,MAAM,gCAAgC,GAAG,ilBAAilB,CAAC;AAEloB,MAAM,CAAC,MAAM,qCAAqC,GAAG,6SAA6S,CAAC;AAEnW,MAAM,6BAA6B,GAAG,4IAA4I,CAAC;AAGnL,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,6BAA6B,yKAAyK,CAAC;AAEtP,MAAM,8BAA8B,GAAG,kKAAkK,CAAC;AAE1M,MAAM,sBAAsB,GAAG,4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a,EAAE,wBAAwB,CAAC,EAAE,iBAAiB,CAAC;CAC7G,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export const CREATIVE_INTENT_FIDELITY_GUIDANCE = `CREATIVE FIDELITY: Preserve the user's specified subjects and ages, relationships, wardrobe, setting, genre, mood, action, shot composition, camera behavior, dialogue, visible text, and exclusions. Enrich only unspecified details that support those choices. Express the requested mood through observable performance, light, texture, and composition without replacing the premise or adding a new story event. Pacing and cinematography suggestions are defaults: an explicit locked camera, held pose, quiet pause, sustained action, or silence takes priority. Keep supplied dialogue and visible text in their original language and wording. Before returning, check the result against the original request and remove additions that contradict it.`;
|
|
2
|
+
export const DYNAMIC_PROMPT_BRANCH_GUIDANCE = `DYNAMIC PROMPT BRANCHES: If the base request contains one Dynamic Prompt branch such as "{option A|option B}", preserve exactly one branch with the same option count. Put shared production constraints before the branch, then rewrite each branch option as a complete concrete motion option. Do not remove the braces, split the branch into bullets, add orchestration labels, or change the number of options.`;
|
|
3
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/prompt-guides/shared.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,iCAAiC,GAAG,suBAAsuB,CAAC;AAGxxB,MAAM,CAAC,MAAM,8BAA8B,GAAG,uZAAuZ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function modelPromptGuide(guide) {
|
|
2
|
+
if (guide.referenceGrammar !== null && !guide.rules.includes(guide.referenceGrammar)) {
|
|
3
|
+
throw new Error(`The ${guide.family} ${guide.mode} prompt guide's reference grammar must be one of its rules.`);
|
|
4
|
+
}
|
|
5
|
+
return Object.freeze({
|
|
6
|
+
...guide,
|
|
7
|
+
models: Object.freeze([...guide.models]),
|
|
8
|
+
rules: Object.freeze([...guide.rules]),
|
|
9
|
+
notes: Object.freeze([...guide.notes]),
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/prompt-guides/types.ts"],"names":[],"mappings":"AA4EA,MAAM,UAAU,gBAAgB,CAAC,KAAuB;IACtD,IAAI,KAAK,CAAC,gBAAgB,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACrF,MAAM,IAAI,KAAK,CAAC,OAAO,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,6DAA6D,CAAC,CAAC;IAClH,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,GAAG,KAAK;QACR,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;QACxC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QACtC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;KACvC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { DYNAMIC_PROMPT_BRANCH_GUIDANCE } from './shared.js';
|
|
2
|
+
import { modelPromptGuide, } from './types.js';
|
|
3
|
+
const WAN_T2V_CONTENT_GUIDANCE = `Preserve the original subjects, actions, setting, requested style, visible text, proper nouns, and constraints. Add only observable details that make the requested scene filmable. Order the prompt as: requested style if any; shot scale and composition; subject identity and appearance; environment and named light sources; action described as a concrete physical sequence; then one camera behavior. When the request specifies motion, preserve it exactly and explain how it unfolds at the pace it implies, showing fast action through what rushes past the camera and the ground covered rather than the word "fast" alone. When it lacks motion, add one small physically plausible subject or environmental movement without inventing a new story event.`;
|
|
4
|
+
const WAN_T2V_ATTRIBUTE_GUIDANCE = `Choose at most four useful cinematic attributes such as time of day, light source, light quality, color temperature, shot scale, camera angle, or composition. Do not dump camera vocabulary or stack movements. Do not add people, animals, props, logos, labels, dialogue, or a visual style the user did not request. Describe objective visible facts rather than abstract claims about feeling or meaning.`;
|
|
5
|
+
const WAN_T2V_LENGTH_GUIDANCE = `Write 60-200 words as one cohesive prompt. No headings, bullets, labels, Markdown, preamble, explanation, or negative-prompt list. Output ONLY the prompt.`;
|
|
6
|
+
const WAN_S2V_PERFORMANCE_GUIDANCE = `Treat the reference portrait as visual truth for identity, face, hair, clothing, framing, and background. Treat the audio as timing truth for speech and vocal performance. Describe only the visible performance that should synchronize to it, as still and intimate or as full-body and energetic as the request implies: natural lip articulation, facial expression changes, gaze, breathing, head, body and hand motion, and one camera behavior. The audio track already carries every spoken or sung word: quote dialogue only when the user wrote it, and never invent lyrics, speech, language, voice qualities, or audio content that you cannot hear.`;
|
|
7
|
+
const WAN_S2V_STABILITY_GUIDANCE = `Keep identity and the source composition stable. Do not redescribe a complete static portrait, invent scene changes, or add cuts. Use one concise English paragraph under 100 words with no headings, labels, Markdown, preamble, explanation, or negative-prompt list. Output ONLY the prompt.`;
|
|
8
|
+
const WAN_NEGATIVE_CONSTRAINT_GUIDANCE = `NEGATIVE CONSTRAINT TRANSLATION: WAN receives only this positive prompt. Translate user avoid/no/don't constraints into affirmative production constraints instead of copying negative phrasing. For translated constraints, the output prompt must not use words such as "no", "not", "without", "avoid", or "never" except inside exact quoted user-requested text. Examples: "no people in background" becomes single subject focus with an empty background; "no text" becomes clean blank surfaces; "don't make it blurry" becomes crisp sharp focus; "no weird hands" becomes natural anatomically consistent hands; "no mouth movement, no talking, no lip syncing" becomes silent expression-only physical performance with facial motion independent of speech timing; "don't change the room" becomes the same room and layout remain consistent. If the user asks for exact quoted visible text, preserve that quoted text exactly.`;
|
|
9
|
+
const WAN_L2V_PATH_GUIDANCE = `Write one concise present-tense video prompt describing a physically coherent action and camera path that arrive naturally at that exact ending composition. Preserve the user's subjects, requested action, style, constraints, exact quoted dialogue, visible text, and proper nouns. Treat the supplied image as ending-frame truth for identity, appearance, setting, lighting, spatial composition, framing, and viewpoint. Infer only the earlier motion needed to reach it; never describe the image as the opening frame.`;
|
|
10
|
+
const WAN_L2V_CONSTRAINT_GUIDANCE = `Translate negative constraints into affirmative production constraints. Use one continuous shot unless the request asks for a cut, with at most one primary camera movement per shot, at the pace the request calls for. Keep subject motion separate from camera motion. Do not add unrelated people, objects, dialogue, cuts, headings, labels, Markdown, preamble, explanation, or input-ordinal language.`;
|
|
11
|
+
const WAN_ANIMATE_MOVE_GUIDANCE = `Describe how the reference character performs the driving video's motion while preserving the character's identity, appearance, clothing, and proportions. Keep the source motion timing, pose sequence, facial performance, and camera trajectory intact unless the user explicitly changes one. Do not invent a new setting or describe unrelated cinematography. Return one concise direct instruction only, with no wrapper or explanation.`;
|
|
12
|
+
const WAN_ANIMATE_REPLACE_GUIDANCE = `Describe replacing the source performer with the reference character while preserving the source video's motion, timing, camera, framing, lighting, occlusion, and background unless the user explicitly requests a change. State only the requested identity/appearance transfer and preservation constraints. Return one concise direct instruction only, with no wrapper or explanation.`;
|
|
13
|
+
const WAN_TRANSITION_REQUIREMENTS_GUIDANCE = `Your prompt MUST:
|
|
14
|
+
- Preserve the user's base request, style, constraints, transition instructions, motion/action beats, and exact quoted dialogue if any is present
|
|
15
|
+
- Only invent a default practical transition when the base request lacks transition motion or action. Keep explicit user instructions rather than replacing them with generic morphing, dissolves, or wardrobe transformations.
|
|
16
|
+
- Identify the important visible subjects, objects, poses, background elements, lighting, and perspective differences
|
|
17
|
+
- Describe how each key element moves, shifts, transforms, or becomes occluded/revealed between frames
|
|
18
|
+
- Specify camera motion with directional language such as dolly in, tracking shot, orbit, pan, tilt, push in, pull back, or whip pan
|
|
19
|
+
- Maintain subject identity and visual continuity
|
|
20
|
+
- Use a concise present-tense paragraph with short sentences`;
|
|
21
|
+
const WAN_TRANSITION_OUTPUT_CONSTRAINTS_GUIDANCE = `OUTPUT CONSTRAINTS:
|
|
22
|
+
- Single concise paragraph only: no preamble, explanations, bullets, markdown, labels, or image ordinal references
|
|
23
|
+
- Motion-focused prose: static details appear only when they affect the transition
|
|
24
|
+
- Physically coherent motion at the pace the request calls for, showing fast action through what rushes past the camera and the ground covered
|
|
25
|
+
- Lettering already in the frames stays exactly as it reads`;
|
|
26
|
+
const WAN_I2V_REQUIREMENTS_GUIDANCE = `Your prompt MUST:
|
|
27
|
+
- Preserve the user's base request, style, constraints, motion/action beats, and exact quoted dialogue if any is present
|
|
28
|
+
- Only invent a default practical action when the base request lacks motion. Keep explicit user instructions rather than replacing them with generic morphing, dissolves, or wardrobe transformations.
|
|
29
|
+
- Identify the important visible subjects, objects, poses, background elements, lighting, and perspective from the anchor only as needed to plan motion — do not redescribe static details
|
|
30
|
+
- Describe how each key element moves, shifts, transforms, or becomes occluded/revealed forward from the anchor
|
|
31
|
+
- Specify camera motion with directional language such as dolly in, tracking shot, orbit, pan, tilt, push in, pull back, or whip pan
|
|
32
|
+
- Maintain subject identity and visual continuity
|
|
33
|
+
- Use a concise present-tense paragraph with short sentences`;
|
|
34
|
+
const WAN_I2V_OUTPUT_CONSTRAINTS_GUIDANCE = `OUTPUT CONSTRAINTS:
|
|
35
|
+
- Single concise paragraph only: no preamble, explanations, bullets, markdown, labels, second-keyframe language, target-frame language, interpolation language, or input ordinal references
|
|
36
|
+
- Motion-focused prose: static details appear only when they affect the forward motion
|
|
37
|
+
- Physically coherent motion at the pace the request calls for, showing fast action through what rushes past the camera and the ground covered
|
|
38
|
+
- Lettering already in the anchor frame stays exactly as it reads`;
|
|
39
|
+
const WAN22_NOTES = [
|
|
40
|
+
'Use compact motion-first prompts for animate and transition workflows.',
|
|
41
|
+
'Avoid crowded simultaneous actions and rigid numerical camera constraints.',
|
|
42
|
+
];
|
|
43
|
+
function wanGuide(mode, title, rules) {
|
|
44
|
+
return modelPromptGuide({
|
|
45
|
+
family: 'wan-2.2',
|
|
46
|
+
mode,
|
|
47
|
+
title: `Wan 2.2 ${title}`,
|
|
48
|
+
models: ['wan22'],
|
|
49
|
+
referenceGrammar: null,
|
|
50
|
+
rules,
|
|
51
|
+
notes: WAN22_NOTES,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
export const WAN_PROMPT_GUIDES = {
|
|
55
|
+
'wan-2.2': {
|
|
56
|
+
t2v: wanGuide('t2v', 'text-to-video', [WAN_T2V_CONTENT_GUIDANCE, WAN_T2V_ATTRIBUTE_GUIDANCE, WAN_T2V_LENGTH_GUIDANCE]),
|
|
57
|
+
i2v: wanGuide('i2v', 'first-frame image-to-video', [
|
|
58
|
+
WAN_I2V_REQUIREMENTS_GUIDANCE,
|
|
59
|
+
WAN_NEGATIVE_CONSTRAINT_GUIDANCE,
|
|
60
|
+
DYNAMIC_PROMPT_BRANCH_GUIDANCE,
|
|
61
|
+
WAN_I2V_OUTPUT_CONSTRAINTS_GUIDANCE,
|
|
62
|
+
]),
|
|
63
|
+
l2v: wanGuide('l2v', 'last-frame image-to-video', [WAN_L2V_PATH_GUIDANCE, WAN_L2V_CONSTRAINT_GUIDANCE]),
|
|
64
|
+
flf: wanGuide('flf', 'first-and-last-frame video', [
|
|
65
|
+
WAN_TRANSITION_REQUIREMENTS_GUIDANCE,
|
|
66
|
+
WAN_NEGATIVE_CONSTRAINT_GUIDANCE,
|
|
67
|
+
DYNAMIC_PROMPT_BRANCH_GUIDANCE,
|
|
68
|
+
WAN_TRANSITION_OUTPUT_CONSTRAINTS_GUIDANCE,
|
|
69
|
+
]),
|
|
70
|
+
s2v: wanGuide('s2v', 'speech-to-video', [WAN_S2V_PERFORMANCE_GUIDANCE, WAN_S2V_STABILITY_GUIDANCE]),
|
|
71
|
+
'animate-move': wanGuide('animate-move', 'Animate movement transfer', [WAN_ANIMATE_MOVE_GUIDANCE]),
|
|
72
|
+
'animate-replace': wanGuide('animate-replace', 'Animate character replacement', [WAN_ANIMATE_REPLACE_GUIDANCE]),
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+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;IAC1E,SAAS,EAAE;QACT,GAAG,EAAE,QAAQ,CAAC,KAAK,EAAE,eAAe,EAAE,CAAC,wBAAwB,EAAE,0BAA0B,EAAE,uBAAuB,CAAC,CAAC;QACtH,GAAG,EAAE,QAAQ,CAAC,KAAK,EAAE,4BAA4B,EAAE;YACjD,6BAA6B;YAC7B,gCAAgC;YAChC,8BAA8B;YAC9B,mCAAmC;SACpC,CAAC;QACF,GAAG,EAAE,QAAQ,CAAC,KAAK,EAAE,2BAA2B,EAAE,CAAC,qBAAqB,EAAE,2BAA2B,CAAC,CAAC;QACvG,GAAG,EAAE,QAAQ,CAAC,KAAK,EAAE,4BAA4B,EAAE;YACjD,oCAAoC;YACpC,gCAAgC;YAChC,8BAA8B;YAC9B,0CAA0C;SAC3C,CAAC;QACF,GAAG,EAAE,QAAQ,CAAC,KAAK,EAAE,iBAAiB,EAAE,CAAC,4BAA4B,EAAE,0BAA0B,CAAC,CAAC;QACnG,cAAc,EAAE,QAAQ,CAAC,cAAc,EAAE,2BAA2B,EAAE,CAAC,yBAAyB,CAAC,CAAC;QAClG,iBAAiB,EAAE,QAAQ,CAAC,iBAAiB,EAAE,+BAA+B,EAAE,CAAC,4BAA4B,CAAC,CAAC;KAChH;CACF,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { CREATIVE_INTENT_FIDELITY_GUIDANCE } from './shared.js';
|
|
2
|
+
import { modelPromptGuide, } from './types.js';
|
|
3
|
+
export const WAN3_REFERENCE_GRAMMAR_GUIDANCE = `REFERENCE GRAMMAR: Name loose media exactly as Image 1, Image 2, Video 1, Video 2, Audio 1, and Audio 2, numbered independently by type and in attachment order. Capitalize the media type and include one space before the number. Do not use square brackets, angle brackets, @-tags, URLs, or asset IDs. Give each named reference an explicit role and state which reference wins if two conflict. Native first_frame and last_frame anchors are not loose Image N references.`;
|
|
4
|
+
export const WAN3_OUTPUT_CONTRACT_GUIDANCE = `OUTPUT CONTRACT: Write one production-ready English video prompt in present tense. Preserve exact user-provided dialogue in double quotes. Describe subject, action, setting, camera, lighting, timing, dialogue, foley, ambience, and music only when relevant. Use compact timecoded beats for multi-shot or longer clips. Do not add a negative-prompt section because Wan 3 has no negative_prompt request field. Return only the rewritten prompt with no preamble or markdown.`;
|
|
5
|
+
export const WAN3_T2V_GUIDANCE = `Wan 3 renders 2-30 seconds at fixed 30 fps and can generate synchronized audio.`;
|
|
6
|
+
export const WAN3_I2V_GUIDANCE = `The supplied first frame fixes the opening composition, subject, wardrobe, environment, and visual style. Describe motion, camera, performance, scene evolution, dialogue, and sound that flow forward from that exact frame. Do not label the native first frame as Image 1.`;
|
|
7
|
+
export const WAN3_FLF2V_GUIDANCE = `The supplied opening and closing frames are hard endpoints. Describe one coherent transition whose action, camera, lighting, and subject state begin at the first frame and converge naturally on the last frame. Do not label either native endpoint as an Image N loose reference.`;
|
|
8
|
+
export const WAN3_R2V_GUIDANCE = `Preserve the useful appearance, motion, voice, sound, style, and factual/story context in the attached references. A document or webpage is context, not an Image N asset: refer to it naturally as the attached document or linked webpage and turn its useful content into visible, audible, generatable direction.`;
|
|
9
|
+
export const WAN3_A2V_GUIDANCE = `Make the supplied audio the timing and performance anchor, describe synchronized visible action and camera direction, and identify audio inputs as Audio 1, Audio 2, and so on.`;
|
|
10
|
+
export const WAN3_STEP_TIMING_GUIDANCE = `STEP TIMING AND VISIBLE STATE: Wan 3 renders an action reliably only when the prompt gives it its own time and says what it visibly changes. Write the artist's actions as consecutive timecoded beats that cover the clip's full length (for example "0-3 s: ...", "3-7 s: ..."), in the artist's order, each beat long enough for its action to be seen. When an action changes clothing or exposure (pulling fabric aside, lowering or lifting a garment, opening it, putting it back on, letting it snap back), give it its own beat: describe the hand motion, then state the visible result plainly, and keep that result true in every later beat unless the artist undoes it (for example "the crotch of her thong stays held to the side and her bare vulva stays visible"). This holds at every clip length: in a short clip use short beats (one or two seconds is fine), and never fold a clothing or exposure change into the same beat as the action that follows it. Keep your own additions short so the artist's actions get the screen time.`;
|
|
11
|
+
export const WAN3_SHOT_PLAN_GUIDANCE = `SHOTS AND CAMERA: Wan 3 makes its own cuts when the prompt does not say how the clip is shot, so write the shot plan into the prompt and keep the timecoded beats either way. Cut when the artist asks for cuts, when the action moves to another place or a later time, or when a closer angle shows a requested act better; otherwise keep one take. For one take, open the prompt with "One continuous shot, no cuts." For several shots, open with the number of shots (for example "Two shots.") and begin the first beat of every shot after the first with "Hard cut:" followed by that shot's framing; give every shot at least 2 seconds. Name the shot size and one camera move or "fixed camera" for each shot (for example "medium-wide shot, slow push in"); when the artist chose the camera or framing, use exactly theirs. Every person, body part and act the artist asked for appears on screen: describe each one as visible in the shot, inside the artist's framing when they chose one. When the starting frame does not show a requested person, bring them into view in the first beat, by the person stepping into frame or, if the artist did not lock the camera, by a camera move such as a pull back.`;
|
|
12
|
+
const WAN3_NOTES = [
|
|
13
|
+
'Use Image 1, Video 1, and Audio 1 as plain 1-based per-type labels without brackets, angle brackets, or @ prefixes.',
|
|
14
|
+
'Use native first/last-frame endpoints through animate_photo; do not mix those endpoint fields with loose multimodal references in the same request.',
|
|
15
|
+
'Use generate_video for text or loose references and sound_to_video when an audio asset drives timing. A video input is loose conditioning for a new generation, not a provider-backed edit or continuation.',
|
|
16
|
+
'Keep output duration within 2-30 seconds at the fixed 30 fps. When loose video references are present, their combined duration plus output duration must stay at or below 30 seconds.',
|
|
17
|
+
'Use only 480p, 720p, or 1080p and one of 16:9, 4:3, 1:1, 3:4, or 9:16.',
|
|
18
|
+
'Describe native dialogue, ambience, foley, and music directly; audio is enabled by default and can be disabled explicitly.',
|
|
19
|
+
'Translate exclusions into affirmative preservation language because Wan 3 does not accept a separate negative prompt.',
|
|
20
|
+
];
|
|
21
|
+
function wan3Guide(mode, title, modeGuidance, referenceGrammar) {
|
|
22
|
+
return modelPromptGuide({
|
|
23
|
+
family: 'wan-3',
|
|
24
|
+
mode,
|
|
25
|
+
title: `Wan 3 ${title}`,
|
|
26
|
+
models: ['wan3', 'wan3-enhanced'],
|
|
27
|
+
referenceGrammar,
|
|
28
|
+
rules: [
|
|
29
|
+
modeGuidance,
|
|
30
|
+
...(referenceGrammar ? [referenceGrammar] : []),
|
|
31
|
+
CREATIVE_INTENT_FIDELITY_GUIDANCE,
|
|
32
|
+
WAN3_OUTPUT_CONTRACT_GUIDANCE,
|
|
33
|
+
WAN3_STEP_TIMING_GUIDANCE,
|
|
34
|
+
WAN3_SHOT_PLAN_GUIDANCE,
|
|
35
|
+
],
|
|
36
|
+
notes: WAN3_NOTES,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
export const WAN3_PROMPT_GUIDES = {
|
|
40
|
+
'wan-3': {
|
|
41
|
+
t2v: wan3Guide('t2v', 'text-to-video', WAN3_T2V_GUIDANCE, null),
|
|
42
|
+
i2v: wan3Guide('i2v', 'first-frame image-to-video', WAN3_I2V_GUIDANCE, null),
|
|
43
|
+
flf: wan3Guide('flf', 'first-and-last-frame video', WAN3_FLF2V_GUIDANCE, null),
|
|
44
|
+
r2v: wan3Guide('r2v', 'multimodal reference-to-video', WAN3_R2V_GUIDANCE, WAN3_REFERENCE_GRAMMAR_GUIDANCE),
|
|
45
|
+
a2v: wan3Guide('a2v', 'audio-driven video', WAN3_A2V_GUIDANCE, WAN3_REFERENCE_GRAMMAR_GUIDANCE),
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=wan3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wan3.js","sourceRoot":"","sources":["../../src/prompt-guides/wan3.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EACL,gBAAgB,GAIjB,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,MAAM,+BAA+B,GAAG,odAAod,CAAC;AAGpgB,MAAM,CAAC,MAAM,6BAA6B,GAAG,sdAAsd,CAAC;AAGpgB,MAAM,CAAC,MAAM,iBAAiB,GAAG,iFAAiF,C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AmB,EAAE,IAAI,CAAC;QAC9E,GAAG,EAAE,SAAS,CAAC,KAAK,EAAE,+BAA+B,EAAE,iBAAiB,EAAE,+BAA+B,CAAC;QAC1G,GAAG,EAAE,SAAS,CAAC,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,+BAA+B,CAAC;KAChG;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sogni-ai/sogni-intelligence-client",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.23.0",
|
|
4
4
|
"description": "Public Sogni Intelligence client — Node.js convenience wrapper for the Sogni SDK plus the public-safe subset of @sogni/creative-agent contracts (ContractRegistry, AssetManifest, RunRecord, tool envelopes). For agent builders, third-party integrations, and downstream SDKs.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -50,6 +50,9 @@
|
|
|
50
50
|
],
|
|
51
51
|
"billing": [
|
|
52
52
|
"./dist/billing/index.d.ts"
|
|
53
|
+
],
|
|
54
|
+
"prompt-guides": [
|
|
55
|
+
"./dist/prompt-guides/index.d.ts"
|
|
53
56
|
]
|
|
54
57
|
}
|
|
55
58
|
},
|
|
@@ -151,6 +154,12 @@
|
|
|
151
154
|
"require": "./dist/billing/index.js",
|
|
152
155
|
"default": "./dist/billing/index.js"
|
|
153
156
|
},
|
|
157
|
+
"./prompt-guides": {
|
|
158
|
+
"types": "./dist/prompt-guides/index.d.ts",
|
|
159
|
+
"import": "./dist-esm/prompt-guides/index.js",
|
|
160
|
+
"require": "./dist/prompt-guides/index.js",
|
|
161
|
+
"default": "./dist/prompt-guides/index.js"
|
|
162
|
+
},
|
|
154
163
|
"./skill-runtime-source": {
|
|
155
164
|
"types": "./dist/skill-runtime-source/index.d.ts",
|
|
156
165
|
"import": "./dist-esm/skill-runtime-source/index.js",
|
|
@@ -167,7 +176,7 @@
|
|
|
167
176
|
"dev": "tsc --watch",
|
|
168
177
|
"prepare": "npm run codegen && husky",
|
|
169
178
|
"prepublishOnly": "npm run build",
|
|
170
|
-
"test": "node --import tsx test/basic-tests.ts && node --import tsx --test test/balance.test.ts test/replay-redaction.test.ts test/chat-run-model-media.test.ts test/durable-workflow-content-filter.test.ts test/gpt-image-25.test.ts test/video-estimate-context.test.ts test/video-reference-detail.test.ts test/prompt-limits.test.ts test/reconnect-and-retry.test.ts test/batch-prompt-preservation.test.ts test/context-budget-check.test.ts test/context-user-history.test.ts test/seedance-25-uncensored.test.ts test/seedance-mini-uncensored.test.ts test/seedream-5-pro-uncensored.test.ts test/seedance-vendor-reason.test.ts test/project-failure-reason.test.ts test/image-identity-prompting.test.ts test/seedance-reference-duration.test.ts test/guidance-fidelity.test.ts",
|
|
179
|
+
"test": "node --import tsx test/basic-tests.ts && node --import tsx --test test/balance.test.ts test/replay-redaction.test.ts test/chat-run-model-media.test.ts test/durable-workflow-content-filter.test.ts test/gpt-image-25.test.ts test/video-estimate-context.test.ts test/video-reference-detail.test.ts test/prompt-limits.test.ts test/reconnect-and-retry.test.ts test/batch-prompt-preservation.test.ts test/context-budget-check.test.ts test/context-user-history.test.ts test/seedance-25-uncensored.test.ts test/seedance-mini-uncensored.test.ts test/seedream-5-pro-uncensored.test.ts test/seedance-vendor-reason.test.ts test/project-failure-reason.test.ts test/image-identity-prompting.test.ts test/seedance-reference-duration.test.ts test/guidance-fidelity.test.ts test/prompt-guides.test.ts",
|
|
171
180
|
"test:e2e": "node --import tsx test/e2e-test.ts",
|
|
172
181
|
"test:e2e:llm": "SOGNI_E2E_SCOPE=llm node --import tsx test/e2e-test.ts",
|
|
173
182
|
"typecheck:examples": "tsc --noEmit -p tsconfig.examples.json",
|