n8n-nodes-supermachine 1.2.0 → 1.2.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.
|
@@ -594,24 +594,23 @@ class Supermachine {
|
|
|
594
594
|
folderIdNumber = folderIdValue;
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
|
-
// AUTO-FILL WIDTH/HEIGHT FROM IMAGE
|
|
598
|
-
const
|
|
599
|
-
const sizePresetV3 = this.getNodeParameter('sizePresetV3', i, '');
|
|
597
|
+
// AUTO-FILL WIDTH/HEIGHT FROM IMAGE SIZE DROPDOWN
|
|
598
|
+
const imageSizeV3 = this.getNodeParameter('imageSizeV3', i, '576x1024');
|
|
600
599
|
let width = 576;
|
|
601
600
|
let height = 1024;
|
|
602
|
-
if (
|
|
603
|
-
//
|
|
604
|
-
|
|
601
|
+
if (imageSizeV3 === 'custom') {
|
|
602
|
+
// Use custom width/height fields
|
|
603
|
+
width = this.getNodeParameter('widthV3', i, 576);
|
|
604
|
+
height = this.getNodeParameter('heightV3', i, 1024);
|
|
605
|
+
}
|
|
606
|
+
else {
|
|
607
|
+
// Parse size directly from dropdown value (e.g. '1024x768')
|
|
608
|
+
const [w, h] = imageSizeV3.split('x').map(Number);
|
|
605
609
|
if (w && h) {
|
|
606
610
|
width = w;
|
|
607
611
|
height = h;
|
|
608
612
|
}
|
|
609
613
|
}
|
|
610
|
-
else if (imageRatioV3 === 'Custom') {
|
|
611
|
-
// Use custom width/height
|
|
612
|
-
width = this.getNodeParameter('widthV3', i, 576);
|
|
613
|
-
height = this.getNodeParameter('heightV3', i, 1024);
|
|
614
|
-
}
|
|
615
614
|
// END AUTO-FILL
|
|
616
615
|
const body = {
|
|
617
616
|
prompt: this.getNodeParameter('promptV3', i),
|
|
@@ -715,7 +714,7 @@ class Supermachine {
|
|
|
715
714
|
await new Promise((resolve) => setTimeout(resolve, pollingInterval * 1000));
|
|
716
715
|
continue;
|
|
717
716
|
}
|
|
718
|
-
const pollItems = pollResponse.items;
|
|
717
|
+
const pollItems = pollResponse.items.filter((item) => item.batchId === batchID);
|
|
719
718
|
if (Array.isArray(pollItems) && pollItems.length > 0) {
|
|
720
719
|
const firstItem = pollItems[0];
|
|
721
720
|
const status = firstItem.status;
|
|
@@ -750,24 +749,23 @@ class Supermachine {
|
|
|
750
749
|
prompt = `${prompt} a photo of ${characterEmbedCode}`.trim();
|
|
751
750
|
}
|
|
752
751
|
}
|
|
753
|
-
// AUTO-FILL WIDTH/HEIGHT FROM IMAGE
|
|
754
|
-
const
|
|
755
|
-
const sizePreset = this.getNodeParameter('sizePreset', i, '');
|
|
752
|
+
// AUTO-FILL WIDTH/HEIGHT FROM IMAGE SIZE DROPDOWN
|
|
753
|
+
const imageSize = this.getNodeParameter('imageSize', i, '1024x1024');
|
|
756
754
|
let width = 1024;
|
|
757
|
-
let height =
|
|
758
|
-
if (
|
|
759
|
-
//
|
|
760
|
-
|
|
755
|
+
let height = 1024;
|
|
756
|
+
if (imageSize === 'custom') {
|
|
757
|
+
// Use custom width/height fields
|
|
758
|
+
width = this.getNodeParameter('width', i, 1024);
|
|
759
|
+
height = this.getNodeParameter('height', i, 768);
|
|
760
|
+
}
|
|
761
|
+
else {
|
|
762
|
+
// Parse size directly from dropdown value (e.g. '1024x768')
|
|
763
|
+
const [w, h] = imageSize.split('x').map(Number);
|
|
761
764
|
if (w && h) {
|
|
762
765
|
width = w;
|
|
763
766
|
height = h;
|
|
764
767
|
}
|
|
765
768
|
}
|
|
766
|
-
else if (imageRatio === 'Custom') {
|
|
767
|
-
// Use custom width/height
|
|
768
|
-
width = this.getNodeParameter('width', i, 1024);
|
|
769
|
-
height = this.getNodeParameter('height', i, 768);
|
|
770
|
-
}
|
|
771
769
|
// END AUTO-FILL
|
|
772
770
|
const body = {
|
|
773
771
|
prompt: prompt,
|
|
@@ -1066,7 +1064,7 @@ class Supermachine {
|
|
|
1066
1064
|
await new Promise((resolve) => setTimeout(resolve, pollingInterval * 1000));
|
|
1067
1065
|
continue;
|
|
1068
1066
|
}
|
|
1069
|
-
const pollItems = pollResponse.items;
|
|
1067
|
+
const pollItems = pollResponse.items.filter((item) => item.batchId === batchId);
|
|
1070
1068
|
if (Array.isArray(pollItems) && pollItems.length > 0) {
|
|
1071
1069
|
const firstItem = pollItems[0];
|
|
1072
1070
|
const status = firstItem.status;
|
|
@@ -1383,7 +1381,7 @@ class Supermachine {
|
|
|
1383
1381
|
await new Promise((resolve) => setTimeout(resolve, pollingInterval * 1000));
|
|
1384
1382
|
continue;
|
|
1385
1383
|
}
|
|
1386
|
-
const pollItems = pollResponse.items;
|
|
1384
|
+
const pollItems = pollResponse.items.filter((item) => item.batchId === batchId);
|
|
1387
1385
|
if (Array.isArray(pollItems) && pollItems.length > 0) {
|
|
1388
1386
|
const firstItem = pollItems[0];
|
|
1389
1387
|
const status = firstItem.status;
|
|
@@ -1524,7 +1522,7 @@ class Supermachine {
|
|
|
1524
1522
|
await new Promise((resolve) => setTimeout(resolve, pollingInterval * 1000));
|
|
1525
1523
|
continue;
|
|
1526
1524
|
}
|
|
1527
|
-
const pollItems = pollResponse.items;
|
|
1525
|
+
const pollItems = pollResponse.items.filter((item) => item.batchId === batchId);
|
|
1528
1526
|
if (Array.isArray(pollItems) && pollItems.length > 0) {
|
|
1529
1527
|
const firstItem = pollItems[0];
|
|
1530
1528
|
const status = firstItem.status;
|
package/package.json
CHANGED