n8n-nodes-supermachine 0.6.1 → 0.6.2
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.
|
@@ -539,6 +539,17 @@ class Supermachine {
|
|
|
539
539
|
else if (resource === 'image') {
|
|
540
540
|
if (operation === 'generateV3') {
|
|
541
541
|
const additionalFieldsV3 = this.getNodeParameter('additionalFieldsV3', i, {});
|
|
542
|
+
// Convert folderId string to number for API v3
|
|
543
|
+
let folderIdNumber = 0;
|
|
544
|
+
if (additionalFieldsV3.folderId) {
|
|
545
|
+
const folderIdValue = additionalFieldsV3.folderId;
|
|
546
|
+
if (typeof folderIdValue === 'string') {
|
|
547
|
+
folderIdNumber = parseInt(folderIdValue, 10) || 0;
|
|
548
|
+
}
|
|
549
|
+
else if (typeof folderIdValue === 'number') {
|
|
550
|
+
folderIdNumber = folderIdValue;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
542
553
|
const body = {
|
|
543
554
|
prompt: this.getNodeParameter('promptV3', i),
|
|
544
555
|
modelName: this.getNodeParameter('modelNameV3', i),
|
|
@@ -554,7 +565,7 @@ class Supermachine {
|
|
|
554
565
|
faceEnhance: additionalFieldsV3.faceEnhance || false,
|
|
555
566
|
imageStrength: additionalFieldsV3.imageStrength || null,
|
|
556
567
|
initImage: additionalFieldsV3.initImage || '',
|
|
557
|
-
folderId:
|
|
568
|
+
folderId: folderIdNumber,
|
|
558
569
|
homeUrl: 'https://supermachine.art',
|
|
559
570
|
refImage: '',
|
|
560
571
|
controlMode: 0,
|
|
@@ -547,11 +547,14 @@ exports.getImageFields = [
|
|
|
547
547
|
description: 'Sampling method',
|
|
548
548
|
},
|
|
549
549
|
{
|
|
550
|
-
displayName: 'Folder
|
|
550
|
+
displayName: 'Move to Folder',
|
|
551
551
|
name: 'folderId',
|
|
552
|
-
type: '
|
|
553
|
-
|
|
554
|
-
|
|
552
|
+
type: 'options',
|
|
553
|
+
typeOptions: {
|
|
554
|
+
loadOptionsMethod: 'getFolders',
|
|
555
|
+
},
|
|
556
|
+
default: '',
|
|
557
|
+
description: 'Move image to folder. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
|
555
558
|
},
|
|
556
559
|
{
|
|
557
560
|
displayName: 'Face Enhance',
|
package/package.json
CHANGED