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
@@ -0,0 +1,186 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DreamMachineTextToVideo = void 0;
|
4
|
+
const GenericFunctions_1 = require("../shared/GenericFunctions");
|
5
|
+
class DreamMachineTextToVideo {
|
6
|
+
constructor() {
|
7
|
+
this.description = {
|
8
|
+
displayName: 'PiAPI Dream Machine Text to Video',
|
9
|
+
name: 'dreamMachineTextToVideo',
|
10
|
+
icon: 'file:../piapi.svg',
|
11
|
+
group: ['transform'],
|
12
|
+
version: 1,
|
13
|
+
description: 'Generate videos using PiAPI Dream Machine Text-to-Video',
|
14
|
+
defaults: {
|
15
|
+
name: 'Dream Machine Text 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: 'Model Name',
|
39
|
+
name: 'modelName',
|
40
|
+
type: 'options',
|
41
|
+
options: [
|
42
|
+
{
|
43
|
+
name: 'Ray v1',
|
44
|
+
value: 'ray-v1',
|
45
|
+
},
|
46
|
+
{
|
47
|
+
name: 'Ray v2',
|
48
|
+
value: 'ray-v2',
|
49
|
+
},
|
50
|
+
],
|
51
|
+
default: 'ray-v1',
|
52
|
+
description: 'The model to use for video generation',
|
53
|
+
},
|
54
|
+
{
|
55
|
+
displayName: 'Duration',
|
56
|
+
name: 'duration',
|
57
|
+
type: 'options',
|
58
|
+
options: [
|
59
|
+
{
|
60
|
+
name: '5 seconds',
|
61
|
+
value: 5,
|
62
|
+
},
|
63
|
+
{
|
64
|
+
name: '10 seconds',
|
65
|
+
value: 10,
|
66
|
+
description: 'Only available for text-to-video',
|
67
|
+
},
|
68
|
+
],
|
69
|
+
default: 5,
|
70
|
+
description: 'Duration of the generated video in seconds',
|
71
|
+
},
|
72
|
+
{
|
73
|
+
displayName: 'Aspect Ratio',
|
74
|
+
name: 'aspectRatio',
|
75
|
+
type: 'options',
|
76
|
+
options: [
|
77
|
+
{
|
78
|
+
name: 'Portrait (9:16)',
|
79
|
+
value: '9:16',
|
80
|
+
},
|
81
|
+
{
|
82
|
+
name: 'Portrait (3:4)',
|
83
|
+
value: '3:4',
|
84
|
+
},
|
85
|
+
{
|
86
|
+
name: 'Square (1:1)',
|
87
|
+
value: '1:1',
|
88
|
+
},
|
89
|
+
{
|
90
|
+
name: 'Landscape (4:3)',
|
91
|
+
value: '4:3',
|
92
|
+
},
|
93
|
+
{
|
94
|
+
name: 'Landscape (16:9)',
|
95
|
+
value: '16:9',
|
96
|
+
},
|
97
|
+
{
|
98
|
+
name: 'Cinematic (21:9)',
|
99
|
+
value: '21:9',
|
100
|
+
},
|
101
|
+
],
|
102
|
+
default: '16:9',
|
103
|
+
description: 'Aspect ratio of the generated video',
|
104
|
+
},
|
105
|
+
{
|
106
|
+
displayName: 'Service Mode',
|
107
|
+
name: 'serviceMode',
|
108
|
+
type: 'options',
|
109
|
+
options: [
|
110
|
+
{
|
111
|
+
name: 'Default (User Workspace Setting)',
|
112
|
+
value: '',
|
113
|
+
},
|
114
|
+
{
|
115
|
+
name: 'Pay-as-you-go (PAYG)',
|
116
|
+
value: 'public',
|
117
|
+
},
|
118
|
+
{
|
119
|
+
name: 'Host-your-account (HYA)',
|
120
|
+
value: 'private',
|
121
|
+
},
|
122
|
+
],
|
123
|
+
default: '',
|
124
|
+
description: 'The service mode for processing the task',
|
125
|
+
},
|
126
|
+
{
|
127
|
+
displayName: 'Wait for Completion',
|
128
|
+
name: 'waitForCompletion',
|
129
|
+
type: 'boolean',
|
130
|
+
default: false,
|
131
|
+
description: 'Wait for task to complete and return results',
|
132
|
+
},
|
133
|
+
],
|
134
|
+
};
|
135
|
+
}
|
136
|
+
async execute() {
|
137
|
+
var _a;
|
138
|
+
const items = this.getInputData();
|
139
|
+
const returnData = [];
|
140
|
+
for (let i = 0; i < items.length; i++) {
|
141
|
+
const prompt = this.getNodeParameter('prompt', i);
|
142
|
+
const modelName = this.getNodeParameter('modelName', i);
|
143
|
+
const duration = this.getNodeParameter('duration', i);
|
144
|
+
const aspectRatio = this.getNodeParameter('aspectRatio', i);
|
145
|
+
const serviceMode = this.getNodeParameter('serviceMode', i);
|
146
|
+
const waitForCompletion = this.getNodeParameter('waitForCompletion', i, true);
|
147
|
+
const body = {
|
148
|
+
model: 'luma',
|
149
|
+
task_type: 'video_generation',
|
150
|
+
input: {
|
151
|
+
prompt,
|
152
|
+
model_name: modelName,
|
153
|
+
duration,
|
154
|
+
aspect_ratio: aspectRatio,
|
155
|
+
},
|
156
|
+
config: {
|
157
|
+
service_mode: serviceMode,
|
158
|
+
},
|
159
|
+
};
|
160
|
+
try {
|
161
|
+
const response = await GenericFunctions_1.piApiRequest.call(this, 'POST', '/api/v1/task', body);
|
162
|
+
let taskResult = response;
|
163
|
+
if (waitForCompletion && ((_a = response.data) === null || _a === void 0 ? void 0 : _a.task_id)) {
|
164
|
+
taskResult = await GenericFunctions_1.waitForTaskCompletion.call(this, response.data.task_id);
|
165
|
+
}
|
166
|
+
returnData.push({
|
167
|
+
json: taskResult,
|
168
|
+
});
|
169
|
+
}
|
170
|
+
catch (error) {
|
171
|
+
if (this.continueOnFail()) {
|
172
|
+
returnData.push({
|
173
|
+
json: {
|
174
|
+
error: error.message,
|
175
|
+
},
|
176
|
+
});
|
177
|
+
continue;
|
178
|
+
}
|
179
|
+
throw error;
|
180
|
+
}
|
181
|
+
}
|
182
|
+
return [returnData];
|
183
|
+
}
|
184
|
+
}
|
185
|
+
exports.DreamMachineTextToVideo = DreamMachineTextToVideo;
|
186
|
+
//# sourceMappingURL=DreamMachineTextToVideo.node.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DreamMachineTextToVideo.node.js","sourceRoot":"","sources":["../../../../nodes/PiAPI/DreamMachine/DreamMachineTextToVideo.node.ts"],"names":[],"mappings":";;;AAQA,iEAAiF;AAEjF,MAAa,uBAAuB;IAApC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,mCAAmC;YAChD,IAAI,EAAE,yBAAyB;YAC/B,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,yDAAyD;YACtE,QAAQ,EAAE;gBACT,IAAI,EAAE,6BAA6B;aACnC;YACD,MAAM,EAAE,QAAyB;YACj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,CAAC;QACF,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AAzLD,0DAyLC"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
2
|
+
export declare class FluxImageToImage implements INodeType {
|
3
|
+
description: INodeTypeDescription;
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
5
|
+
}
|
@@ -0,0 +1,359 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.FluxImageToImage = void 0;
|
4
|
+
const GenericFunctions_1 = require("../shared/GenericFunctions");
|
5
|
+
const Constants_1 = require("../shared/Constants");
|
6
|
+
class FluxImageToImage {
|
7
|
+
constructor() {
|
8
|
+
this.description = {
|
9
|
+
displayName: 'PiAPI Flux Image to Image',
|
10
|
+
name: 'fluxImageToImage',
|
11
|
+
icon: 'file:../piapi.svg',
|
12
|
+
group: ['transform'],
|
13
|
+
version: 1,
|
14
|
+
description: 'Transform images using PiAPI Flux Image-to-Image',
|
15
|
+
defaults: {
|
16
|
+
name: 'Flux Image to Image',
|
17
|
+
},
|
18
|
+
inputs: ["main"],
|
19
|
+
outputs: ["main"],
|
20
|
+
credentials: [
|
21
|
+
{
|
22
|
+
name: 'piAPIApi',
|
23
|
+
required: true,
|
24
|
+
},
|
25
|
+
],
|
26
|
+
properties: [
|
27
|
+
{
|
28
|
+
displayName: 'Model',
|
29
|
+
name: 'model',
|
30
|
+
type: 'options',
|
31
|
+
options: [
|
32
|
+
{
|
33
|
+
name: 'Flux 1 Dev',
|
34
|
+
value: 'Qubico/flux1-dev',
|
35
|
+
},
|
36
|
+
{
|
37
|
+
name: 'Flux 1 Schnell',
|
38
|
+
value: 'Qubico/flux1-schnell',
|
39
|
+
},
|
40
|
+
{
|
41
|
+
name: 'Flux 1 Dev Advanced',
|
42
|
+
value: 'Qubico/flux1-dev-advanced',
|
43
|
+
},
|
44
|
+
],
|
45
|
+
default: 'Qubico/flux1-dev',
|
46
|
+
description: 'The model to use for image generation',
|
47
|
+
},
|
48
|
+
{
|
49
|
+
displayName: 'Image Source',
|
50
|
+
name: 'imageSource',
|
51
|
+
type: 'options',
|
52
|
+
options: [
|
53
|
+
{
|
54
|
+
name: 'URL',
|
55
|
+
value: 'url',
|
56
|
+
},
|
57
|
+
{
|
58
|
+
name: 'Binary Data',
|
59
|
+
value: 'binaryData',
|
60
|
+
},
|
61
|
+
],
|
62
|
+
default: 'url',
|
63
|
+
description: 'The source of the input image',
|
64
|
+
},
|
65
|
+
{
|
66
|
+
displayName: 'Image URL',
|
67
|
+
name: 'imageUrl',
|
68
|
+
type: 'string',
|
69
|
+
default: '',
|
70
|
+
required: true,
|
71
|
+
displayOptions: {
|
72
|
+
show: {
|
73
|
+
imageSource: ['url'],
|
74
|
+
},
|
75
|
+
},
|
76
|
+
description: 'URL of the image to transform',
|
77
|
+
},
|
78
|
+
{
|
79
|
+
displayName: 'Binary Property',
|
80
|
+
name: 'binaryPropertyName',
|
81
|
+
type: 'string',
|
82
|
+
default: 'data',
|
83
|
+
required: true,
|
84
|
+
displayOptions: {
|
85
|
+
show: {
|
86
|
+
imageSource: ['binaryData'],
|
87
|
+
},
|
88
|
+
},
|
89
|
+
description: 'Name of the binary property containing the image data',
|
90
|
+
},
|
91
|
+
{
|
92
|
+
displayName: 'Prompt',
|
93
|
+
name: 'prompt',
|
94
|
+
type: 'string',
|
95
|
+
typeOptions: {
|
96
|
+
rows: 4,
|
97
|
+
},
|
98
|
+
default: '',
|
99
|
+
required: true,
|
100
|
+
description: 'Text prompt for image transformation',
|
101
|
+
},
|
102
|
+
{
|
103
|
+
displayName: 'Negative Prompt',
|
104
|
+
name: 'negativePrompt',
|
105
|
+
type: 'string',
|
106
|
+
typeOptions: {
|
107
|
+
rows: 2,
|
108
|
+
},
|
109
|
+
default: '',
|
110
|
+
description: 'Negative text prompt for image transformation',
|
111
|
+
},
|
112
|
+
{
|
113
|
+
displayName: 'Denoise Strength',
|
114
|
+
name: 'denoiseStrength',
|
115
|
+
type: 'number',
|
116
|
+
default: 0.7,
|
117
|
+
description: 'Determines how much to transform the image (0.0 to 1.0)',
|
118
|
+
typeOptions: {
|
119
|
+
minValue: 0.01,
|
120
|
+
maxValue: 1,
|
121
|
+
numberPrecision: 2,
|
122
|
+
},
|
123
|
+
},
|
124
|
+
{
|
125
|
+
displayName: 'Guidance Scale',
|
126
|
+
name: 'guidanceScale',
|
127
|
+
type: 'number',
|
128
|
+
default: 3,
|
129
|
+
description: 'Guidance scale for image generation. Higher values improve prompt adherence but may reduce image quality.',
|
130
|
+
typeOptions: {
|
131
|
+
minValue: 1.5,
|
132
|
+
maxValue: 5,
|
133
|
+
numberPrecision: 1,
|
134
|
+
},
|
135
|
+
},
|
136
|
+
{
|
137
|
+
displayName: 'Batch Size',
|
138
|
+
name: 'batchSize',
|
139
|
+
type: 'number',
|
140
|
+
default: 1,
|
141
|
+
description: 'Number of images to generate. Only works for Flux 1 Schnell model.',
|
142
|
+
typeOptions: {
|
143
|
+
minValue: 1,
|
144
|
+
maxValue: 4,
|
145
|
+
},
|
146
|
+
},
|
147
|
+
{
|
148
|
+
displayName: 'Use LoRA',
|
149
|
+
name: 'useLora',
|
150
|
+
type: 'boolean',
|
151
|
+
default: false,
|
152
|
+
description: 'Whether to use LoRA model for generation (only available with Flux 1 Dev Advanced model)',
|
153
|
+
displayOptions: {
|
154
|
+
show: {
|
155
|
+
model: ['Qubico/flux1-dev-advanced'],
|
156
|
+
},
|
157
|
+
},
|
158
|
+
},
|
159
|
+
{
|
160
|
+
displayName: 'LoRA Type',
|
161
|
+
name: 'loraType',
|
162
|
+
type: 'options',
|
163
|
+
displayOptions: {
|
164
|
+
show: {
|
165
|
+
useLora: [true],
|
166
|
+
},
|
167
|
+
},
|
168
|
+
options: Constants_1.LORA_OPTIONS,
|
169
|
+
default: 'none',
|
170
|
+
description: 'The LoRA model to use for image generation',
|
171
|
+
},
|
172
|
+
{
|
173
|
+
displayName: 'LoRA Strength',
|
174
|
+
name: 'loraStrength',
|
175
|
+
type: 'number',
|
176
|
+
displayOptions: {
|
177
|
+
show: {
|
178
|
+
useLora: [true],
|
179
|
+
},
|
180
|
+
},
|
181
|
+
default: 1,
|
182
|
+
description: 'Strength of the LoRA effect (0.0 to 1.0)',
|
183
|
+
typeOptions: {
|
184
|
+
minValue: 0.1,
|
185
|
+
maxValue: 1,
|
186
|
+
numberPrecision: 2,
|
187
|
+
},
|
188
|
+
},
|
189
|
+
{
|
190
|
+
displayName: 'Use ControlNet',
|
191
|
+
name: 'useControlNet',
|
192
|
+
type: 'boolean',
|
193
|
+
default: false,
|
194
|
+
description: 'Whether to use ControlNet for generation (only available with Flux 1 Dev Advanced model)',
|
195
|
+
displayOptions: {
|
196
|
+
show: {
|
197
|
+
model: ['Qubico/flux1-dev-advanced'],
|
198
|
+
},
|
199
|
+
},
|
200
|
+
},
|
201
|
+
{
|
202
|
+
displayName: 'ControlNet Type',
|
203
|
+
name: 'controlNetType',
|
204
|
+
type: 'options',
|
205
|
+
displayOptions: {
|
206
|
+
show: {
|
207
|
+
useControlNet: [true],
|
208
|
+
},
|
209
|
+
},
|
210
|
+
options: Constants_1.CONTROLNET_TYPES,
|
211
|
+
default: 'none',
|
212
|
+
description: 'The ControlNet type to use for image generation',
|
213
|
+
},
|
214
|
+
{
|
215
|
+
displayName: 'Control Strength',
|
216
|
+
name: 'controlStrength',
|
217
|
+
type: 'number',
|
218
|
+
displayOptions: {
|
219
|
+
show: {
|
220
|
+
useControlNet: [true],
|
221
|
+
},
|
222
|
+
},
|
223
|
+
default: 0.5,
|
224
|
+
description: 'Strength of the ControlNet effect (0.0 to 1.0)',
|
225
|
+
typeOptions: {
|
226
|
+
minValue: 0.1,
|
227
|
+
maxValue: 1,
|
228
|
+
numberPrecision: 2,
|
229
|
+
},
|
230
|
+
},
|
231
|
+
{
|
232
|
+
displayName: 'Return Preprocessed Image',
|
233
|
+
name: 'returnPreprocessed',
|
234
|
+
type: 'boolean',
|
235
|
+
displayOptions: {
|
236
|
+
show: {
|
237
|
+
useControlNet: [true],
|
238
|
+
},
|
239
|
+
},
|
240
|
+
default: false,
|
241
|
+
description: 'Whether to return the preprocessed control image',
|
242
|
+
},
|
243
|
+
{
|
244
|
+
displayName: 'Wait for Completion',
|
245
|
+
name: 'waitForCompletion',
|
246
|
+
type: 'boolean',
|
247
|
+
default: false,
|
248
|
+
description: 'Wait for task to complete and return results',
|
249
|
+
},
|
250
|
+
],
|
251
|
+
};
|
252
|
+
}
|
253
|
+
async execute() {
|
254
|
+
var _a;
|
255
|
+
const items = this.getInputData();
|
256
|
+
const returnData = [];
|
257
|
+
for (let i = 0; i < items.length; i++) {
|
258
|
+
const model = this.getNodeParameter('model', i);
|
259
|
+
const prompt = this.getNodeParameter('prompt', i);
|
260
|
+
const negativePrompt = this.getNodeParameter('negativePrompt', i, '');
|
261
|
+
const denoiseStrength = this.getNodeParameter('denoiseStrength', i, 0.7);
|
262
|
+
const guidanceScale = this.getNodeParameter('guidanceScale', i, 3);
|
263
|
+
const batchSize = this.getNodeParameter('batchSize', i, 1);
|
264
|
+
const useLora = this.getNodeParameter('useLora', i, false);
|
265
|
+
const loraType = useLora ? this.getNodeParameter('loraType', i, 'none') : 'none';
|
266
|
+
const loraStrength = useLora ? this.getNodeParameter('loraStrength', i, 1) : 1;
|
267
|
+
const useControlNet = this.getNodeParameter('useControlNet', i, false);
|
268
|
+
const controlNetType = useControlNet ? this.getNodeParameter('controlNetType', i, 'none') : 'none';
|
269
|
+
const controlStrength = useControlNet ? this.getNodeParameter('controlStrength', i, 0.5) : 0.5;
|
270
|
+
const returnPreprocessed = useControlNet ? this.getNodeParameter('returnPreprocessed', i, false) : false;
|
271
|
+
const waitForCompletion = this.getNodeParameter('waitForCompletion', i, true);
|
272
|
+
const imageSource = this.getNodeParameter('imageSource', i);
|
273
|
+
let imageUrl = '';
|
274
|
+
if (imageSource === 'url') {
|
275
|
+
imageUrl = this.getNodeParameter('imageUrl', i);
|
276
|
+
}
|
277
|
+
else {
|
278
|
+
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
|
279
|
+
const binaryData = this.helpers.assertBinaryData(i, binaryPropertyName);
|
280
|
+
if (binaryData.mimeType && !binaryData.mimeType.includes('image/')) {
|
281
|
+
throw new Error('The provided binary data is not an image');
|
282
|
+
}
|
283
|
+
if (binaryData.data) {
|
284
|
+
const dataBuffer = Buffer.from(binaryData.data, 'base64');
|
285
|
+
imageUrl = `data:${binaryData.mimeType};base64,${dataBuffer.toString('base64')}`;
|
286
|
+
}
|
287
|
+
else if (binaryData.url) {
|
288
|
+
imageUrl = binaryData.url;
|
289
|
+
}
|
290
|
+
else {
|
291
|
+
throw new Error('No usable image data found in the provided binary property');
|
292
|
+
}
|
293
|
+
}
|
294
|
+
let taskType = 'img2img';
|
295
|
+
if (model === 'Qubico/flux1-dev-advanced') {
|
296
|
+
if (useControlNet && controlNetType !== 'none') {
|
297
|
+
taskType = 'controlnet-lora';
|
298
|
+
}
|
299
|
+
else if (useLora && loraType !== 'none') {
|
300
|
+
taskType = 'img2img-lora';
|
301
|
+
}
|
302
|
+
}
|
303
|
+
const body = {
|
304
|
+
model,
|
305
|
+
task_type: taskType,
|
306
|
+
input: {
|
307
|
+
prompt,
|
308
|
+
negative_prompt: negativePrompt,
|
309
|
+
image: imageUrl,
|
310
|
+
denoise: denoiseStrength,
|
311
|
+
guidance_scale: guidanceScale,
|
312
|
+
batch_size: batchSize,
|
313
|
+
},
|
314
|
+
};
|
315
|
+
if (useLora && loraType !== 'none') {
|
316
|
+
body.input.lora_settings = [
|
317
|
+
{
|
318
|
+
lora_type: loraType,
|
319
|
+
lora_strength: loraStrength,
|
320
|
+
},
|
321
|
+
];
|
322
|
+
}
|
323
|
+
if (useControlNet && controlNetType !== 'none') {
|
324
|
+
body.input.control_net_settings = [
|
325
|
+
{
|
326
|
+
control_type: controlNetType,
|
327
|
+
control_image: imageUrl,
|
328
|
+
control_strength: controlStrength,
|
329
|
+
return_preprocessed_image: returnPreprocessed,
|
330
|
+
},
|
331
|
+
];
|
332
|
+
}
|
333
|
+
try {
|
334
|
+
const response = await GenericFunctions_1.piApiRequest.call(this, 'POST', '/api/v1/task', body);
|
335
|
+
let taskResult = response;
|
336
|
+
if (waitForCompletion && ((_a = response.data) === null || _a === void 0 ? void 0 : _a.task_id)) {
|
337
|
+
taskResult = await GenericFunctions_1.waitForTaskCompletion.call(this, response.data.task_id);
|
338
|
+
}
|
339
|
+
returnData.push({
|
340
|
+
json: taskResult,
|
341
|
+
});
|
342
|
+
}
|
343
|
+
catch (error) {
|
344
|
+
if (this.continueOnFail()) {
|
345
|
+
returnData.push({
|
346
|
+
json: {
|
347
|
+
error: error.message,
|
348
|
+
},
|
349
|
+
});
|
350
|
+
continue;
|
351
|
+
}
|
352
|
+
throw error;
|
353
|
+
}
|
354
|
+
}
|
355
|
+
return [returnData];
|
356
|
+
}
|
357
|
+
}
|
358
|
+
exports.FluxImageToImage = FluxImageToImage;
|
359
|
+
//# sourceMappingURL=FluxImageToImage.node.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"FluxImageToImage.node.js","sourceRoot":"","sources":["../../../../nodes/PiAPI/Flux/FluxImageToImage.node.ts"],"names":[],"mappings":";;;AAQA,iEAAiF;AACjF,mDAAqE;AAErE,MAAa,gBAAgB;IAA7B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,2BAA2B;YACxC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,kDAAkD;YAC/D,QAAQ,EAAE;gBACT,IAAI,EAAE,qBAAqB;aAC3B;YACD,MAAM,EAAE,QAAyB;YACjC,OAAO,EAAE,QAAyB;YAClC,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,UAA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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;AAhXD,4CAgXC"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
2
|
+
export declare class FluxTextToImage implements INodeType {
|
3
|
+
description: INodeTypeDescription;
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
5
|
+
}
|