@sogni-ai/sogni-creative-agent-skill 3.31.0 → 3.32.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.
Files changed (30) hide show
  1. package/.agents/skills/sogni-creative-agent-skill/SKILL.md +110 -0
  2. package/.agents/skills/sogni-creative-agent-skill/references/hosted-api.md +227 -0
  3. package/.agents/skills/sogni-creative-agent-skill/references/krea2-loras.md +178 -0
  4. package/.agents/skills/sogni-creative-agent-skill/references/loop-maker.md +192 -0
  5. package/.agents/skills/sogni-creative-agent-skill/references/models.md +632 -0
  6. package/.agents/skills/sogni-creative-agent-skill/references/personas-memory.md +124 -0
  7. package/.agents/skills/sogni-creative-agent-skill/references/private-mature-video.md +118 -0
  8. package/.agents/skills/sogni-creative-agent-skill/references/seamless-tiling.md +108 -0
  9. package/.agents/skills/sogni-creative-agent-skill/references/video-editing.md +262 -0
  10. package/.agents/skills/sogni-creative-agent-skill/references/video-prompting.md +457 -0
  11. package/.claude-plugin/plugin.json +1 -1
  12. package/.codex-plugin/plugin.json +1 -1
  13. package/CHANGELOG.md +29 -0
  14. package/README.md +27 -5
  15. package/SKILL.md +9 -6
  16. package/desktop-extension/manifest.json +1 -1
  17. package/generated/creative-agent-runtime.mjs +3 -3
  18. package/llm.txt +5 -0
  19. package/openclaw.plugin.json +1 -1
  20. package/package.json +6 -3
  21. package/references/hosted-api.md +5 -0
  22. package/references/krea2-loras.md +178 -0
  23. package/references/models.md +17 -3
  24. package/scripts/check-version-sync.mjs +4 -0
  25. package/scripts/sync-hermes-skill.mjs +35 -0
  26. package/scripts/sync-version.mjs +11 -1
  27. package/skill-package.json +1 -1
  28. package/skills/image_editing.md +2 -2
  29. package/sogni-agent.mjs +239 -13
  30. package/version.mjs +1 -1
