result = await image(promptData); issues...
result = await image(promptData); issues...
Just a moment...
async function getNewGeneratedImage() { let result = await image(promptData); img = document.createElement('img'); img.src = result.dataUrl; img.alt = 'Error displaying generated image.' img.title = result.inputs.prompt; img.setAttribute('seed', result.inputs.seed); // I know it was -1 but i need the seed it used... _generatedImagesContainer.append(img); };
If perchance could adjust their script for the image function then I would have the correct seed that ended up being used instead of -1...
This would help a lot... the standard [image(promptData)] doesn't allow me to do what i am trying to do near as easily because of all the iframes divs etc it generates, adds, removes, etc. (I monitored over 800 iframe add and removes trying to get 1 image by using an observer... not all removes were logged but my original plan with observers faded once i realized this...) getting the canvas is much easier but i need the seed info... I guess i could generate random numbers when its -1 and set the seed in the prompt but theoretically thats extra steps overall... If perchance could adjust their canvas seed that would be great...
Yes, the
inputs.seeddoes return-1if it is set to-1and not the generated seed upon generation. This was previously requested as well, but @perchance@lemmy.world dev haven't got around to fixing it. Currently, the best way, as you already know, is to pre-generate the seed.Sorry for the delay on that - fixed now @Theseus88@lemmy.world.
result.inputs.seedshould return the actual seed used now.That sounds like a bug with the plugin? If you have a reproducible example please create a throwaway gen for it