• 24 Posts
  • 365 Comments
Joined 1 year ago
cake
Cake day: July 14th, 2023

help-circle




  • 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.


  • 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.


  • 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! @VioneT@lemmy.world @BluePower@sh.itjust.works

    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.


  • 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!


  • 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)


  • 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.









  • Yes, sorry about this. This is priority number 1 for me right now - I’ve been working for the last few days on fixing this. It has turned out to be harder to fix than I anticipated. Some sort of GPU memory error due to particular driver versions or something. That said, I should be able to fix it within the next day and a half (~36 hours from the time of this comment) unless something goes terribly wrong. I’m going to upgrade the whole stack, which should fix this issue, and also give a bit of a performance boost (slightly faster text generation) as a bonus.