perchance

joined 1 year ago
MODERATOR OF
[–] perchance 2 points 1 month ago

Hmm, this error is related to your device's storage limits - since chats are stored on your device rather than on a server. Is your device's storage nearly full? Or is your chat massive (i.e. multiple novels worth of text in the chat logs)? If you could paste chat logs into a character counter, and let me know, and also let me know the device/OS and browser you're using (e.g. Samsung A50 + Chrome, or iPhone + Safari), that would be helpful so I can try to replicate this error on my end.

[–] perchance 3 points 1 month ago* (last edited 1 month ago) (2 children)

Oof sorry about that! There was a very silly bug in moderation/spam detection stuff - fixed now. Thanks for the clear bug report πŸ™

(aside: i've been listening to the music on /starlitsky for the past 30 mins - since starting on fixing this bug, it's nice:)

[–] perchance 1 points 1 month ago (1 children)

Yep, fair point. Done. I didn't sticky this btw - I'm not sure if I've ever stickied a post on here.

[–] perchance 1 points 1 month ago (1 children)

Heads up: Just found a critical issue with the new approach - had to disable it for now, so it's back to the old approach. Need to sleep soon so probably won't solve it today, but will hopefully get it solved tomorrow 🀞

[–] perchance 2 points 1 month ago (6 children)

Oh, strange! Are you able to reliably reproduce this? Even if only 1 in 100 or something? I don't mind generating a few hundred images if that's what it takes to reproduce this. Does it happen with specific prompts/seeds, or e.g. only when using square brackets in prompt, or high parenthesis weightings, or just completely randomly and very rarely?

[–] perchance 2 points 1 month ago (1 children)

Yep you guessed right - it's for the screenshot API. I'm sure there is a smarter way (maybe load with param in URL or something), but it was a quick solution

[–] perchance 2 points 1 month ago* (last edited 1 month ago) (1 children)

Hmm. I just tested with a gmail address, and it works, but it took a while, and it went to the spam folder.

Since temp-mail.org has always worked, and has been fast, I'm 95% sure that it's due to some residual 'blocking'/filtering that gmail is doing, due to the spammer issue that perchance was hit by a while back. I think it's only a problem with gmail addresses, but only some of them, for some weird reason.

I'll add a note on the verification screen to tell them to use temp mail for now (and switch email later) if it's not working. Another solution is probably to send an email to the email address that the verification email gets sent from (or manually add it to contacts list). That should mark that email address as not-spam, which would hopefully make it easier for the verification email to get through. I'll add a note about that too.

[–] perchance 1 points 1 month ago (1 children)

Yeah so I did end up upgrading the whole stack (as I mentioned in the other thread), thinking that that would surely fix this gibberish problem once and for all, but it didn't. It should happen a lot less now though, since I have added detection code which catches a decent percentage of the machines that get into the broken state. I'll keep improving the detection code so it should happen less and less over the next week or two.

If you have links to bug reports that you're talking about, please do share them - I want to be sure that it's the same issue that I'm talking about here. If there are issues that are still quite common, then it's possible there are other issues that I'm not aware of.

[–] perchance 1 points 1 month ago* (last edited 1 month ago) (3 children)

I guess because you’re always copying everything onto the window object?

Update: I've now added a more general fix so I don't need to do this copy-everything-to-window stuff anymore. Along with solving some miscellaneous bugs, it also fixes the annoying thing where the engine needed to overwrite inline onclick/etc resulting in them 'disappearing' when you look for them in DevTools. Hopefully this fix hasn't introduced any bugs. Please let me know if you spot any issues! @[email protected] @[email protected]

The overall goal here is to push the engine closer and closer to "It's just HTML/JS/CSS (plus some Perchance stuff on top)", instead of having all sorts of engine implementation details "getting in the way" of HTML/JS that should work fine.

Edit: Had to disable the new approach due to an issue, but will hopefully be able to re-enable it tomorrow if all goes well.

[–] perchance 3 points 2 months ago* (last edited 2 months ago) (2 children)