@@ -0,0 +1,124 @@
1
+ # Personas, Memory & Personality
2
+
3
+ Read this when managing personas (named people with saved reference photos and
4
+ voice clips), persistent user preferences, custom agent personality, or
5
+ multi-persona scenes.
6
+
7
+ ## Persona System
8
+
9
+ Personas enable identity-preserving generation across sessions. Stored at
10
+ `~/.config/sogni/personas/`.
11
+
12
+ ### Managing Personas
13
+
14
+ ```bash
15
+ # Add a persona with a reference photo
16
+ sogni-agent --persona-add "Mark" --ref face.jpg --relationship self --description "30s male, brown hair, brown eyes"
17
+
18
+ # Add with voice clip for video voice cloning (plus a voice description)
19
+ sogni-agent --persona-add "Sarah" --ref sarah.jpg --relationship partner --voice-clip sarah-voice.webm --voice "warm alto with British accent"
20
+
21
+ # List all personas
22
+ sogni-agent --persona-list --json
23
+
24
+ # Resolve a persona by name, tag, or pronoun
25
+ sogni-agent --persona-resolve "me" --json
26
+
27
+ # Generate using a persona (auto-injects photo as context)
28
+ sogni-agent --persona "Mark" -o ./hero.png "superhero in dramatic lighting"
29
+
30
+ # Video using a persona photo + saved voice identity
31
+ sogni-agent --video --persona "Sarah" 'SARAH: "This is my voice."'
32
+
33
+ # Remove a persona
34
+ sogni-agent --persona-remove "Mark"
35
+ ```
36
+
37
+ `--relationship` accepts `self|partner|child|friend|pet` (default `friend`).
38
+
39
+ ### Persona Pipeline Rules
40
+
41
+ When a user mentions a persona by explicit saved name, id, or tag/alias:
42
+
43
+ 1. **For images:** use `--persona "Name" "prompt"` — auto-injects the persona's reference photo as context and selects the Qwen editing model.
44
+ 2. **For video with voice cloning:** the persona's voice clip is used as `--reference-audio-identity` automatically when `--video` is combined with `--persona`. `--voice-persona <name>` selects just the voice identity.
45
+ 3. **For video without a voice clip:** describe the voice in the prompt ("speaks in a warm alto with a British accent").
46
+
47
+ **Important:** user-uploaded photos are NOT personas. Only use `--persona`
48
+ when referring to a saved persona by explicit name, id, or tag/alias;
49
+ relationship phrases alone are not persona identifiers. For ad-hoc photos,
50
+ use `-c` (context image) directly.
51
+
52
+ ### Multi-Persona Scene
53
+
54
+ 1. Resolve all personas: `--persona-resolve "Mark" --json` and `--persona-resolve "Sarah" --json`
55
+ 2. Generate the scene with both photos: `-c mark-photo.jpg -c sarah-photo.jpg "Mark and Sarah at a cafe, use face from picture 1 for Mark, face from picture 2 for Sarah"`
56
+ 3. Animate with one persona's voice identity: `--video --ref <scene.png> --reference-audio-identity <mark-voice.webm> "MARK: \"Exact spoken words.\""`
57
+
58
+ ## Memory System (persistent preferences)
59
+
60
+ Memories are persistent key-value preferences stored at
61
+ `~/.config/sogni/memories.json`.
62
+
63
+ ```bash
64
+ sogni-agent --memory-set preferred_style "watercolor and soft lighting"
65
+ sogni-agent --memory-set aspect_ratio "16:9"
66
+ sogni-agent --memory-set favorite_artist "Studio Ghibli"
67
+ sogni-agent --memory-list --json
68
+ sogni-agent --memory-get preferred_style --json
69
+ sogni-agent --memory-remove preferred_style
70
+ ```
71
+
72
+ **Agent behavior:** before generating, check memories with `--memory-list` and
73
+ respect saved preferences. If the user says "I always want watercolor style",
74
+ save it with `--memory-set`. Categories via `--memory-category`: `preference`
75
+ (default), `fact`, `context`.
76
+
77
+ ## Personality (custom agent instructions)
78
+
79
+ Custom instructions that shape agent behavior, stored at
80
+ `~/.config/sogni/personality.txt`.
81
+
82
+ ```bash
83
+ sogni-agent --personality-set "Be concise, always use cinematic lighting, suggest bold creative ideas"
84
+ sogni-agent --personality-get --json
85
+ sogni-agent --personality-clear
86
+ ```
87
+
88
+ **Agent behavior:** check personality on startup and adopt those instructions.
89
+ Personality overrides default style but not hard constraints (safety, tool
90
+ usage rules).
91
+
92
+ ## Style Transfer recipes
93
+
94
+ ```bash
95
+ # Apply a named artist style
96
+ sogni-agent -c photo.jpg -o ./styled.png "Apply style: Andy Warhol pop art with bold primary colors"
97
+
98
+ # Studio Ghibli transformation
99
+ sogni-agent -c photo.jpg -o ./ghibli.png "Apply style: Studio Ghibli watercolor with soft pastel sky and lush greenery"
100
+
101
+ # For photos with people, always preserve identity
102
+ sogni-agent -c portrait.jpg -o ./styled.png "Apply style: oil painting in the style of Vermeer. Preserve all facial features, expressions, and identity."
103
+ ```
104
+
105
+ **Tips:** reference artists and styles BY NAME for best results. Use positive
106
+ phrasing. For photos with people, always append identity-preservation
107
+ instructions.
108
+
109
+ ## Photo Restoration recipes
110
+
111
+ ```bash
112
+ # Basic restoration
113
+ sogni-agent -c damaged_photo.jpg -o restored.png \
114
+ "professionally restore this vintage photograph, remove damage and scratches"
115
+
116
+ # Detailed restoration with preservation hints
117
+ sogni-agent -c old_photo.jpg -o restored.png -w 1024 -h 1280 \
118
+ "restore this vintage photo, remove peeling, tears and wear marks, \
119
+ preserve natural features and expression, maintain warm nostalgic color tones"
120
+ ```
121
+
122
+ **Tips:** describe the damage ("peeling", "scratches", "tears", "fading");
123
+ specify what to preserve ("natural features", "eye color", "expression");
124
+ mention the era for color tones ("1970s warm tones", "vintage sepia").
@@ -0,0 +1,118 @@
1
+ # Private Mature-Theme Video Reference
2
+
3
+ Use this reference for lawful adult mature-theme video requests.
4
+
5
+ ## Routing
6
+
7
+ Prefer `ltx23-22b-10eros-v1.4-fp8mixed_i2v` (`10eros`) for this use case. It
8
+ is a fast LTX image-to-video model with generated audio. It accepts a first
9
+ frame, a last frame, or both, and requires `--no-filter`.
10
+
11
+ Use `dr34ml4y-v3` at strength 1 with 10Eros by default. It improves mature-theme
12
+ prompt adherence, motion, and physical behavior even when no action token is
13
+ needed. Omit it only when the creator requests the base 10Eros model alone or
14
+ when comparing/troubleshooting the model and LoRA separately.
15
+
16
+ The LoRA supports:
17
+
18
+ - `ltx23-22b-fp8_i2v`
19
+ - `ltx23-22b-fp8_i2v_dev`
20
+ - `ltx23-22b-10eros-v1.4-fp8mixed_i2v` (preferred)
21
+
22
+ Sogni installs the LT3X v3 LoRA, not the separately trained WAN release. Do not
23
+ use this LoRA ID with WAN models.
24
+
25
+ ## Specialized prompt vocabulary
26
+
27
+ The LoRA is one multi-concept adapter. Each token selects an action concept:
28
+
29
+ | User intent | Token |
30
+ |-------------|-------|
31
+ | Missionary position | `m15510n4ry` |
32
+ | Oral action | `bl0wj0b` |
33
+ | Two-person oral action | `d0ubl3_bj` |
34
+ | Rear-entry position | `d0gg1e` |
35
+ | Partner-on-top position | `c0wg1rl` |
36
+ | Reverse partner-on-top position | `r3v3rs3_c0wg1rl` |
37
+
38
+ Use one matching token for a clip focused on one action. Multiple tokens can be
39
+ used for sequential actions, but results may blend the concepts. For more
40
+ reliable output, render one action per clip and stitch the clips. When a single
41
+ continuous transition is preferred, keep the sequence short, describe it
42
+ chronologically, and place each token beside its corresponding action.
43
+
44
+ ## Prompt construction for 10Eros + DR34ML4Y
45
+
46
+ Write the prompt solely to produce the result the creator requested. Use one
47
+ unbroken, chronological LTX paragraph of 4-8 present-tense sentences. Do not
48
+ emit section labels such as `Performance:` or `Dialogue:` into the model
49
+ prompt; fold those details into cinematic prose instead.
50
+
51
+ 1. Use the supplied start image exactly as the first frame by passing it through
52
+ `--ref`; do not merely mention it in prose. Briefly anchor its composition,
53
+ subject placement, and starting pose without inventing conflicting details.
54
+ 2. Establish the overall cinematic style, shot scale, camera movement,
55
+ environment, lighting, atmosphere, and relevant subtle background motion.
56
+ 3. State the action concretely. Include a LoRA token when the requested action
57
+ matches one of its trained concepts.
58
+ 4. Describe what happens step by step in chronological order: who moves, which
59
+ body parts move, their direction, changes in position or contact, and the
60
+ resulting pose.
61
+ 5. Direct the performance through observable behavior: posture, breathing,
62
+ gaze, facial expression, micro-expressions, small pauses, and emotional
63
+ changes that flow naturally from the starting pose.
64
+ 6. Integrate the audio design with the action: voice delivery, dialogue, foley,
65
+ environmental sound, and music where relevant.
66
+
67
+ Be specific and literal. Do not substitute euphemisms or generalizations for
68
+ the requested visible action. Keep the action density appropriate for the
69
+ duration, and avoid contradictory positions, unrelated cuts, generic quality
70
+ tags, and repeating the same action in several different ways. Prefer one
71
+ simple, logical, interesting motion evolution. Keep acting and physical motion
72
+ natural and cinematic, with realistic weight and restrained gestures rather
73
+ than exaggerated motion or slapstick. Do not introduce extra characters unless
74
+ they are clearly visible in the supplied image or explicitly requested.
75
+
76
+ When an image is attached and the creator says "one for this image", "make one
77
+ for this", or similar, treat the image as the start-frame authority and build
78
+ the complete purpose-written prompt from what is visibly present plus the
79
+ creator's stated intent. Do not answer with generic prompting advice, and do
80
+ not invent a different scene merely to fill out the paragraph.
81
+
82
+ Write every spoken line verbatim in double quotes and identify who says it and
83
+ how. Never imply dialogue with a summary such as "they talk" or "she says
84
+ something." Keep dialogue concise enough to fit the clip and coordinate sounds
85
+ with the motion that produces them.
86
+
87
+ For first+last keyframes, describe the exact continuous change that connects
88
+ the supplied boundaries rather than reimagining either endpoint. For
89
+ last-frame-only generation, describe the preceding motion and composition that
90
+ must resolve naturally into the supplied final frame. For a same-frame loop,
91
+ describe motion that departs from and settles back into that boundary pose.
92
+
93
+ Action tokens are optional: attach the LoRA for its broader domain improvement
94
+ even when none of its specialized concepts apply. Generate multiple seeds for
95
+ difficult poses, transitions, or multi-action clips.
96
+
97
+ ## Frame modes and loops
98
+
99
+ - First-frame animation: `--ref ./first.png`
100
+ - Last-frame-directed animation: `--ref-end ./last.png`
101
+ - First-to-last interpolation: use both `--ref ./first.png` and
102
+ `--ref-end ./last.png`
103
+ - Single-render anchored loop: use the same image as both the first and last
104
+ frame, or use deliberately matching boundary frames. Do not add `--looping`
105
+ to this form.
106
+ - Automatic two-clip loop: use `--looping --ref ./first.png`. The CLI generates
107
+ A→B and B→A and joins them; this mode creates its own return endpoint and
108
+ therefore does not accept `--ref-end`.
109
+
110
+ The optional DR34ML4Y LoRA works with each compatible 10Eros frame mode.
111
+
112
+ Command shape:
113
+
114
+ ```bash
115
+ sogni-agent --video --ref ./start.png -m 10eros \
116
+ --lora dr34ml4y-v3 --lora-strength 1 --no-filter \
117
+ "<purpose-built LTX prompt matching the creator's intended result>"
118
+ ```
@@ -0,0 +1,108 @@
1
+ # Seamless Tiling & Tessellations
2
+
3
+ How to render an image that repeats edge to edge without visible joins — a
4
+ seamless pattern, repeating texture, wallpaper, tiling background, or an
5
+ Escher-style tessellation of interlocking figures.
6
+
7
+ An ordinary render will **not** wrap. Diffusion models have no tiling mode
8
+ here (no circular padding is exposed), so border continuity is never
9
+ enforced — it only *emerges* when the sampled pattern happens to phase-align
10
+ with the canvas. Everything below is about stacking the odds, then checking.
11
+
12
+ ## The configuration
13
+
14
+ ```bash
15
+ sogni-agent -m krea2_turbo_fp8_scaled -w 1024 -h 1024 -n 4 -o tile.png \
16
+ "<subject>, a perfect crop from an infinite repeating pattern that continues beyond every edge, <motif-scale clause>, <lighting clause>"
17
+ ```
18
+
19
+ | Element | Why |
20
+ |---|---|
21
+ | `krea2_turbo_fp8_scaled` | The only model that composes edge-to-edge. `z_image_turbo_bf16` renders an object on a background instead and cannot tile. |
22
+ | **1024×1024, always** | The only size that tiles. 768, 1280, 1536, landscape, and 896×1152 all measured **0%**. It is the model's native resolution; off-native sizes never phase-align. |
23
+ | `a perfect crop from an infinite repeating pattern…` | Removes edge-framing behaviour — the model stops composing *for* a frame. |
24
+ | motif-scale clause | Sets how big the motif reads. Does **not** affect whether it tiles. |
25
+ | lighting clause | Kills the global light gradient, which is what makes opposite edges disagree. The dominant failure mode. |
26
+
27
+ ### Motif scale — pick for looks, not for tiling
28
+
29
+ `the motif repeats exactly N times across and N times down`
30
+
31
+ Use **N = 1** for large bold figures or **N = 2** for a medium pattern, and
32
+ keep the two counts equal. Measured over 30 renders each: 1× and 2× both hit
33
+ **63%**, against 50% for 4× and 40% for 3× — so stick to 1 or 2 and pick
34
+ between them purely on how large you want the motif to read. This clause is a
35
+ scale dial, not a tiling requirement.
36
+
37
+ ### Lighting — global evenness required, local depth optional
38
+
39
+ The constraint is *global*: no directional gradient or vignette across the
40
+ frame. Individual figures may still be shaded, which usually looks better.
41
+
42
+ - **Keep depth (recommended):** `consistent even illumination from edge to
43
+ edge, with natural shading and depth modeled within each object` — 47%,
44
+ and figures keep glossy highlights and three-dimensional modelling.
45
+ - **Flat graphic look:** `uniform flat lighting with no shadows or vignette`
46
+ — 59%, slightly better odds, flatter result.
47
+
48
+ **Do not omit this clause, and do not soften it to something vague** like
49
+ "evenly lit across the frame": both measured **8%**. The wording has to
50
+ explicitly forbid the gradient and vignette.
51
+
52
+ **Palette rule:** keep the subject tonally close — one dominant colour
53
+ family. High-contrast pairings expose the seam, because a border offset in
54
+ luminance can be flattened by prompting but an offset in *chroma* cannot.
55
+
56
+ ## For interlocking Escher tessellations
57
+
58
+ Phrase the subject as `photorealistic Escher tessellation of <objects>` and
59
+ add `every figure complete and recognizable, fitting its neighbors perfectly
60
+ with no gaps, no overlaps`.
61
+
62
+ `Escher tessellation` is the phrase that makes the model *deform silhouettes*
63
+ so neighbours nest. Without it you get dense packing, not tessellation.
64
+ Tested alternatives that do **not** work: "optical illusion", "negative
65
+ space", "figure-ground reversal", "interlocking silhouettes", "wallpaper",
66
+ "tessellation" alone.
67
+
68
+ Compliant rounded shapes tessellate — frogs, ducks, octopi, shells, leaves,
69
+ feathers, lizards, rubber chickens. Rigid objects (garden gnomes) resist and
70
+ fall back to packing.
71
+
72
+ ## It is probabilistic — always offer several
73
+
74
+ Roughly **half** the renders wrap cleanly on a good subject, fewer on a
75
+ hard one. So generate a batch and let the user pick:
76
+
77
+ ```bash
78
+ sogni-agent -m krea2_turbo_fp8_scaled -w 1024 -h 1024 -n 4 -o tile.png "<prompt>"
79
+ ```
80
+
81
+ Never promise that a given result tiles without checking. To check, place
82
+ two copies side by side and look at the join, or measure it: compare the
83
+ mean difference between opposite border rows/columns against the image's own
84
+ mean adjacent-pixel difference. A ratio near 1.0 is seamless; the join is
85
+ visible from roughly 3.5 upward.
86
+
87
+ ## Subjects with the best odds
88
+
89
+ Natural forms outperform kitsch — they already interlock, so the model is
90
+ not asked to invent a deformation, and their palettes are inherently tonal.
91
+
92
+ | Subject | Hit rate |
93
+ |---|---|
94
+ | iridescent teal peacock feathers | 4/4 |
95
+ | pearlescent white nautilus seashells | 3/4 |
96
+ | yellow rubber chickens | ~5/8 |
97
+ | morpho butterflies, ginkgo leaves, glass jellyfish, koi, ceramic lizards | 2/4 |
98
+ | green plastic aliens + glossy ceramic frogs | ~2/8 |
99
+
100
+ Avoid subjects that render on a white ground (origami cranes, delft
101
+ porcelain birds): they look beautiful but produce a uniform border, which
102
+ means the image is not actually edge-to-edge.
103
+
104
+ ## Reference implementation
105
+
106
+ <https://infinity.sogni.ai> generates these interactively, and the
107
+ repository (`Sogni-AI/sogni-infinity`) carries the full research log,
108
+ the seam validator, and the calibration evidence behind these numbers.
@@ -0,0 +1,262 @@
1
+ # Video Editing & Stitching (local FFmpeg-wrapper workflows)
2
+
3
+ Read this when the user asks to animate between images, continue a video,
4
+ bridge two videos, build a 360 turntable video, stitch clips, or remix/layer
5
+ audio over a finished video.
6
+
7
+ **Never run raw `ffmpeg`, `ls`, or `cp` shell commands for any of this.**
8
+ Always use the built-in safe wrappers: `--extract-first-frame`,
9
+ `--extract-last-frame`, `--concat-videos`, `--remix-audio`, `--list-media`,
10
+ `--video-start`, `--audio-start`, `--audio-duration`. They produce safer, more
11
+ reproducible results and are the only sanctioned file operations.
12
+
13
+ ## Animate Between Two Images (First-Frame / Last-Frame)
14
+
15
+ When a user asks to **animate between two images**, use `--ref` (first frame) and `--ref-end` (last frame):
16
+
17
+ ```bash
18
+ sogni-agent -q --video --ref ./imageA.png --ref-end ./imageB.png -o ./transition.mp4 "<4-8 sentence LTX transition paragraph>"
19
+ ```
20
+
21
+ **Default model:** with both `--ref` and `--ref-end` set and no `-m`, the CLI
22
+ defaults to `ltx25-22b-int8_i2v_distilled` and its dedicated FLF template, so
23
+ write the prompt as an LTX paragraph per
24
+ [`video-prompting.md`](video-prompting.md). Pass
25
+ `-m wan_v2.2-14b-fp8_i2v_lightx2v` only when the user explicitly wants the
26
+ WAN path (silent clip). Plain single-image i2v (one
27
+ `--ref`, no end frame) defaults to `wan_v2.2-14b-fp8_i2v_lightx2v` instead.
28
+
29
+ **Always apply this pattern when:**
30
+ - User says "animate image A to image B" → use `--ref A --ref-end B`
31
+ - User says "animate this video to this image" → extract last frame, use as `--ref`, target image as `--ref-end`, then stitch
32
+ - User says "continue this video" with a target image → same as above
33
+
34
+ > **Explicit LTX-2.3 rollback: transition / morph LoRA.** When an LTX-2.3
35
+ > image-to-video render (`ltx23-22b-fp8_i2v_distilled`) is given **both** a start
36
+ > image (`--ref`) and an end image (`--ref-end`) — two keyframes — it
37
+ > automatically applies the ValiantCat transition/morph LoRA (lora id
38
+ > `transition`, trigger word `zhuanchang`, strength ~1.0), morphing the first
39
+ > image smoothly into the end image. This is a **single model-level render**, not
40
+ > a stitch — no extra flags are required for the two-frame LTX i2v path. The
41
+ > sogni-client SDK example uses `image <first>` and `end-image <last>` to supply
42
+ > the two frames (the morph LoRA engages automatically), and additionally exposes
43
+ > manual `transition` / `transition-strength` SDK arguments for the SDK path. Do
44
+ > Pin `-m ltx23-22b-fp8_i2v_distilled` to request this legacy path; LTX-2.5
45
+ > FLF does not use that LoRA. Do **not** confuse this single-render morph with the manual "Transition Between Two
46
+ > Videos (Bridge Clip)" recipe below, which bridges two *finished videos* with a
47
+ > separately generated clip and `--concat-videos`.
48
+
49
+ ## Animate a Video to an Image (Scene Continuation)
50
+
51
+ 1. **Extract the last frame** of the existing video:
52
+ ```bash
53
+ sogni-agent --extract-last-frame ./existing.mp4 ./lastframe.png
54
+ ```
55
+ 2. **Generate a new video** using the last frame as `--ref` and the target image as `--ref-end`:
56
+ ```bash
57
+ sogni-agent -q --video --ref ./lastframe.png --ref-end ./target.png -o ./continuation.mp4 "<4-8 sentence LTX transition paragraph into the target image>"
58
+ ```
59
+ (No `-m` needed — the two-frame default is `ltx25-22b-int8_i2v_distilled` with the standard FLF template.)
60
+ 3. **Concatenate the videos**:
61
+ ```bash
62
+ sogni-agent --concat-videos ./full_sequence.mp4 ./existing.mp4 ./continuation.mp4
63
+ ```
64
+
65
+ This ensures visual continuity — the new clip picks up exactly where the previous one ended.
66
+
67
+ When the final stitched output needs a single external soundtrack, add `--concat-audio /path/to/audio.mp3` and optional `--concat-audio-start <sec>` to the same `--concat-videos` command. This is the local-agent advantage over browser-only workflows: generate clips with Sogni, then stitch and mux audio locally.
68
+
69
+ ## Transition Between Two Videos (Bridge Clip)
70
+
71
+ This recipe transitions between two **finished videos**. To morph between two
72
+ **still images** in a single render, use the LTX-2.5 FLF path (see "Animate
73
+ Between Two Images" above) —
74
+ do not build a bridge clip for that case.
75
+
76
+ To **create a transition between two existing videos** (A → B), bridge them with a generated clip anchored on both boundary frames:
77
+
78
+ 1. Extract the boundary frames:
79
+ ```bash
80
+ sogni-agent --extract-last-frame ./videoA.mp4 ./A_last.png
81
+ sogni-agent --extract-first-frame ./videoB.mp4 ./B_first.png
82
+ ```
83
+ 2. Generate the transition with i2v, anchoring start→end. Match `--fps` to the surrounding clips:
84
+ ```bash
85
+ sogni-agent -q --video -m wan_v2.2-14b-fp8_i2v_lightx2v \
86
+ --ref ./A_last.png --ref-end ./B_first.png --fps 24 \
87
+ -o ./transition.mp4 "descriptive morph between the two shots"
88
+ ```
89
+ 3. Concatenate A → transition → B:
90
+ ```bash
91
+ sogni-agent --concat-videos ./merged.mp4 ./videoA.mp4 ./transition.mp4 ./videoB.mp4
92
+ ```
93
+
94
+ > **i2v clips are silent and use the model's own frame rate** (often not 24). `--concat-videos` normalizes fps/size and fills silent audio automatically, so mismatched clips stitch correctly — but passing `--fps` to the transition generation keeps things clean from the start. Use `--concat-fps <n>` to force a specific output frame rate.
95
+
96
+ ## SourceReel: Folder of Images → Loopable Video
97
+
98
+ Turn a folder of images into one stitched video: each image becomes an animated
99
+ clip, consecutive images are bridged by generated transition clips, and the
100
+ whole set is concatenated into a single mp4 (a single image renders one clip with
101
+ no transitions). **Always plan first — `--reel-plan-only` prints the planned
102
+ clips/transitions for free without rendering.** The render populates a working
103
+ folder (`<source>/sogni-source-reel-*`, or `--reel-workdir <dir>`) that keeps
104
+ every intermediate ref, clip, and transition so reruns can reuse them; the final
105
+ stitch **requires ffmpeg**. Looping is on by default (a last→first transition
106
+ closes the loop) — pass `--no-reel-loop` for a one-way reel.
107
+
108
+ ```bash
109
+ # 1. Plan the reel for free (no rendering)
110
+ sogni-agent --source-reel ./images --reel-plan-only
111
+
112
+ # 2. Render clips + transitions and stitch (loop on by default)
113
+ sogni-agent --source-reel ./images \
114
+ --reel-image-seconds 3 --reel-transition-seconds 3 \
115
+ --reel-image-prompt "friendly camera-ready motion" \
116
+ --reel-output ./reel.mp4
117
+ ```
118
+
119
+ ## Segment a Longer Reference Video
120
+
121
+ For local stitched workflows that only need part of a source video:
122
+
123
+ ```bash
124
+ sogni-agent --video --workflow v2v --ref-video dance.mp4 \
125
+ --video-start 10 --duration 8 --controlnet-name pose -o ./clip-2.mp4 \
126
+ "robot dancing"
127
+ ```
128
+
129
+ ## Remix / Layer Audio After Stitching
130
+
131
+ After concatenating, use `--remix-audio` to rebuild the audio track **without re-encoding the video** (the picture is stream-copied — fast and lossless):
132
+
133
+ ```bash
134
+ # Loop one clip's audio across the whole merged video and fade it out at the end
135
+ sogni-agent --remix-audio ./merged.mp4 ./final.mp4 \
136
+ --bed-audio ./clip1.mp4 --audio-loop --audio-fade-out 2
137
+
138
+ # Same, but also layer a second clip's original audio back in starting at 18s
139
+ sogni-agent --remix-audio ./merged.mp4 ./final.mp4 \
140
+ --bed-audio ./clip1.mp4 --audio-loop --audio-fade-out 2 \
141
+ --mix-audio ./clip3.mp4 --mix-at 18.01 --mix-gain -3
142
+ ```
143
+
144
+ - `--bed-audio` accepts a video or audio file; if omitted, the input video's own audio is the bed.
145
+ - `--audio-loop` loops the bed to cover the full video; `--audio-fade-in` / `--audio-fade-out` fade it.
146
+ - `--mix-audio` overlays one extra track (mixed with a peak limiter so it never clips); position it with `--mix-at` and adjust level with `--mix-gain` (dB).
147
+ - To mix more than two layers, chain `--remix-audio` passes (each only re-encodes audio).
148
+
149
+ ## Multiple Angles (Turnaround) and 360 Video
150
+
151
+ Generate specific camera angles from a single reference image using the Multiple Angles LoRA:
152
+
153
+ ```bash
154
+ # Single angle
155
+ sogni-agent --multi-angle -c subject.jpg \
156
+ --azimuth front-right --elevation eye-level --distance medium \
157
+ --angle-strength 0.9 \
158
+ "studio portrait, same person"
159
+
160
+ # 360 sweep (8 azimuths)
161
+ sogni-agent --angles-360 -c subject.jpg --distance medium --elevation eye-level \
162
+ "studio portrait, same person"
163
+
164
+ # 360 sweep video (looping mp4, uses i2v between angles; requires ffmpeg)
165
+ sogni-agent --angles-360 --angles-360-video ./turntable.mp4 \
166
+ -c subject.jpg --distance medium --elevation eye-level \
167
+ "studio portrait, same person"
168
+ ```
169
+
170
+ The prompt is auto-built with the required `<sks>` token plus the selected camera angle keywords. `--angles-360-video` generates i2v clips between consecutive angles (including last→first) and concatenates them with ffmpeg for a seamless loop. Use `--video-model <id>` to override the i2v model for the clips (e.g. `wan_v2.2-14b-fp8_i2v` for higher quality).
171
+
172
+ ### 360 Video Best Practices
173
+
174
+ 1. **Default camera parameters** (do not ask unless they specify): elevation **eye-level**, distance **medium**.
175
+ 2. **Map user terms to flags**:
176
+
177
+ | User says | Flag value |
178
+ |-----------|------------|
179
+ | "high" angle | `--elevation high-angle` |
180
+ | "medium" angle | `--elevation eye-level` |
181
+ | "low" angle | `--elevation low-angle` |
182
+ | "close" | `--distance close-up` |
183
+ | "medium" distance | `--distance medium` |
184
+ | "far" | `--distance wide` |
185
+
186
+ 3. **Always use first-frame/last-frame stitching** — `--angles-360-video` handles this automatically (i2v clips between consecutive angles including last→first).
187
+
188
+ ### Change Angle (Novel View Synthesis) term mapping
189
+
190
+ - "from the left" / "side view" → `--azimuth left`
191
+ - "3/4 view" / "three-quarter" → `--azimuth front-right`
192
+ - "from behind" / "back" → `--azimuth back`
193
+ - "looking up at" → `--elevation low-angle`
194
+ - "bird's eye" / "top-down" → `--elevation high-angle`
195
+ - "closeup" → `--distance close-up`
196
+
197
+ ## Video-to-Video (V2V) with ControlNet
198
+
199
+ ```bash
200
+ # Basic v2v with canny edge detection
201
+ sogni-agent --video --workflow v2v --ref-video input.mp4 \
202
+ --controlnet-name canny "stylized anime version"
203
+
204
+ # V2V with pose detection and custom strength
205
+ sogni-agent --video --workflow v2v --ref-video dance.mp4 \
206
+ --ref robot-subject.png \
207
+ --controlnet-name pose --controlnet-strength 0.7 "robot dancing"
208
+
209
+ # Seedance V2V without ControlNet
210
+ sogni-agent --video --workflow v2v -m seedance2-v2v \
211
+ --ref-video input.mp4 "make the clip more cinematic"
212
+ ```
213
+
214
+ ControlNet types: `canny` (edges), `pose` (body pose), `depth` (depth map), `detailer` (detail enhancement). LTX 2.5 `pose` requires both `--ref-video` for the motion/pose sequence and `--ref` for the subject appearance; explicit LTX 2.3 rollback keeps its existing optional-image behavior. Default strengths are tuned from Sogni Chat: `canny`/`pose`/`depth` use `0.85` plus detailer assist; `detailer` uses `1.0` for preservation. For Seedance V2V, use `-m seedance2-v2v` and omit ControlNet. Audio references must be paired with an image or video reference.
215
+
216
+ ### V2V Outpaint (Canvas Extension) and Inpaint (Masked Region)
217
+
218
+ The LTX-2.5 v2v selector `ltx25-v2v` adds two control modes
219
+ beyond `canny`/`pose`/`depth`/`detailer`:
220
+
221
+ - **`outpaint`** — extend/expand the video canvas (for example, make a vertical
222
+ clip widescreen, or add space in one direction). Outpaint is **positional and
223
+ mask-free**: it anchors the original frame inside a larger canvas. The anchor
224
+ position is `center`, `top`, `bottom`, `left`, or `right` (where the original
225
+ frame sits in the expanded canvas — `left` keeps the original on the left and
226
+ grows to the right; `center` expands all sides). An optional target aspect
227
+ ratio (`16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9`) shapes the expanded
228
+ canvas. The canvas only grows — it never crops. **No mask is needed.**
229
+ - **`inpaint`** — regenerate a masked region of the source video (for example,
230
+ "replace what's behind the subject"). Inpaint **requires a mask image** where
231
+ **white pixels mark the region to regenerate**.
232
+
233
+ These modes run as Sogni Projects on the v2v surface. In the hosted
234
+ `video_to_video` tool the control mode is selected with `controlMode` set to
235
+ `outpaint` or `inpaint` (with `outpaintPosition` / optional
236
+ `outpaintAspectRatio` for outpaint, or `maskImageIndex` for inpaint). Hosted
237
+ execution can derive an inpaint mask if the user did not upload one. The direct
238
+ CLI and underlying sogni-client SDK example expose them as `--control-type` /
239
+ `control-type` (`canny|pose|depth|detailer|outpaint|inpaint`), with `--mask`
240
+ for direct inpaint (white = region to regenerate), `--outpaint-position`
241
+ (`center|top|bottom|left|right`), and optional `--outpaint-aspect-ratio`
242
+ (`16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9`) for direct outpaint. These
243
+ extension/inpaint controls are video-only.
244
+
245
+ ```bash
246
+ sogni-agent -q --video --workflow v2v -m ltx25-v2v \
247
+ --ref-video ./source.mp4 --control-type outpaint \
248
+ --outpaint-position center --outpaint-aspect-ratio 16:9 \
249
+ -o ./outpainted.mp4 "Extend the surrounding scene naturally"
250
+
251
+ sogni-agent -q --video --workflow v2v -m ltx25-v2v \
252
+ --ref-video ./source.mp4 --control-type inpaint --mask ./mask.png \
253
+ -o ./inpainted.mp4 "Replace the masked region with clean matching detail"
254
+ ```
255
+
256
+ ## Music-to-Video Pipeline
257
+
258
+ 1. Use the provided/generated audio file as `--ref-audio`
259
+ 2. If there is also a reference image, omit `--workflow` and let the CLI auto-select LTX 2.5 `ia2v`
260
+ 3. If there is no reference image, omit `--workflow` and let the CLI auto-select LTX 2.5 `a2v`
261
+ 4. Use `--workflow s2v` only for explicit face lip-sync with a face image
262
+ 5. If only part of the song/audio should drive the clip, pass `--audio-start <sec>` and optionally `--audio-duration <sec>`