@sogni-ai/sogni-client-wrapper 1.1.1 → 1.2.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 +16 -20
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -119,16 +119,19 @@ The wrapper now supports video generation using Sogni's WAN models. Generate stu
|
|
|
119
119
|
### Video Generation Example
|
|
120
120
|
|
|
121
121
|
```typescript
|
|
122
|
-
// Text-to-Video (t2v)
|
|
122
|
+
// Text-to-Video (t2v) using speed variant for reliability
|
|
123
123
|
const videoResult = await client.createVideoProject({
|
|
124
|
-
modelId: 'wan_v2.2-14b-
|
|
124
|
+
modelId: 'wan_v2.2-14b-fp8_t2v_lightx2v', // Speed variant (4 steps)
|
|
125
125
|
positivePrompt: 'A serene waterfall flowing through a lush green forest',
|
|
126
126
|
numberOfMedia: 1,
|
|
127
|
-
frames:
|
|
128
|
-
fps:
|
|
129
|
-
width:
|
|
130
|
-
height:
|
|
127
|
+
frames: 81, // Generate 81 frames (5 seconds at 16fps)
|
|
128
|
+
fps: 16, // 16 frames per second
|
|
129
|
+
width: 640, // 640x640 resolution
|
|
130
|
+
height: 640,
|
|
131
|
+
steps: 4, // Optimized for speed variant
|
|
131
132
|
outputFormat: 'mp4',
|
|
133
|
+
waitForCompletion: true,
|
|
134
|
+
timeout: 300000, // 5 minute timeout for video generation
|
|
132
135
|
});
|
|
133
136
|
|
|
134
137
|
console.log('Video URLs:', videoResult.videoUrls);
|
|
@@ -140,29 +143,22 @@ The wrapper supports multiple video generation workflows:
|
|
|
140
143
|
|
|
141
144
|
1. **Text-to-Video (t2v)**: Generate videos from text prompts
|
|
142
145
|
2. **Image-to-Video (i2v)**: Animate static images or interpolate between two images
|
|
143
|
-
3. **
|
|
144
|
-
4. **Animate Workflows**: Create character animations or motion transfers
|
|
146
|
+
3. **Animate Workflows**: Create character animations or motion transfers
|
|
145
147
|
|
|
146
148
|
### Advanced Video Examples
|
|
147
149
|
|
|
148
150
|
```typescript
|
|
149
151
|
// Image-to-Video with interpolation
|
|
150
152
|
const i2vResult = await client.createVideoProject({
|
|
151
|
-
modelId: 'wan_v2.2-14b-
|
|
153
|
+
modelId: 'wan_v2.2-14b-fp8_i2v_lightx2v',
|
|
152
154
|
positivePrompt: 'Smooth camera movement',
|
|
153
155
|
referenceImage: startImageBuffer, // Starting image
|
|
154
156
|
referenceImageEnd: endImageBuffer, // Optional: end image for interpolation
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
const s2vResult = await client.createVideoProject({
|
|
161
|
-
modelId: 'wan_v2.2-14b-fp8_s2v',
|
|
162
|
-
positivePrompt: 'Dancing person synchronized with music',
|
|
163
|
-
referenceAudio: audioBuffer, // Audio file to sync with
|
|
164
|
-
frames: 120,
|
|
165
|
-
fps: 24,
|
|
157
|
+
width: 512,
|
|
158
|
+
height: 512,
|
|
159
|
+
frames: 81,
|
|
160
|
+
fps: 16,
|
|
161
|
+
steps: 4,
|
|
166
162
|
});
|
|
167
163
|
|
|
168
164
|
// Animate with motion transfer
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sogni-ai/sogni-client-wrapper",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Enhanced Node.js wrapper for Sogni AI SDK with n8n compatibility and improved developer experience",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/sogni-ai/sogni-client-wrapper#readme",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@sogni-ai/sogni-client": "4.0.0-alpha.
|
|
38
|
+
"@sogni-ai/sogni-client": "4.0.0-alpha.29"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^22.0.0",
|