@ibracob.dev/n8n-nodes-fal 1.0.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 +21 -0
- package/README.md +216 -0
- package/dist/credentials/FalApi.credentials.d.ts +10 -0
- package/dist/credentials/FalApi.credentials.d.ts.map +1 -0
- package/dist/credentials/FalApi.credentials.js +36 -0
- package/dist/credentials/FalApi.credentials.js.map +1 -0
- package/dist/credentials/fal-ai-logo.svg +3 -0
- package/dist/nodes/Fal/Fal.node.d.ts +6 -0
- package/dist/nodes/Fal/Fal.node.d.ts.map +1 -0
- package/dist/nodes/Fal/Fal.node.js +202 -0
- package/dist/nodes/Fal/Fal.node.js.map +1 -0
- package/dist/nodes/Fal/enums/index.d.ts +2 -0
- package/dist/nodes/Fal/enums/index.d.ts.map +1 -0
- package/dist/nodes/Fal/enums/index.js +18 -0
- package/dist/nodes/Fal/enums/index.js.map +1 -0
- package/dist/nodes/Fal/enums/queue-status.enum.d.ts +7 -0
- package/dist/nodes/Fal/enums/queue-status.enum.d.ts.map +1 -0
- package/dist/nodes/Fal/enums/queue-status.enum.js +11 -0
- package/dist/nodes/Fal/enums/queue-status.enum.js.map +1 -0
- package/dist/nodes/Fal/fal-ai-logo.svg +3 -0
- package/dist/nodes/Fal/interfaces/index.d.ts +3 -0
- package/dist/nodes/Fal/interfaces/index.d.ts.map +1 -0
- package/dist/nodes/Fal/interfaces/index.js +19 -0
- package/dist/nodes/Fal/interfaces/index.js.map +1 -0
- package/dist/nodes/Fal/interfaces/queue-status-response.interface.d.ts +14 -0
- package/dist/nodes/Fal/interfaces/queue-status-response.interface.d.ts.map +1 -0
- package/dist/nodes/Fal/interfaces/queue-status-response.interface.js +3 -0
- package/dist/nodes/Fal/interfaces/queue-status-response.interface.js.map +1 -0
- package/dist/nodes/Fal/interfaces/queue-submit-response.interface.d.ts +6 -0
- package/dist/nodes/Fal/interfaces/queue-submit-response.interface.d.ts.map +1 -0
- package/dist/nodes/Fal/interfaces/queue-submit-response.interface.js +3 -0
- package/dist/nodes/Fal/interfaces/queue-submit-response.interface.js.map +1 -0
- package/dist/nodes/Fal/resources/image-editing/description.d.ts +5 -0
- package/dist/nodes/Fal/resources/image-editing/description.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/image-editing/description.js +178 -0
- package/dist/nodes/Fal/resources/image-editing/description.js.map +1 -0
- package/dist/nodes/Fal/resources/image-editing/execute/index.d.ts +3 -0
- package/dist/nodes/Fal/resources/image-editing/execute/index.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/image-editing/execute/index.js +63 -0
- package/dist/nodes/Fal/resources/image-editing/execute/index.js.map +1 -0
- package/dist/nodes/Fal/resources/image-editing/index.d.ts +4 -0
- package/dist/nodes/Fal/resources/image-editing/index.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/image-editing/index.js +41 -0
- package/dist/nodes/Fal/resources/image-editing/index.js.map +1 -0
- package/dist/nodes/Fal/resources/image-editing/models.d.ts +6 -0
- package/dist/nodes/Fal/resources/image-editing/models.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/image-editing/models.js +31 -0
- package/dist/nodes/Fal/resources/image-editing/models.js.map +1 -0
- package/dist/nodes/Fal/resources/image-to-video/description.d.ts +5 -0
- package/dist/nodes/Fal/resources/image-to-video/description.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/image-to-video/description.js +236 -0
- package/dist/nodes/Fal/resources/image-to-video/description.js.map +1 -0
- package/dist/nodes/Fal/resources/image-to-video/execute/index.d.ts +3 -0
- package/dist/nodes/Fal/resources/image-to-video/execute/index.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/image-to-video/execute/index.js +64 -0
- package/dist/nodes/Fal/resources/image-to-video/execute/index.js.map +1 -0
- package/dist/nodes/Fal/resources/image-to-video/index.d.ts +4 -0
- package/dist/nodes/Fal/resources/image-to-video/index.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/image-to-video/index.js +41 -0
- package/dist/nodes/Fal/resources/image-to-video/index.js.map +1 -0
- package/dist/nodes/Fal/resources/image-to-video/models.d.ts +6 -0
- package/dist/nodes/Fal/resources/image-to-video/models.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/image-to-video/models.js +66 -0
- package/dist/nodes/Fal/resources/image-to-video/models.js.map +1 -0
- package/dist/nodes/Fal/resources/llm/description.d.ts +5 -0
- package/dist/nodes/Fal/resources/llm/description.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/llm/description.js +132 -0
- package/dist/nodes/Fal/resources/llm/description.js.map +1 -0
- package/dist/nodes/Fal/resources/llm/execute/index.d.ts +3 -0
- package/dist/nodes/Fal/resources/llm/execute/index.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/llm/execute/index.js +49 -0
- package/dist/nodes/Fal/resources/llm/execute/index.js.map +1 -0
- package/dist/nodes/Fal/resources/llm/index.d.ts +4 -0
- package/dist/nodes/Fal/resources/llm/index.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/llm/index.js +41 -0
- package/dist/nodes/Fal/resources/llm/index.js.map +1 -0
- package/dist/nodes/Fal/resources/llm/models.d.ts +6 -0
- package/dist/nodes/Fal/resources/llm/models.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/llm/models.js +136 -0
- package/dist/nodes/Fal/resources/llm/models.js.map +1 -0
- package/dist/nodes/Fal/resources/queue/description.d.ts +4 -0
- package/dist/nodes/Fal/resources/queue/description.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/queue/description.js +149 -0
- package/dist/nodes/Fal/resources/queue/description.js.map +1 -0
- package/dist/nodes/Fal/resources/queue/execute/index.d.ts +3 -0
- package/dist/nodes/Fal/resources/queue/execute/index.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/queue/execute/index.js +220 -0
- package/dist/nodes/Fal/resources/queue/execute/index.js.map +1 -0
- package/dist/nodes/Fal/resources/queue/index.d.ts +4 -0
- package/dist/nodes/Fal/resources/queue/index.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/queue/index.js +9 -0
- package/dist/nodes/Fal/resources/queue/index.js.map +1 -0
- package/dist/nodes/Fal/resources/queue/models.d.ts +75 -0
- package/dist/nodes/Fal/resources/queue/models.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/queue/models.js +12 -0
- package/dist/nodes/Fal/resources/queue/models.js.map +1 -0
- package/dist/nodes/Fal/resources/text-to-image/description.d.ts +5 -0
- package/dist/nodes/Fal/resources/text-to-image/description.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/text-to-image/description.js +165 -0
- package/dist/nodes/Fal/resources/text-to-image/description.js.map +1 -0
- package/dist/nodes/Fal/resources/text-to-image/execute/index.d.ts +3 -0
- package/dist/nodes/Fal/resources/text-to-image/execute/index.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/text-to-image/execute/index.js +64 -0
- package/dist/nodes/Fal/resources/text-to-image/execute/index.js.map +1 -0
- package/dist/nodes/Fal/resources/text-to-image/index.d.ts +4 -0
- package/dist/nodes/Fal/resources/text-to-image/index.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/text-to-image/index.js +41 -0
- package/dist/nodes/Fal/resources/text-to-image/index.js.map +1 -0
- package/dist/nodes/Fal/resources/text-to-image/models.d.ts +6 -0
- package/dist/nodes/Fal/resources/text-to-image/models.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/text-to-image/models.js +36 -0
- package/dist/nodes/Fal/resources/text-to-image/models.js.map +1 -0
- package/dist/nodes/Fal/resources/text-to-video/description.d.ts +5 -0
- package/dist/nodes/Fal/resources/text-to-video/description.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/text-to-video/description.js +174 -0
- package/dist/nodes/Fal/resources/text-to-video/description.js.map +1 -0
- package/dist/nodes/Fal/resources/text-to-video/execute/index.d.ts +3 -0
- package/dist/nodes/Fal/resources/text-to-video/execute/index.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/text-to-video/execute/index.js +57 -0
- package/dist/nodes/Fal/resources/text-to-video/execute/index.js.map +1 -0
- package/dist/nodes/Fal/resources/text-to-video/index.d.ts +4 -0
- package/dist/nodes/Fal/resources/text-to-video/index.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/text-to-video/index.js +41 -0
- package/dist/nodes/Fal/resources/text-to-video/index.js.map +1 -0
- package/dist/nodes/Fal/resources/text-to-video/models.d.ts +6 -0
- package/dist/nodes/Fal/resources/text-to-video/models.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/text-to-video/models.js +26 -0
- package/dist/nodes/Fal/resources/text-to-video/models.js.map +1 -0
- package/dist/nodes/Fal/resources/utility/description.d.ts +5 -0
- package/dist/nodes/Fal/resources/utility/description.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/utility/description.js +101 -0
- package/dist/nodes/Fal/resources/utility/description.js.map +1 -0
- package/dist/nodes/Fal/resources/utility/execute/index.d.ts +3 -0
- package/dist/nodes/Fal/resources/utility/execute/index.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/utility/execute/index.js +56 -0
- package/dist/nodes/Fal/resources/utility/execute/index.js.map +1 -0
- package/dist/nodes/Fal/resources/utility/index.d.ts +4 -0
- package/dist/nodes/Fal/resources/utility/index.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/utility/index.js +41 -0
- package/dist/nodes/Fal/resources/utility/index.js.map +1 -0
- package/dist/nodes/Fal/resources/utility/models.d.ts +6 -0
- package/dist/nodes/Fal/resources/utility/models.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/utility/models.js +31 -0
- package/dist/nodes/Fal/resources/utility/models.js.map +1 -0
- package/dist/nodes/Fal/resources/video-to-video/description.d.ts +5 -0
- package/dist/nodes/Fal/resources/video-to-video/description.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/video-to-video/description.js +144 -0
- package/dist/nodes/Fal/resources/video-to-video/description.js.map +1 -0
- package/dist/nodes/Fal/resources/video-to-video/execute/index.d.ts +3 -0
- package/dist/nodes/Fal/resources/video-to-video/execute/index.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/video-to-video/execute/index.js +47 -0
- package/dist/nodes/Fal/resources/video-to-video/execute/index.js.map +1 -0
- package/dist/nodes/Fal/resources/video-to-video/index.d.ts +4 -0
- package/dist/nodes/Fal/resources/video-to-video/index.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/video-to-video/index.js +41 -0
- package/dist/nodes/Fal/resources/video-to-video/index.js.map +1 -0
- package/dist/nodes/Fal/resources/video-to-video/models.d.ts +6 -0
- package/dist/nodes/Fal/resources/video-to-video/models.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/video-to-video/models.js +11 -0
- package/dist/nodes/Fal/resources/video-to-video/models.js.map +1 -0
- package/dist/nodes/Fal/resources/vision/description.d.ts +5 -0
- package/dist/nodes/Fal/resources/vision/description.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/vision/description.js +146 -0
- package/dist/nodes/Fal/resources/vision/description.js.map +1 -0
- package/dist/nodes/Fal/resources/vision/execute/index.d.ts +3 -0
- package/dist/nodes/Fal/resources/vision/execute/index.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/vision/execute/index.js +56 -0
- package/dist/nodes/Fal/resources/vision/execute/index.js.map +1 -0
- package/dist/nodes/Fal/resources/vision/index.d.ts +4 -0
- package/dist/nodes/Fal/resources/vision/index.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/vision/index.js +41 -0
- package/dist/nodes/Fal/resources/vision/index.js.map +1 -0
- package/dist/nodes/Fal/resources/vision/models.d.ts +6 -0
- package/dist/nodes/Fal/resources/vision/models.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/vision/models.js +46 -0
- package/dist/nodes/Fal/resources/vision/models.js.map +1 -0
- package/dist/nodes/Fal/resources/workflow/description.d.ts +4 -0
- package/dist/nodes/Fal/resources/workflow/description.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/workflow/description.js +178 -0
- package/dist/nodes/Fal/resources/workflow/description.js.map +1 -0
- package/dist/nodes/Fal/resources/workflow/execute/index.d.ts +3 -0
- package/dist/nodes/Fal/resources/workflow/execute/index.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/workflow/execute/index.js +120 -0
- package/dist/nodes/Fal/resources/workflow/execute/index.js.map +1 -0
- package/dist/nodes/Fal/resources/workflow/index.d.ts +4 -0
- package/dist/nodes/Fal/resources/workflow/index.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/workflow/index.js +9 -0
- package/dist/nodes/Fal/resources/workflow/index.js.map +1 -0
- package/dist/nodes/Fal/resources/workflow/models.d.ts +65 -0
- package/dist/nodes/Fal/resources/workflow/models.d.ts.map +1 -0
- package/dist/nodes/Fal/resources/workflow/models.js +9 -0
- package/dist/nodes/Fal/resources/workflow/models.js.map +1 -0
- package/dist/nodes/Fal/utils/poll-queue.util.d.ts +9 -0
- package/dist/nodes/Fal/utils/poll-queue.util.d.ts.map +1 -0
- package/dist/nodes/Fal/utils/poll-queue.util.js +62 -0
- package/dist/nodes/Fal/utils/poll-queue.util.js.map +1 -0
- package/package.json +86 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.execute = exports.description = void 0;
|
|
37
|
+
const execute = __importStar(require("./execute"));
|
|
38
|
+
exports.execute = execute;
|
|
39
|
+
var description_1 = require("./description");
|
|
40
|
+
Object.defineProperty(exports, "description", { enumerable: true, get: function () { return description_1.description; } });
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/text-to-video/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAqC;AAG5B,0BAAO;AADhB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/text-to-video/models.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;;;GAqB7B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.textToVideoModels = void 0;
|
|
4
|
+
exports.textToVideoModels = [
|
|
5
|
+
{
|
|
6
|
+
name: 'Sora 2 Pro',
|
|
7
|
+
value: 'fal-ai/sora-2/text-to-video/pro',
|
|
8
|
+
description: 'OpenAI Sora 2 Pro - richly detailed videos with audio',
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
name: 'Sora 2',
|
|
12
|
+
value: 'fal-ai/sora-2/text-to-video',
|
|
13
|
+
description: 'OpenAI Sora 2 - state-of-the-art video with audio',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'Veo 3.1 Fast',
|
|
17
|
+
value: 'fal-ai/veo3.1/fast',
|
|
18
|
+
description: 'Faster and more cost effective version of Google Veo 3.1',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'Veo 3.1',
|
|
22
|
+
value: 'fal-ai/veo3.1',
|
|
23
|
+
description: 'Google Veo 3.1 - the most advanced AI video generation model',
|
|
24
|
+
},
|
|
25
|
+
];
|
|
26
|
+
//# sourceMappingURL=models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/text-to-video/models.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;IAChC;QACC,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,iCAAiC;QACxC,WAAW,EAAE,uDAAuD;KACpE;IACD;QACC,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,6BAA6B;QACpC,WAAW,EAAE,mDAAmD;KAChE;IACD;QACC,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EAAE,0DAA0D;KACvE;IACD;QACC,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,8DAA8D;KAC3E;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/utility/description.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,eAAO,MAAM,sBAAsB,EAAE,eAAe,EAcnD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,eAAe,EA+E1C,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,EAAkD,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = exports.utilityFields = exports.utilityOperationsField = void 0;
|
|
4
|
+
const models_1 = require("./models");
|
|
5
|
+
exports.utilityOperationsField = [
|
|
6
|
+
{
|
|
7
|
+
displayName: 'Operation',
|
|
8
|
+
name: 'operation',
|
|
9
|
+
type: 'options',
|
|
10
|
+
noDataExpression: true,
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['utility'],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
options: models_1.utilityOperations,
|
|
17
|
+
default: 'imageUpscale',
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
exports.utilityFields = [
|
|
21
|
+
// Image Upscaling
|
|
22
|
+
{
|
|
23
|
+
displayName: 'Image URL',
|
|
24
|
+
name: 'imageUrl',
|
|
25
|
+
type: 'string',
|
|
26
|
+
displayOptions: {
|
|
27
|
+
show: {
|
|
28
|
+
resource: ['utility'],
|
|
29
|
+
operation: ['imageUpscale', 'removeBackground', 'nsfwDetection'],
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
default: '',
|
|
33
|
+
required: true,
|
|
34
|
+
placeholder: '={{$json.imageUrl}} or https://example.com/image.jpg',
|
|
35
|
+
description: 'The URL of the image to process. Supports expressions from previous nodes.',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
displayName: 'Upscale Factor',
|
|
39
|
+
name: 'upscaleFactor',
|
|
40
|
+
type: 'options',
|
|
41
|
+
displayOptions: {
|
|
42
|
+
show: {
|
|
43
|
+
resource: ['utility'],
|
|
44
|
+
operation: ['imageUpscale'],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
options: [
|
|
48
|
+
{
|
|
49
|
+
name: '2x',
|
|
50
|
+
value: 2,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: '4x',
|
|
54
|
+
value: 4,
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
default: 2,
|
|
58
|
+
description: 'How much to upscale the image',
|
|
59
|
+
},
|
|
60
|
+
// Video Upscaling
|
|
61
|
+
{
|
|
62
|
+
displayName: 'Video URL',
|
|
63
|
+
name: 'videoUrl',
|
|
64
|
+
type: 'string',
|
|
65
|
+
displayOptions: {
|
|
66
|
+
show: {
|
|
67
|
+
resource: ['utility'],
|
|
68
|
+
operation: ['videoUpscale', 'removeBackgroundVideo'],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
default: '',
|
|
72
|
+
required: true,
|
|
73
|
+
placeholder: '={{$json.videoUrl}} or https://example.com/video.mp4',
|
|
74
|
+
description: 'The URL of the video to process. Supports expressions from previous nodes.',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
displayName: 'Upscale Factor',
|
|
78
|
+
name: 'upscaleFactor',
|
|
79
|
+
type: 'options',
|
|
80
|
+
displayOptions: {
|
|
81
|
+
show: {
|
|
82
|
+
resource: ['utility'],
|
|
83
|
+
operation: ['videoUpscale'],
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
options: [
|
|
87
|
+
{
|
|
88
|
+
name: '2x',
|
|
89
|
+
value: 2,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: '4x',
|
|
93
|
+
value: 4,
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
default: 2,
|
|
97
|
+
description: 'How much to upscale the video',
|
|
98
|
+
},
|
|
99
|
+
];
|
|
100
|
+
exports.description = [...exports.utilityOperationsField, ...exports.utilityFields];
|
|
101
|
+
//# sourceMappingURL=description.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/utility/description.ts"],"names":[],"mappings":";;;AACA,qCAA6C;AAEhC,QAAA,sBAAsB,GAAsB;IACxD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,SAAS,CAAC;aACrB;SACD;QACD,OAAO,EAAE,0BAAiB;QAC1B,OAAO,EAAE,cAAc;KACvB;CACD,CAAC;AAEW,QAAA,aAAa,GAAsB;IAC/C,kBAAkB;IAClB;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,cAAc,EAAE,kBAAkB,EAAE,eAAe,CAAC;aAChE;SACD;QACD,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,sDAAsD;QACnE,WAAW,EAAE,4EAA4E;KACzF;IACD;QACC,WAAW,EAAE,gBAAgB;QAC7B,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,SAAS;QACf,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,cAAc,CAAC;aAC3B;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE,CAAC;aACR;YACD;gBACC,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE,CAAC;aACR;SACD;QACD,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,+BAA+B;KAC5C;IACD,kBAAkB;IAClB;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,cAAc,EAAE,uBAAuB,CAAC;aACpD;SACD;QACD,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,sDAAsD;QACnE,WAAW,EAAE,4EAA4E;KACzF;IACD;QACC,WAAW,EAAE,gBAAgB;QAC7B,IAAI,EAAE,eAAe;QACrB,IAAI,EAAE,SAAS;QACf,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,cAAc,CAAC;aAC3B;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE,CAAC;aACR;YACD;gBACC,IAAI,EAAE,IAAI;gBACV,KAAK,EAAE,CAAC;aACR;SACD;QACD,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,+BAA+B;KAC5C;CACD,CAAC;AAEW,QAAA,WAAW,GAAsB,CAAC,GAAG,8BAAsB,EAAE,GAAG,qBAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../nodes/Fal/resources/utility/execute/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAgB,MAAM,cAAc,CAAC;AAI5E,wBAAsB,OAAO,CAAC,IAAI,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CA6D9F"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.execute = execute;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const poll_queue_util_1 = require("../../../utils/poll-queue.util");
|
|
6
|
+
async function execute(itemIndex) {
|
|
7
|
+
const operation = this.getNodeParameter('operation', itemIndex);
|
|
8
|
+
let endpoint = '';
|
|
9
|
+
const body = {};
|
|
10
|
+
switch (operation) {
|
|
11
|
+
case 'imageUpscale':
|
|
12
|
+
endpoint = '/fal-ai/topaz/upscale/image';
|
|
13
|
+
body.image_url = this.getNodeParameter('imageUrl', itemIndex);
|
|
14
|
+
body.scale = this.getNodeParameter('upscaleFactor', itemIndex, 2);
|
|
15
|
+
break;
|
|
16
|
+
case 'videoUpscale':
|
|
17
|
+
endpoint = '/fal-ai/topaz/upscale/video';
|
|
18
|
+
body.video_url = this.getNodeParameter('videoUrl', itemIndex);
|
|
19
|
+
body.scale = this.getNodeParameter('upscaleFactor', itemIndex, 2);
|
|
20
|
+
break;
|
|
21
|
+
case 'removeBackground':
|
|
22
|
+
endpoint = '/fal-ai/bria/background/remove';
|
|
23
|
+
body.image_url = this.getNodeParameter('imageUrl', itemIndex);
|
|
24
|
+
break;
|
|
25
|
+
case 'removeBackgroundVideo':
|
|
26
|
+
endpoint = '/fal-ai/bria/video/background-removal';
|
|
27
|
+
body.video_url = this.getNodeParameter('videoUrl', itemIndex);
|
|
28
|
+
break;
|
|
29
|
+
case 'nsfwDetection':
|
|
30
|
+
endpoint = '/fal-ai/x-ailab/nsfw';
|
|
31
|
+
body.image_url = this.getNodeParameter('imageUrl', itemIndex);
|
|
32
|
+
break;
|
|
33
|
+
default:
|
|
34
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), {
|
|
35
|
+
message: `Unknown operation: ${operation}`,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
// Submit the request to the queue
|
|
39
|
+
const submitResponse = await this.helpers.httpRequestWithAuthentication.call(this, 'falApi', {
|
|
40
|
+
method: 'POST',
|
|
41
|
+
url: endpoint,
|
|
42
|
+
body,
|
|
43
|
+
json: true,
|
|
44
|
+
});
|
|
45
|
+
const queueData = submitResponse;
|
|
46
|
+
if (!queueData.request_id) {
|
|
47
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), {
|
|
48
|
+
message: 'Failed to submit request to queue',
|
|
49
|
+
description: 'No request_id received',
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
// Poll for completion
|
|
53
|
+
const result = await poll_queue_util_1.pollQueue.call(this, queueData.request_id, queueData.response_url);
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/Fal/resources/utility/execute/index.ts"],"names":[],"mappings":";;AAIA,0BA6DC;AAjED,+CAA4E;AAC5E,oEAA2D;AAGpD,KAAK,UAAU,OAAO,CAA0B,SAAiB;IACvE,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,SAAS,CAAW,CAAC;IAE1E,IAAI,QAAQ,GAAG,EAAE,CAAC;IAClB,MAAM,IAAI,GAAgB,EAAE,CAAC;IAE7B,QAAQ,SAAS,EAAE,CAAC;QACnB,KAAK,cAAc;YAClB,QAAQ,GAAG,6BAA6B,CAAC;YACzC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,SAAS,CAAW,CAAC;YACxE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE,SAAS,EAAE,CAAC,CAAW,CAAC;YAC5E,MAAM;QAEP,KAAK,cAAc;YAClB,QAAQ,GAAG,6BAA6B,CAAC;YACzC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,SAAS,CAAW,CAAC;YACxE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE,SAAS,EAAE,CAAC,CAAW,CAAC;YAC5E,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 -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/utility/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.execute = exports.description = void 0;
|
|
37
|
+
const execute = __importStar(require("./execute"));
|
|
38
|
+
exports.execute = execute;
|
|
39
|
+
var description_1 = require("./description");
|
|
40
|
+
Object.defineProperty(exports, "description", { enumerable: true, get: function () { return description_1.description; } });
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/utility/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAqC;AAG5B,0BAAO;AADhB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/utility/models.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;;;GA0B7B,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.utilityOperations = void 0;
|
|
4
|
+
exports.utilityOperations = [
|
|
5
|
+
{
|
|
6
|
+
name: 'Image Upscaling',
|
|
7
|
+
value: 'imageUpscale',
|
|
8
|
+
description: 'Upscale images using Topaz AI',
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
name: 'Video Upscaling',
|
|
12
|
+
value: 'videoUpscale',
|
|
13
|
+
description: 'Upscale videos using Topaz AI',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'Remove Background (Image)',
|
|
17
|
+
value: 'removeBackground',
|
|
18
|
+
description: 'Remove backgrounds from images using Bria RMBG 2.0',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'Remove Background (Video)',
|
|
22
|
+
value: 'removeBackgroundVideo',
|
|
23
|
+
description: 'Remove backgrounds from videos using Bria',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'NSFW Detection',
|
|
27
|
+
value: 'nsfwDetection',
|
|
28
|
+
description: 'Detect if an image is NSFW or SFW',
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
//# sourceMappingURL=models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/utility/models.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;IAChC;QACC,IAAI,EAAE,iBAAiB;QACvB,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,+BAA+B;KAC5C;IACD;QACC,IAAI,EAAE,iBAAiB;QACvB,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,+BAA+B;KAC5C;IACD;QACC,IAAI,EAAE,2BAA2B;QACjC,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,oDAAoD;KACjE;IACD;QACC,IAAI,EAAE,2BAA2B;QACjC,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EAAE,2CAA2C;KACxD;IACD;QACC,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,mCAAmC;KAChD;CACD,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const videoToVideoOperations: INodeProperties[];
|
|
3
|
+
export declare const videoToVideoFields: INodeProperties[];
|
|
4
|
+
export declare const description: INodeProperties[];
|
|
5
|
+
//# sourceMappingURL=description.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/video-to-video/description.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,eAAO,MAAM,sBAAsB,EAAE,eAAe,EAqBnD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,eAAe,EAoH/C,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,EAAuD,CAAC"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = exports.videoToVideoFields = exports.videoToVideoOperations = void 0;
|
|
4
|
+
const models_1 = require("./models");
|
|
5
|
+
exports.videoToVideoOperations = [
|
|
6
|
+
{
|
|
7
|
+
displayName: 'Operation',
|
|
8
|
+
name: 'operation',
|
|
9
|
+
type: 'options',
|
|
10
|
+
noDataExpression: true,
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['videoToVideo'],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
options: [
|
|
17
|
+
{
|
|
18
|
+
name: 'Transform',
|
|
19
|
+
value: 'transform',
|
|
20
|
+
description: 'Transform a video using text or image prompts',
|
|
21
|
+
action: 'Transform a video',
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
default: 'transform',
|
|
25
|
+
},
|
|
26
|
+
];
|
|
27
|
+
exports.videoToVideoFields = [
|
|
28
|
+
{
|
|
29
|
+
displayName: 'Model',
|
|
30
|
+
name: 'model',
|
|
31
|
+
type: 'options',
|
|
32
|
+
displayOptions: {
|
|
33
|
+
show: {
|
|
34
|
+
resource: ['videoToVideo'],
|
|
35
|
+
operation: ['transform'],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
options: models_1.videoToVideoModels,
|
|
39
|
+
default: 'fal-ai/sora-2/video-to-video/remix',
|
|
40
|
+
description: 'The AI model to use for video transformation',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
displayName: 'Video URL',
|
|
44
|
+
name: 'videoUrl',
|
|
45
|
+
type: 'string',
|
|
46
|
+
displayOptions: {
|
|
47
|
+
show: {
|
|
48
|
+
resource: ['videoToVideo'],
|
|
49
|
+
operation: ['transform'],
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
default: '',
|
|
53
|
+
required: true,
|
|
54
|
+
placeholder: '={{$json.videoUrl}} or https://example.com/video.mp4',
|
|
55
|
+
description: 'The URL of the video to transform. Supports expressions from previous nodes.',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
displayName: 'Prompt',
|
|
59
|
+
name: 'prompt',
|
|
60
|
+
type: 'string',
|
|
61
|
+
typeOptions: {
|
|
62
|
+
rows: 4,
|
|
63
|
+
},
|
|
64
|
+
displayOptions: {
|
|
65
|
+
show: {
|
|
66
|
+
resource: ['videoToVideo'],
|
|
67
|
+
operation: ['transform'],
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
default: '',
|
|
71
|
+
required: true,
|
|
72
|
+
placeholder: '={{$json.transformation}} or Transform into cyberpunk style',
|
|
73
|
+
description: 'Text prompt describing how to transform the video. Supports expressions from previous nodes.',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
displayName: 'Additional Options',
|
|
77
|
+
name: 'additionalOptions',
|
|
78
|
+
type: 'collection',
|
|
79
|
+
placeholder: 'Add Option',
|
|
80
|
+
default: {},
|
|
81
|
+
displayOptions: {
|
|
82
|
+
show: {
|
|
83
|
+
resource: ['videoToVideo'],
|
|
84
|
+
operation: ['transform'],
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
options: [
|
|
88
|
+
{
|
|
89
|
+
displayName: 'Image URL',
|
|
90
|
+
name: 'imageUrl',
|
|
91
|
+
type: 'string',
|
|
92
|
+
default: '',
|
|
93
|
+
description: 'Optional image URL to guide the transformation',
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
displayName: 'Aspect Ratio',
|
|
97
|
+
name: 'aspectRatio',
|
|
98
|
+
type: 'options',
|
|
99
|
+
options: [
|
|
100
|
+
{
|
|
101
|
+
name: '16:9',
|
|
102
|
+
value: '16:9',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: '9:16',
|
|
106
|
+
value: '9:16',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: '1:1',
|
|
110
|
+
value: '1:1',
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
default: '16:9',
|
|
114
|
+
description: 'Aspect ratio of the output video',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
displayName: 'Duration',
|
|
118
|
+
name: 'duration',
|
|
119
|
+
type: 'options',
|
|
120
|
+
options: [
|
|
121
|
+
{
|
|
122
|
+
name: '5 seconds',
|
|
123
|
+
value: '5s',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: '10 seconds',
|
|
127
|
+
value: '10s',
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
default: '5s',
|
|
131
|
+
description: 'Duration of the output video',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
displayName: 'Seed',
|
|
135
|
+
name: 'seed',
|
|
136
|
+
type: 'number',
|
|
137
|
+
default: -1,
|
|
138
|
+
description: 'Random seed for reproducibility. Use -1 for random.',
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
},
|
|
142
|
+
];
|
|
143
|
+
exports.description = [...exports.videoToVideoOperations, ...exports.videoToVideoFields];
|
|
144
|
+
//# sourceMappingURL=description.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../../nodes/Fal/resources/video-to-video/description.ts"],"names":[],"mappings":";;;AACA,qCAA8C;AAEjC,QAAA,sBAAsB,GAAsB;IACxD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gB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AAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../nodes/Fal/resources/video-to-video/execute/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAgB,MAAM,cAAc,CAAC;AAI5E,wBAAsB,OAAO,CAAC,IAAI,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAmD9F"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.execute = execute;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const poll_queue_util_1 = require("../../../utils/poll-queue.util");
|
|
6
|
+
async function execute(itemIndex) {
|
|
7
|
+
const model = this.getNodeParameter('model', itemIndex);
|
|
8
|
+
const videoUrl = this.getNodeParameter('videoUrl', itemIndex);
|
|
9
|
+
const prompt = this.getNodeParameter('prompt', itemIndex);
|
|
10
|
+
const additionalOptions = this.getNodeParameter('additionalOptions', itemIndex, {});
|
|
11
|
+
// Build the request body
|
|
12
|
+
const body = {
|
|
13
|
+
video_url: videoUrl,
|
|
14
|
+
prompt,
|
|
15
|
+
};
|
|
16
|
+
// Add optional parameters
|
|
17
|
+
if (additionalOptions.imageUrl) {
|
|
18
|
+
body.image_url = additionalOptions.imageUrl;
|
|
19
|
+
}
|
|
20
|
+
if (additionalOptions.aspectRatio) {
|
|
21
|
+
body.aspect_ratio = additionalOptions.aspectRatio;
|
|
22
|
+
}
|
|
23
|
+
if (additionalOptions.duration) {
|
|
24
|
+
body.duration = additionalOptions.duration;
|
|
25
|
+
}
|
|
26
|
+
if (additionalOptions.seed && additionalOptions.seed !== -1) {
|
|
27
|
+
body.seed = additionalOptions.seed;
|
|
28
|
+
}
|
|
29
|
+
// Submit the request to the queue
|
|
30
|
+
const submitResponse = await this.helpers.httpRequestWithAuthentication.call(this, 'falApi', {
|
|
31
|
+
method: 'POST',
|
|
32
|
+
url: `/${model}`,
|
|
33
|
+
body,
|
|
34
|
+
json: true,
|
|
35
|
+
});
|
|
36
|
+
const queueData = submitResponse;
|
|
37
|
+
if (!queueData.request_id) {
|
|
38
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), {
|
|
39
|
+
message: 'Failed to submit request to queue',
|
|
40
|
+
description: 'No request_id received',
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
// Poll for completion
|
|
44
|
+
const result = await poll_queue_util_1.pollQueue.call(this, queueData.request_id, queueData.response_url);
|
|
45
|
+
return result;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/Fal/resources/video-to-video/execute/index.ts"],"names":[],"mappings":";;AAIA,0BAmDC;AAvDD,+CAA4E;AAC5E,oEAA2D;AAGpD,KAAK,UAAU,OAAO,CAA0B,SAAiB;IACvE,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,SAAS,CAAW,CAAC;IAClE,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,SAAS,CAAW,CAAC;IACxE,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,SAAS,CAAW,CAAC;IACpE,MAAM,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAC9C,mBAAmB,EACnB,SAAS,EACT,EAAE,CACa,CAAC;IAEjB,yBAAyB;IACzB,MAAM,IAAI,GAAgB;QACzB,SAAS,EAAE,QAAQ;QACnB,MAAM;KACN,CAAC;IAEF,0BAA0B;IAC1B,IAAI,iBAAiB,CAAC,QAAQ,EAAE,CAAC;QAChC,IAAI,CAAC,SAAS,GAAG,iBAAiB,CAAC,QAAQ,CAAC;IAC7C,CAAC;IACD,IAAI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