n8n-nodes-piapi 0.1.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/LICENSE.md +19 -0
- package/README.md +41 -0
- package/dist/credentials/PiAPI.credentials.d.ts +8 -0
- package/dist/credentials/PiAPI.credentials.js +46 -0
- package/dist/credentials/PiAPI.credentials.js.map +1 -0
- package/dist/nodes/PiAPI/DreamMachine/DreamMachineExtendVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/DreamMachine/DreamMachineExtendVideo.node.js +237 -0
- package/dist/nodes/PiAPI/DreamMachine/DreamMachineExtendVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/DreamMachine/DreamMachineImageToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/DreamMachine/DreamMachineImageToVideo.node.js +270 -0
- package/dist/nodes/PiAPI/DreamMachine/DreamMachineImageToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/DreamMachine/DreamMachineTextToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/DreamMachine/DreamMachineTextToVideo.node.js +186 -0
- package/dist/nodes/PiAPI/DreamMachine/DreamMachineTextToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/Flux/FluxImageToImage.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Flux/FluxImageToImage.node.js +359 -0
- package/dist/nodes/PiAPI/Flux/FluxImageToImage.node.js.map +1 -0
- package/dist/nodes/PiAPI/Flux/FluxTextToImage.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Flux/FluxTextToImage.node.js +398 -0
- package/dist/nodes/PiAPI/Flux/FluxTextToImage.node.js.map +1 -0
- package/dist/nodes/PiAPI/Hailuo/HailuoImageToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Hailuo/HailuoImageToVideo.node.js +190 -0
- package/dist/nodes/PiAPI/Hailuo/HailuoImageToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/Hailuo/HailuoSubjectVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Hailuo/HailuoSubjectVideo.node.js +140 -0
- package/dist/nodes/PiAPI/Hailuo/HailuoSubjectVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/Hailuo/HailuoTextToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Hailuo/HailuoTextToVideo.node.js +150 -0
- package/dist/nodes/PiAPI/Hailuo/HailuoTextToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/Hailuo/index.d.ts +4 -0
- package/dist/nodes/PiAPI/Hailuo/index.js +10 -0
- package/dist/nodes/PiAPI/Hailuo/index.js.map +1 -0
- package/dist/nodes/PiAPI/Hunyuan/HunyuanImageToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Hunyuan/HunyuanImageToVideo.node.js +227 -0
- package/dist/nodes/PiAPI/Hunyuan/HunyuanImageToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/Hunyuan/HunyuanTextToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Hunyuan/HunyuanTextToVideo.node.js +142 -0
- package/dist/nodes/PiAPI/Hunyuan/HunyuanTextToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/Hunyuan/index.d.ts +3 -0
- package/dist/nodes/PiAPI/Hunyuan/index.js +8 -0
- package/dist/nodes/PiAPI/Hunyuan/index.js.map +1 -0
- package/dist/nodes/PiAPI/Kling/KlingEffects.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Kling/KlingEffects.node.js +175 -0
- package/dist/nodes/PiAPI/Kling/KlingEffects.node.js.map +1 -0
- package/dist/nodes/PiAPI/Kling/KlingImageToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Kling/KlingImageToVideo.node.js +411 -0
- package/dist/nodes/PiAPI/Kling/KlingImageToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/Kling/KlingLipSync.node.d.ts +13 -0
- package/dist/nodes/PiAPI/Kling/KlingLipSync.node.js +276 -0
- package/dist/nodes/PiAPI/Kling/KlingLipSync.node.js.map +1 -0
- package/dist/nodes/PiAPI/Kling/KlingTextToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Kling/KlingTextToVideo.node.js +206 -0
- package/dist/nodes/PiAPI/Kling/KlingTextToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/Kling/KlingTryOn.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Kling/KlingTryOn.node.js +426 -0
- package/dist/nodes/PiAPI/Kling/KlingTryOn.node.js.map +1 -0
- package/dist/nodes/PiAPI/Kling/KlingVideoExtend.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Kling/KlingVideoExtend.node.js +93 -0
- package/dist/nodes/PiAPI/Kling/KlingVideoExtend.node.js.map +1 -0
- package/dist/nodes/PiAPI/Skyreels/SkytreelsImageToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Skyreels/SkytreelsImageToVideo.node.js +242 -0
- package/dist/nodes/PiAPI/Skyreels/SkytreelsImageToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/Skyreels/index.d.ts +2 -0
- package/dist/nodes/PiAPI/Skyreels/index.js +6 -0
- package/dist/nodes/PiAPI/Skyreels/index.js.map +1 -0
- package/dist/nodes/PiAPI/TaskStatus/PiAPITaskStatus.node.d.ts +5 -0
- package/dist/nodes/PiAPI/TaskStatus/PiAPITaskStatus.node.js +125 -0
- package/dist/nodes/PiAPI/TaskStatus/PiAPITaskStatus.node.js.map +1 -0
- package/dist/nodes/PiAPI/Trellis/TrellisModelGeneration.node.d.ts +5 -0
- package/dist/nodes/PiAPI/Trellis/TrellisModelGeneration.node.js +262 -0
- package/dist/nodes/PiAPI/Trellis/TrellisModelGeneration.node.js.map +1 -0
- package/dist/nodes/PiAPI/Trellis/index.d.ts +2 -0
- package/dist/nodes/PiAPI/Trellis/index.js +6 -0
- package/dist/nodes/PiAPI/Trellis/index.js.map +1 -0
- package/dist/nodes/PiAPI/WanX/WanXImageToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/WanX/WanXImageToVideo.node.js +227 -0
- package/dist/nodes/PiAPI/WanX/WanXImageToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/WanX/WanXTextToVideo.node.d.ts +5 -0
- package/dist/nodes/PiAPI/WanX/WanXTextToVideo.node.js +129 -0
- package/dist/nodes/PiAPI/WanX/WanXTextToVideo.node.js.map +1 -0
- package/dist/nodes/PiAPI/piapi.svg +5 -0
- package/dist/nodes/PiAPI/shared/Constants.d.ts +30 -0
- package/dist/nodes/PiAPI/shared/Constants.js +262 -0
- package/dist/nodes/PiAPI/shared/Constants.js.map +1 -0
- package/dist/nodes/PiAPI/shared/GenericFunctions.d.ts +3 -0
- package/dist/nodes/PiAPI/shared/GenericFunctions.js +43 -0
- package/dist/nodes/PiAPI/shared/GenericFunctions.js.map +1 -0
- package/dist/nodes/PiAPI/shared/Interfaces.d.ts +102 -0
- package/dist/nodes/PiAPI/shared/Interfaces.js +3 -0
- package/dist/nodes/PiAPI/shared/Interfaces.js.map +1 -0
- package/dist/package.json +95 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/index.js +6 -0
- package/package.json +95 -0
package/LICENSE.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright 2022 n8n
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
5
|
+
the Software without restriction, including without limitation the rights to
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
7
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
8
|
+
so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
11
|
+
copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19
|
+
SOFTWARE.
|
package/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
> **Currently in BETA and under active development.**
|
2
|
+
|
3
|
+
# n8n-nodes-piapi
|
4
|
+
|
5
|
+
This n8n community node enables seamless integration of **[piAPI](https://piapi.ai/workspace?via=valics) in your [n8n](https://n8n.io) workflows**.
|
6
|
+
|
7
|
+
## Features
|
8
|
+
|
9
|
+
- Image to Video
|
10
|
+
- Text to Video
|
11
|
+
- Video Extension
|
12
|
+
- Video Effects
|
13
|
+
- Text to Image
|
14
|
+
- Image to Image
|
15
|
+
- Virtual Try-on
|
16
|
+
- Lip sync
|
17
|
+
|
18
|
+
## Installation
|
19
|
+
|
20
|
+
Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
|
21
|
+
|
22
|
+
## More information
|
23
|
+
|
24
|
+
Description of the node will go here.
|
25
|
+
|
26
|
+
## Credentials
|
27
|
+
|
28
|
+
You will need an API key from piapi.ai to use this node. Add the API key to the credentials section in the settings of the node.
|
29
|
+
|
30
|
+
## Version history
|
31
|
+
|
32
|
+
### 0.1.0
|
33
|
+
Initial version, RunwayML integrated with some services.
|
34
|
+
|
35
|
+
## Compatibility
|
36
|
+
|
37
|
+
1.80.0 and above
|
38
|
+
|
39
|
+
## License
|
40
|
+
|
41
|
+
[MIT](https://github.com/n8n-io/n8n-nodes-piapi/blob/master/LICENSE.md)
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
2
|
+
export declare class PiAPI implements ICredentialType {
|
3
|
+
name: string;
|
4
|
+
displayName: string;
|
5
|
+
properties: INodeProperties[];
|
6
|
+
authenticate: IAuthenticateGeneric;
|
7
|
+
test: ICredentialTestRequest;
|
8
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.PiAPI = void 0;
|
4
|
+
class PiAPI {
|
5
|
+
constructor() {
|
6
|
+
this.name = 'piAPIApi';
|
7
|
+
this.displayName = 'PiAPI';
|
8
|
+
this.properties = [
|
9
|
+
{
|
10
|
+
displayName: 'API Key',
|
11
|
+
name: 'apiKey',
|
12
|
+
type: 'string',
|
13
|
+
typeOptions: {
|
14
|
+
password: true,
|
15
|
+
},
|
16
|
+
default: '',
|
17
|
+
required: true,
|
18
|
+
description: 'Your PiAPI API key from the PiAPI workspace',
|
19
|
+
},
|
20
|
+
];
|
21
|
+
this.authenticate = {
|
22
|
+
type: 'generic',
|
23
|
+
properties: {
|
24
|
+
headers: {
|
25
|
+
'x-api-key': '={{ $credentials.apiKey }}',
|
26
|
+
},
|
27
|
+
},
|
28
|
+
};
|
29
|
+
this.test = {
|
30
|
+
request: {
|
31
|
+
baseURL: 'https://api.piapi.ai',
|
32
|
+
url: '/api/v1/task',
|
33
|
+
method: 'POST',
|
34
|
+
body: {
|
35
|
+
model: 'Qubico/flux1-schnell',
|
36
|
+
task_type: 'txt2img',
|
37
|
+
input: {
|
38
|
+
prompt: 'test credential validation',
|
39
|
+
}
|
40
|
+
},
|
41
|
+
},
|
42
|
+
};
|
43
|
+
}
|
44
|
+
}
|
45
|
+
exports.PiAPI = PiAPI;
|
46
|
+
//# sourceMappingURL=PiAPI.credentials.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"PiAPI.credentials.js","sourceRoot":"","sources":["../../credentials/PiAPI.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,KAAK;IAAlB;QACC,SAAI,GAAG,UAAU,CAAC;QAClB,gBAAW,GAAG,OAAO,CAAC;QACtB,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,6CAA6C;aAC1D;SACD,CAAC;QAEF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,WAAW,EAAE,4BAA4B;iBACzC;aACD;SACD,CAAC;QAEF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,sBAAsB;gBAC/B,GAAG,EAAE,cAAc;gBACnB,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE;oBACL,KAAK,EAAE,sBAAsB;oBAC7B,SAAS,EAAE,SAAS;oBACpB,KAAK,EAAE;wBACN,MAAM,EAAE,4BAA4B;qBACpC;iBACD;aACD;SACD,CAAC;IACH,CAAC;CAAA;AAxCD,sBAwCC"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
2
|
+
export declare class DreamMachineExtendVideo implements INodeType {
|
3
|
+
description: INodeTypeDescription;
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
5
|
+
}
|
@@ -0,0 +1,237 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DreamMachineExtendVideo = void 0;
|
4
|
+
const GenericFunctions_1 = require("../shared/GenericFunctions");
|
5
|
+
class DreamMachineExtendVideo {
|
6
|
+
constructor() {
|
7
|
+
this.description = {
|
8
|
+
displayName: 'PiAPI Dream Machine Extend Video',
|
9
|
+
name: 'dreamMachineExtendVideo',
|
10
|
+
icon: 'file:../piapi.svg',
|
11
|
+
group: ['transform'],
|
12
|
+
version: 1,
|
13
|
+
description: 'Extend existing videos using PiAPI Dream Machine',
|
14
|
+
defaults: {
|
15
|
+
name: 'Dream Machine Extend Video',
|
16
|
+
},
|
17
|
+
inputs: ["main"],
|
18
|
+
outputs: ["main"],
|
19
|
+
credentials: [
|
20
|
+
{
|
21
|
+
name: 'piAPIApi',
|
22
|
+
required: true,
|
23
|
+
},
|
24
|
+
],
|
25
|
+
properties: [
|
26
|
+
{
|
27
|
+
displayName: 'Prompt',
|
28
|
+
name: 'prompt',
|
29
|
+
type: 'string',
|
30
|
+
typeOptions: {
|
31
|
+
rows: 4,
|
32
|
+
},
|
33
|
+
default: '',
|
34
|
+
required: true,
|
35
|
+
description: 'Descriptive prompt for video extension',
|
36
|
+
},
|
37
|
+
{
|
38
|
+
displayName: 'Video Source',
|
39
|
+
name: 'videoSource',
|
40
|
+
type: 'options',
|
41
|
+
options: [
|
42
|
+
{
|
43
|
+
name: 'URL',
|
44
|
+
value: 'url',
|
45
|
+
},
|
46
|
+
{
|
47
|
+
name: 'Binary Data',
|
48
|
+
value: 'binaryData',
|
49
|
+
},
|
50
|
+
],
|
51
|
+
default: 'url',
|
52
|
+
description: 'The source of the input video',
|
53
|
+
},
|
54
|
+
{
|
55
|
+
displayName: 'Video URL',
|
56
|
+
name: 'videoUrl',
|
57
|
+
type: 'string',
|
58
|
+
default: '',
|
59
|
+
required: true,
|
60
|
+
displayOptions: {
|
61
|
+
show: {
|
62
|
+
videoSource: ['url'],
|
63
|
+
},
|
64
|
+
},
|
65
|
+
description: 'URL of the video to extend',
|
66
|
+
},
|
67
|
+
{
|
68
|
+
displayName: 'Binary Property',
|
69
|
+
name: 'binaryPropertyName',
|
70
|
+
type: 'string',
|
71
|
+
default: 'data',
|
72
|
+
required: true,
|
73
|
+
displayOptions: {
|
74
|
+
show: {
|
75
|
+
videoSource: ['binaryData'],
|
76
|
+
},
|
77
|
+
},
|
78
|
+
description: 'Name of the binary property containing the video data',
|
79
|
+
},
|
80
|
+
{
|
81
|
+
displayName: 'Model Name',
|
82
|
+
name: 'modelName',
|
83
|
+
type: 'options',
|
84
|
+
options: [
|
85
|
+
{
|
86
|
+
name: 'Ray v1',
|
87
|
+
value: 'ray-v1',
|
88
|
+
},
|
89
|
+
{
|
90
|
+
name: 'Ray v2',
|
91
|
+
value: 'ray-v2',
|
92
|
+
},
|
93
|
+
],
|
94
|
+
default: 'ray-v1',
|
95
|
+
description: 'The model to use for video extension',
|
96
|
+
},
|
97
|
+
{
|
98
|
+
displayName: 'Aspect Ratio',
|
99
|
+
name: 'aspectRatio',
|
100
|
+
type: 'options',
|
101
|
+
options: [
|
102
|
+
{
|
103
|
+
name: 'Portrait (9:16)',
|
104
|
+
value: '9:16',
|
105
|
+
},
|
106
|
+
{
|
107
|
+
name: 'Portrait (3:4)',
|
108
|
+
value: '3:4',
|
109
|
+
},
|
110
|
+
{
|
111
|
+
name: 'Square (1:1)',
|
112
|
+
value: '1:1',
|
113
|
+
},
|
114
|
+
{
|
115
|
+
name: 'Landscape (4:3)',
|
116
|
+
value: '4:3',
|
117
|
+
},
|
118
|
+
{
|
119
|
+
name: 'Landscape (16:9)',
|
120
|
+
value: '16:9',
|
121
|
+
},
|
122
|
+
{
|
123
|
+
name: 'Cinematic (21:9)',
|
124
|
+
value: '21:9',
|
125
|
+
},
|
126
|
+
],
|
127
|
+
default: '16:9',
|
128
|
+
description: 'Aspect ratio of the generated video',
|
129
|
+
},
|
130
|
+
{
|
131
|
+
displayName: 'Service Mode',
|
132
|
+
name: 'serviceMode',
|
133
|
+
type: 'options',
|
134
|
+
options: [
|
135
|
+
{
|
136
|
+
name: 'Default (User Workspace Setting)',
|
137
|
+
value: '',
|
138
|
+
},
|
139
|
+
{
|
140
|
+
name: 'Pay-as-you-go (PAYG)',
|
141
|
+
value: 'public',
|
142
|
+
},
|
143
|
+
{
|
144
|
+
name: 'Host-your-account (HYA)',
|
145
|
+
value: 'private',
|
146
|
+
},
|
147
|
+
],
|
148
|
+
default: '',
|
149
|
+
description: 'The service mode for processing the task',
|
150
|
+
},
|
151
|
+
{
|
152
|
+
displayName: 'Wait for Completion',
|
153
|
+
name: 'waitForCompletion',
|
154
|
+
type: 'boolean',
|
155
|
+
default: false,
|
156
|
+
description: 'Wait for task to complete and return results',
|
157
|
+
},
|
158
|
+
],
|
159
|
+
};
|
160
|
+
}
|
161
|
+
async execute() {
|
162
|
+
var _a;
|
163
|
+
const items = this.getInputData();
|
164
|
+
const returnData = [];
|
165
|
+
for (let i = 0; i < items.length; i++) {
|
166
|
+
const prompt = this.getNodeParameter('prompt', i);
|
167
|
+
const modelName = this.getNodeParameter('modelName', i);
|
168
|
+
const aspectRatio = this.getNodeParameter('aspectRatio', i);
|
169
|
+
const serviceMode = this.getNodeParameter('serviceMode', i);
|
170
|
+
const waitForCompletion = this.getNodeParameter('waitForCompletion', i, true);
|
171
|
+
const videoSource = this.getNodeParameter('videoSource', i);
|
172
|
+
let videoUrl = '';
|
173
|
+
if (videoSource === 'url') {
|
174
|
+
videoUrl = this.getNodeParameter('videoUrl', i);
|
175
|
+
}
|
176
|
+
else {
|
177
|
+
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
|
178
|
+
const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
|
179
|
+
if (binaryData.mimeType && !binaryData.mimeType.includes('video/')) {
|
180
|
+
throw new Error('The provided binary data is not a video');
|
181
|
+
}
|
182
|
+
if (binaryData.data) {
|
183
|
+
const dataBuffer = Buffer.from(binaryData.data, 'base64');
|
184
|
+
videoUrl = `data:${binaryData.mimeType};base64,${dataBuffer.toString('base64')}`;
|
185
|
+
}
|
186
|
+
else if (binaryData.url) {
|
187
|
+
videoUrl = binaryData.url;
|
188
|
+
}
|
189
|
+
else {
|
190
|
+
throw new Error('No usable video data found in the provided binary property');
|
191
|
+
}
|
192
|
+
}
|
193
|
+
const body = {
|
194
|
+
model: 'luma',
|
195
|
+
task_type: 'extend_video',
|
196
|
+
input: {
|
197
|
+
prompt,
|
198
|
+
key_frames: {
|
199
|
+
frame0: {
|
200
|
+
type: 'video',
|
201
|
+
url: videoUrl,
|
202
|
+
},
|
203
|
+
},
|
204
|
+
model_name: modelName,
|
205
|
+
aspect_ratio: aspectRatio,
|
206
|
+
},
|
207
|
+
config: {
|
208
|
+
service_mode: serviceMode,
|
209
|
+
},
|
210
|
+
};
|
211
|
+
try {
|
212
|
+
const response = await GenericFunctions_1.piApiRequest.call(this, 'POST', '/api/v1/task', body);
|
213
|
+
let taskResult = response;
|
214
|
+
if (waitForCompletion && ((_a = response.data) === null || _a === void 0 ? void 0 : _a.task_id)) {
|
215
|
+
taskResult = await GenericFunctions_1.waitForTaskCompletion.call(this, response.data.task_id);
|
216
|
+
}
|
217
|
+
returnData.push({
|
218
|
+
json: taskResult,
|
219
|
+
});
|
220
|
+
}
|
221
|
+
catch (error) {
|
222
|
+
if (this.continueOnFail()) {
|
223
|
+
returnData.push({
|
224
|
+
json: {
|
225
|
+
error: error.message,
|
226
|
+
},
|
227
|
+
});
|
228
|
+
continue;
|
229
|
+
}
|
230
|
+
throw error;
|
231
|
+
}
|
232
|
+
}
|
233
|
+
return [returnData];
|
234
|
+
}
|
235
|
+
}
|
236
|
+
exports.DreamMachineExtendVideo = DreamMachineExtendVideo;
|
237
|
+
//# sourceMappingURL=DreamMachineExtendVideo.node.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DreamMachineExtendVideo.node.js","sourceRoot":"","sources":["../../../../nodes/PiAPI/DreamMachine/DreamMachineExtendVideo.node.ts"],"names":[],"mappings":";;;AAQA,iEAAiF;AAEjF,MAAa,uBAAuB;IAApC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,kCAAkC;YAC/C,IAAI,EAAE,yBAAyB;YAC/B,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAA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BACjD,UAAU,GAAG,MAAM,wCAAqB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBAC5E,CAAC;gBAED,UAAU,CAAC,IAAI,CAAC;oBACf,IAAI,EAAE,UAAU;iBAChB,CAAC,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBAC3B,UAAU,CAAC,IAAI,CAAC;wBACf,IAAI,EAAE;4BACL,KAAK,EAAE,KAAK,CAAC,OAAO;yBACpB;qBACD,CAAC,CAAC;oBACH,SAAS;gBACV,CAAC;gBACD,MAAM,KAAK,CAAC;YACb,CAAC;QACF,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AAjPD,0DAiPC"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
2
|
+
export declare class DreamMachineImageToVideo implements INodeType {
|
3
|
+
description: INodeTypeDescription;
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
5
|
+
}
|
@@ -0,0 +1,270 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DreamMachineImageToVideo = void 0;
|
4
|
+
const GenericFunctions_1 = require("../shared/GenericFunctions");
|
5
|
+
class DreamMachineImageToVideo {
|
6
|
+
constructor() {
|
7
|
+
this.description = {
|
8
|
+
displayName: 'PiAPI Dream Machine Image to Video',
|
9
|
+
name: 'dreamMachineImageToVideo',
|
10
|
+
icon: 'file:../piapi.svg',
|
11
|
+
group: ['transform'],
|
12
|
+
version: 1,
|
13
|
+
description: 'Generate videos from images using PiAPI Dream Machine',
|
14
|
+
defaults: {
|
15
|
+
name: 'Dream Machine Image to Video',
|
16
|
+
},
|
17
|
+
inputs: ["main"],
|
18
|
+
outputs: ["main"],
|
19
|
+
credentials: [
|
20
|
+
{
|
21
|
+
name: 'piAPIApi',
|
22
|
+
required: true,
|
23
|
+
},
|
24
|
+
],
|
25
|
+
properties: [
|
26
|
+
{
|
27
|
+
displayName: 'Prompt',
|
28
|
+
name: 'prompt',
|
29
|
+
type: 'string',
|
30
|
+
typeOptions: {
|
31
|
+
rows: 4,
|
32
|
+
},
|
33
|
+
default: '',
|
34
|
+
required: true,
|
35
|
+
description: 'Descriptive prompt for video generation',
|
36
|
+
},
|
37
|
+
{
|
38
|
+
displayName: 'Image Source',
|
39
|
+
name: 'imageSource',
|
40
|
+
type: 'options',
|
41
|
+
options: [
|
42
|
+
{
|
43
|
+
name: 'URL',
|
44
|
+
value: 'url',
|
45
|
+
},
|
46
|
+
{
|
47
|
+
name: 'Binary Data',
|
48
|
+
value: 'binaryData',
|
49
|
+
},
|
50
|
+
],
|
51
|
+
default: 'url',
|
52
|
+
description: 'The source of the input image',
|
53
|
+
},
|
54
|
+
{
|
55
|
+
displayName: 'Image URL',
|
56
|
+
name: 'imageUrl',
|
57
|
+
type: 'string',
|
58
|
+
default: '',
|
59
|
+
required: true,
|
60
|
+
displayOptions: {
|
61
|
+
show: {
|
62
|
+
imageSource: ['url'],
|
63
|
+
},
|
64
|
+
},
|
65
|
+
description: 'URL of the image to transform into video',
|
66
|
+
},
|
67
|
+
{
|
68
|
+
displayName: 'Binary Property',
|
69
|
+
name: 'binaryPropertyName',
|
70
|
+
type: 'string',
|
71
|
+
default: 'data',
|
72
|
+
required: true,
|
73
|
+
displayOptions: {
|
74
|
+
show: {
|
75
|
+
imageSource: ['binaryData'],
|
76
|
+
},
|
77
|
+
},
|
78
|
+
description: 'Name of the binary property containing the image data',
|
79
|
+
},
|
80
|
+
{
|
81
|
+
displayName: 'Frame Position',
|
82
|
+
name: 'framePosition',
|
83
|
+
type: 'options',
|
84
|
+
options: [
|
85
|
+
{
|
86
|
+
name: 'First Frame (frame0)',
|
87
|
+
value: 'frame0',
|
88
|
+
},
|
89
|
+
{
|
90
|
+
name: 'Last Frame (frame1)',
|
91
|
+
value: 'frame1',
|
92
|
+
},
|
93
|
+
],
|
94
|
+
default: 'frame0',
|
95
|
+
description: 'Position of the image in the video sequence',
|
96
|
+
},
|
97
|
+
{
|
98
|
+
displayName: 'Model Name',
|
99
|
+
name: 'modelName',
|
100
|
+
type: 'options',
|
101
|
+
options: [
|
102
|
+
{
|
103
|
+
name: 'Ray v1',
|
104
|
+
value: 'ray-v1',
|
105
|
+
},
|
106
|
+
{
|
107
|
+
name: 'Ray v2',
|
108
|
+
value: 'ray-v2',
|
109
|
+
},
|
110
|
+
],
|
111
|
+
default: 'ray-v1',
|
112
|
+
description: 'The model to use for video generation',
|
113
|
+
},
|
114
|
+
{
|
115
|
+
displayName: 'Duration',
|
116
|
+
name: 'duration',
|
117
|
+
type: 'options',
|
118
|
+
options: [
|
119
|
+
{
|
120
|
+
name: '5 seconds',
|
121
|
+
value: 5,
|
122
|
+
},
|
123
|
+
],
|
124
|
+
default: 5,
|
125
|
+
description: 'Duration of the generated video in seconds',
|
126
|
+
},
|
127
|
+
{
|
128
|
+
displayName: 'Aspect Ratio',
|
129
|
+
name: 'aspectRatio',
|
130
|
+
type: 'options',
|
131
|
+
options: [
|
132
|
+
{
|
133
|
+
name: 'Portrait (9:16)',
|
134
|
+
value: '9:16',
|
135
|
+
},
|
136
|
+
{
|
137
|
+
name: 'Portrait (3:4)',
|
138
|
+
value: '3:4',
|
139
|
+
},
|
140
|
+
{
|
141
|
+
name: 'Square (1:1)',
|
142
|
+
value: '1:1',
|
143
|
+
},
|
144
|
+
{
|
145
|
+
name: 'Landscape (4:3)',
|
146
|
+
value: '4:3',
|
147
|
+
},
|
148
|
+
{
|
149
|
+
name: 'Landscape (16:9)',
|
150
|
+
value: '16:9',
|
151
|
+
},
|
152
|
+
{
|
153
|
+
name: 'Cinematic (21:9)',
|
154
|
+
value: '21:9',
|
155
|
+
},
|
156
|
+
],
|
157
|
+
default: '16:9',
|
158
|
+
description: 'Aspect ratio of the generated video',
|
159
|
+
},
|
160
|
+
{
|
161
|
+
displayName: 'Service Mode',
|
162
|
+
name: 'serviceMode',
|
163
|
+
type: 'options',
|
164
|
+
options: [
|
165
|
+
{
|
166
|
+
name: 'Default (User Workspace Setting)',
|
167
|
+
value: '',
|
168
|
+
},
|
169
|
+
{
|
170
|
+
name: 'Pay-as-you-go (PAYG)',
|
171
|
+
value: 'public',
|
172
|
+
},
|
173
|
+
{
|
174
|
+
name: 'Host-your-account (HYA)',
|
175
|
+
value: 'private',
|
176
|
+
},
|
177
|
+
],
|
178
|
+
default: '',
|
179
|
+
description: 'The service mode for processing the task',
|
180
|
+
},
|
181
|
+
{
|
182
|
+
displayName: 'Wait for Completion',
|
183
|
+
name: 'waitForCompletion',
|
184
|
+
type: 'boolean',
|
185
|
+
default: false,
|
186
|
+
description: 'Wait for task to complete and return results',
|
187
|
+
},
|
188
|
+
],
|
189
|
+
};
|
190
|
+
}
|
191
|
+
async execute() {
|
192
|
+
var _a;
|
193
|
+
const items = this.getInputData();
|
194
|
+
const returnData = [];
|
195
|
+
for (let i = 0; i < items.length; i++) {
|
196
|
+
const prompt = this.getNodeParameter('prompt', i);
|
197
|
+
const modelName = this.getNodeParameter('modelName', i);
|
198
|
+
const duration = this.getNodeParameter('duration', i);
|
199
|
+
const aspectRatio = this.getNodeParameter('aspectRatio', i);
|
200
|
+
const serviceMode = this.getNodeParameter('serviceMode', i);
|
201
|
+
const waitForCompletion = this.getNodeParameter('waitForCompletion', i, true);
|
202
|
+
const imageSource = this.getNodeParameter('imageSource', i);
|
203
|
+
const framePosition = this.getNodeParameter('framePosition', i);
|
204
|
+
let imageUrl = '';
|
205
|
+
if (imageSource === 'url') {
|
206
|
+
imageUrl = this.getNodeParameter('imageUrl', i);
|
207
|
+
}
|
208
|
+
else {
|
209
|
+
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
|
210
|
+
const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
|
211
|
+
if (binaryData.mimeType && !binaryData.mimeType.includes('image/')) {
|
212
|
+
throw new Error('The provided binary data is not an image');
|
213
|
+
}
|
214
|
+
if (binaryData.data) {
|
215
|
+
const dataBuffer = Buffer.from(binaryData.data, 'base64');
|
216
|
+
imageUrl = `data:${binaryData.mimeType};base64,${dataBuffer.toString('base64')}`;
|
217
|
+
}
|
218
|
+
else if (binaryData.url) {
|
219
|
+
imageUrl = binaryData.url;
|
220
|
+
}
|
221
|
+
else {
|
222
|
+
throw new Error('No usable image data found in the provided binary property');
|
223
|
+
}
|
224
|
+
}
|
225
|
+
const keyFrames = {};
|
226
|
+
keyFrames[framePosition] = {
|
227
|
+
type: 'image',
|
228
|
+
url: imageUrl,
|
229
|
+
};
|
230
|
+
const body = {
|
231
|
+
model: 'luma',
|
232
|
+
task_type: 'video_generation',
|
233
|
+
input: {
|
234
|
+
prompt,
|
235
|
+
key_frames: keyFrames,
|
236
|
+
model_name: modelName,
|
237
|
+
duration,
|
238
|
+
aspect_ratio: aspectRatio,
|
239
|
+
},
|
240
|
+
config: {
|
241
|
+
service_mode: serviceMode,
|
242
|
+
},
|
243
|
+
};
|
244
|
+
try {
|
245
|
+
const response = await GenericFunctions_1.piApiRequest.call(this, 'POST', '/api/v1/task', body);
|
246
|
+
let taskResult = response;
|
247
|
+
if (waitForCompletion && ((_a = response.data) === null || _a === void 0 ? void 0 : _a.task_id)) {
|
248
|
+
taskResult = await GenericFunctions_1.waitForTaskCompletion.call(this, response.data.task_id);
|
249
|
+
}
|
250
|
+
returnData.push({
|
251
|
+
json: taskResult,
|
252
|
+
});
|
253
|
+
}
|
254
|
+
catch (error) {
|
255
|
+
if (this.continueOnFail()) {
|
256
|
+
returnData.push({
|
257
|
+
json: {
|
258
|
+
error: error.message,
|
259
|
+
},
|
260
|
+
});
|
261
|
+
continue;
|
262
|
+
}
|
263
|
+
throw error;
|
264
|
+
}
|
265
|
+
}
|
266
|
+
return [returnData];
|
267
|
+
}
|
268
|
+
}
|
269
|
+
exports.DreamMachineImageToVideo = DreamMachineImageToVideo;
|
270
|
+
//# sourceMappingURL=DreamMachineImageToVideo.node.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DreamMachineImageToVideo.node.js","sourceRoot":"","sources":["../../../../nodes/PiAPI/DreamMachine/DreamMachineImageToVideo.node.ts"],"names":[],"mappings":";;;AAQA,iEAAiF;AAEjF,MAAa,wBAAwB;IAArC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,oCAAoC;YACjD,IAAI,EAAE,0BAA0B;YAChC,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,uDAAuD;YACpE,QAAQ,EAAE;gBACT,IAAI,EAAE,8BAA8B;aACpC;YACD,MAAM,EAAE,QAAyB;YACjC,OAAO,EAAE,QAAyB;YAClC,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,UAAU;oBAChB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,QAAQ;oBACrB,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;wBACZ,IAAI,EAAE,CAAC;qBACP;oBACD,OAAO,EAAE,EAAE;oBACX,QAAQ,EAAE,IAAI;oBACd,WAAW,EAAE,yCAAyC;iBACtD;gBACD;oBACC,WAAW,EAAE,cAAc;oBAC3B,IAAI,EAAE,aAAa;oBACnB,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACR;4BACC,IAAI,EAAE,KAAK;4BACX,KAAK,EAAE,KAAK;yBACZ;wBACD;4BACC,IAAI,EAAE,aAAa;4BACnB,KAAK,EAAE,YAAY;yBACnB;qBACD;oBACD,OAAO,EAAE,KAAK;oBACd,WAAW,EAAE,+BAA+B;iBAC5C;gBACD;oBACC,WAAW,EAAE,WAAW;oBACxB,IAAI,EAAE,UAAU;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AC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBAC5E,CAAC;gBAED,UAAU,CAAC,IAAI,CAAC;oBACf,IAAI,EAAE,UAAU;iBAChB,CAAC,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBAC3B,UAAU,CAAC,IAAI,CAAC;wBACf,IAAI,EAAE;4BACL,KAAK,EAAE,KAAK,CAAC,OAAO;yBACpB;qBACD,CAAC,CAAC;oBACH,SAAS;gBACV,CAAC;gBACD,MAAM,KAAK,CAAC;YACb,CAAC;QACF,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AAnRD,4DAmRC"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
2
|
+
export declare class DreamMachineTextToVideo implements INodeType {
|
3
|
+
description: INodeTypeDescription;
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
5
|
+
}
|