Sfoglia il codice sorgente

Merge branch 'fix-fetch-output-duplicate'

fszontagh 1 mese fa
parent
commit
1a8f7b6c32
1 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. 5 5
      nodes/sdcpp/sdcpp-fetch-output.js

+ 5 - 5
nodes/sdcpp/sdcpp-fetch-output.js

@@ -80,10 +80,6 @@ const outputSchema = {
             type: 'array',
             description: 'One entry per file, each a binary file object other nodes accept'
         },
-        file: {
-            type: 'object',
-            description: 'The first file, for the common case of a single image feeding a node that takes one'
-        },
         totalBytes: { type: 'number' },
         storage: { type: 'array', description: 'Collection and id of each stored file, when storing was enabled' }
     }
@@ -331,10 +327,14 @@ async function execute(config, input, context) {
     smartbotic.log.info('SD.cpp: downloaded ' + files.length + ' output file(s), ' +
         totalBytes + ' bytes');
 
+    // Only "files". There used to be a "file" alongside it holding the first
+    // entry, meant as a convenience for the single-image case - but JSON has no
+    // references, so it was a second copy of the same base64. The execution
+    // record carried every image twice, and anything that walks the output
+    // looking for images found and displayed each one twice. Use files[0].
     return {
         count: files.length,
         files: files,
-        file: files[0],
         totalBytes: totalBytes,
         storage: storage
     };