Very cool!! Nice job on this. One thing I was just imagining was an optional "high quality" mode where it screenshots the page using getDisplayMedia, which will be more accurate (e.g. iframes, modern CSS, etc.), but has the downside that it requires a browser permission popup:

async function captureScreenshot() {
  try {
    // Request screen capture permission if not already granted
    const stream = await navigator.mediaDevices.getDisplayMedia({ preferCurrentTab: true });
    
    // Create a video element to capture the stream
    const video = document.createElement('video');
    video.srcObject = stream;
    await video.play();

    // Create a canvas to draw the video frame
    const canvas = document.createElement('canvas');
    canvas.width = video.videoWidth;
    canvas.height = video.videoHeight;

    // Draw the current video frame to the canvas
    canvas.getContext('2d').drawImage(video, 0, 0, canvas.width, canvas.height);

    // Stop all tracks in the stream
    stream.getTracks().forEach(track => track.stop());

    // Convert the canvas to a data URL (PNG format)
    return canvas.toDataURL('image/png');
  } catch (error) {
    console.error('Error capturing screenshot:', error);
    return null;
  }
}

https://perchance.org/getdisplaymedia-screenshot-example

If the mode is set to high quality, and the user denies the permission (or their device doesn't support it - e.g. mobile devices don't currently support getDisplayMedia), then it could fall back to the normal approach.

In any case, well done with this plugin!

[–] perchance 4 points 2 months ago* (last edited 1 month ago) (3 children)

Nope, it's not malware or "shady" - it's a very widely used bot-prevention service by Cloudflare, a reputable company, and it's specifically designed to be privacy-preserving: https://blog.cloudflare.com/turnstile-private-captcha-alternative/

An example of the (scary sounding) "fingerprinting" you mention is checking whether the browser viewport is actually being rendered into pixels (as opposed to it being a "headless" machine with no actual rendering, which is a sign of a bot). These sorts of checks are harmless, and they make things like Perchance's AI plugins possible when they otherwise wouldn't be.

The modern internet is built upon bot and fraud prevention mechanisms. The economics of the internet wouldn't work at all without them. You're free to block scripts on your machine of course, but "begging website administrators to remove these scripts from their websites" is plainly naive, and wastes the time of said admins. (Edit: This sentence came out a bit harsh in hindsight, sorry about that. I'll leave it here for accountability.)

I'm not adding paid features to Perchance. It'll always be completely free. This means bot prevention checks are required for generators that import ad supported plugins (i.e. AI plugins). You have very specific requirements, so you should use a paid service instead of Perchance. (Though note, to get through the checkout of said paid service, Stripe will run a bot/fraud check against your browser and your IP, let alone getting your credit card number which is obviously tied directly to you. Maybe find one that accepts crypto - or even better, support open source by joining the local ML community: reddit.com/r/LocalLLaMA)

[–] perchance 2 points 2 months ago* (last edited 2 months ago)

It's definitely possible, since all the code for generators on Perchance is openly available and downloadable, but currently there's unfortunately no "one-click" way to do this right now - and it still would require a bit of coding knowledge at this point.

I think I wrote a comment related to this a few months back - basically you'd need to use something like ollama or llama.cpp or tabbyAPI or Aphrodite or vLLM or TGI (....etc) to run the AI text gen model (and for image gen, ComfyUI or Forge WebUI). Unfortunately even a top-of-the-line gaming GPU like a 4090 is not enough to run 70B text gen models fully in VRAM, so it may be slow. And then you'd need swap out some code in perchance.org/ai-text-plugin and perchance.org/text-to-image-plugin so that it references your localhost API instead of Perchance's server. You'd just fork the plugins, make the changes, then swap out the imports of the ai plugin for your new copies in the gens you want to self-host.

Someone in the community with some coding experience could do the work to make this easier for non-coders, and hopefully they share it in this forum if they do. I'll likely get around to implementing something eventually, but probably won't have time in the near future.

view more: β€Ή prev next β€Ί