samvns

joined 1 week ago
 

This is a bug report about the text-to-image-plugin itself, not a prompting question.

I'm trying to use the referenceImage option (undocumented on the official plugin page, but present in the plugin's own code):

image({
  prompt: "...",
  referenceImage: { url: myUploadedUrl, blur: 0.3 }
});

Bug 1 — upload URL from perchance.org/upload fails validation Uploading via https://perchance.org/upload returns a URL like: https://user.uploads.dev/file/53997b9eaa477fc9d69ec2bc0c1d8b4f.png

But the plugin's own validation code rejects anything that doesn't start with https://user-uploads.perchance.org/ or data:. So the URL that the official upload page gives you doesn't actually work with the plugin that's supposed to accept it. Looks like the allowlist wasn't updated after the upload service's hostname changed.

Bug 2 — data: URL passes validation but never completes As a workaround, passing a data: URL directly passes validation, but then the console repeatedly throws:

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('<URL>') does not match the recipient window's origin ('<URL>').

(~10 retries), and generation just times out with no image and no clear error. Looks like a race condition — the plugin tries to postMessage the reference image into its internal iframe before that iframe has finished navigating to the expected origin.

Questions:

  1. Is referenceImage currently supported/maintained, or experimental?
  2. What's the current correct way to get a user-uploads.perchance.org URL?
  3. Anyone seen the postMessage race before?

Happy to share console logs / generator link if useful.