perchance

joined 2 years ago
MODERATOR OF
[–] perchance@lemmy.world 2 points 3 weeks ago (3 children)

Are you able to share/DM the URL to so I can try debug the issue?

[–] perchance@lemmy.world 6 points 4 weeks ago* (last edited 4 weeks ago) (5 children)

The current text generation model is quite bad in a lot of different ways that are unfortunately hard to fix. If you're talking about perchance.org/ai-character-chat then you could use custom code to do a replacement - you'd paste this in the custom code box in the character editor (click "show more" and scroll down):

oc.thread.on("MessageAdded", function({message}) {
  message.content = message.content.replaceAll("Katrice", "Katherine");
});

Alternatively, you could grit your teeth and bear it for another few months until I upgrade the text gen model - the new model will be a lot smarter and have fewer weird idiosyncrasies like this. Currently I'm finalizing the big image generation model upgrade, and working on a multiplayer plugin, and then next on the list is the text gen upgrade. Ideally I'll finish upgrading the text gen model some time during April.

[–] perchance@lemmy.world 1 points 1 month ago

Thank you for reporting this! I think I've found the issue and fixed it. Let me know if not.

[–] perchance@lemmy.world 1 points 1 month ago (3 children)

I think I've fixed it - can you check and let me know?

[–] perchance@lemmy.world 2 points 1 month ago* (last edited 1 month ago) (1 children)

Can you check this thread to see if your issue was the same? https://lemmy.world/post/25634509

Also, can you let me know which ISP you use? That seems to have been the issue in the above thread, and I'd like to reach out to ISPs to find why they're blocking the user-uploads subdomain (which hosts some scripts which are needed for the ai character chat to function correctly). No worries if you can't mention it, since it would imply the country/region you're from and some people prefer not to mention that online for privacy reasons. You can feel free to DM it to me if you'd prefer that, of course.

[–] perchance@lemmy.world 5 points 1 month ago* (last edited 1 month ago) (1 children)

The /generators page criticism is fair. I'd like to add some sorting/filtering options.

I'm not convinced by:

But now that the AI has been added as an actual part of the generator creation process [...] The fact that Perchance is forcing all this AI on us

You can turn off all the AI features (bug checker, autocomplete, ai helper). If you can't disable them, then that's a bug. If the ability to disable is not enough, and you instead want me to permanently prevent everyone else from using the AI editing features, then no, I'm not going to do that. I don't think this is a good suggestion.

An aside, to be clear: I don't care about the aesthetics or tribal noise-making around use of AI tools. I do care about making a platform that makes it easier for newbies to start creating fun/interesting/useful things (even if they're basic/slop/boring to more experience devs). So if your problem is the use of AI itself in creating generators, then you should expect things to get worse from here on out, so it might save you some pain to just bite the bullet and make it a "goodbye forever".[1] If your concern is the quality of generators on the /generators page, or the quality of the AI helper/autocomplete outputs, then these are both temporary issues.

[1] I have on my todo list a guide for 'migrating off perchance', but it's not exactly near the top. @VioneT@lemmy.world is probably already busy enough, but pinging in case they can or have already written a guide on this, or somewhat related (e.g. perhaps glitch.com intro). There are also some alternative random generator sites to look into listed on the /welcome page. If anyone knows of a new/unlisted one, I'm happy to add a link there.

[–] perchance@lemmy.world 3 points 1 month ago* (last edited 1 month ago) (1 children)

Hi @dedaluslogic@lemmy.world sorry about that. I just fixed up the RSS feeds, and made them more future-proof and generally "robust" compared to the old glitch.me server. I am now also hosting them under a "proper" perchance subdomain (as suggested by @VioneT@lemmy.world a while ago):

https://rss-feeds.perchance.org/animal-sentence

Just change animal-sentence to your generator name. Note that the glitch server still exists, but now it simply redirects to rss-feeds.perchance.org, so the glitch RSS feed URLs will continue to work.

Let me know if there are any problems with this new server - since it's new, there may be some initial bugs to work through.

(btw, what approach did you use to create a bluesky bot with the RSS feeds? if it's easy enough for people without a lot of coding knowledge, i'd like to create a tutorial page for it, so it'd be handy if you could share a rough outline)

[–] perchance@lemmy.world 4 points 1 month ago* (last edited 1 month ago)

Sorry about that! This was a server problem, not a you problem. It should be fixed now. (Edit: there are some residual issues - esp with comments plugin, fixing now...)

[–] perchance@lemmy.world 1 points 1 month ago (1 children)

Hmm, this might have been caused by a browser crash - do you notice any characters missing from your character list? Unfortunately the browser storage (IndexedDB) is infamously unreliable, so data loss like this can happen if e.g. your computer suddenly crashes or loses power. Sorry about that. I should really switch to using OPFS to solve this problem.

[–] perchance@lemmy.world 1 points 1 month ago

No, Perchance uses an iframe for sandboxing so the ads/CMP/etc. cannot see any data you input/generate.

Copy-pasting a paragraph from a comment of mine on another thread:

As you probably know, the AI plugin servers are funded by ads. Perchance in general doesn't have any ads, and has always been completely free, but the AI plugins are way too expensive to fund out of my own bank account. So if you're not logged in, you'll see ads on generators that use AI plugins. I figured it's worth mentioning here that unlike basically every other ad-funded site on the internet, Perchance does not trust ads. Perchance has a sand-boxed separation between the actual generator/page contents (which live in a "iframe" - it's basically like a separate browser tab embedded within the page), and the place where ad code runs -- so ads cannot look at your chat/text/image/etc. data in order to guess at more relevant ads. Perchance uses a very reputable advertising company (same one used by Reuters and Aljazeera and several other large companies) so the likelihood of shady ad tech is already extremely low, but there's no need for any trust here, thanks to the sand-boxing that Perchance has. So, in terms of showing you more relevant ads, all they can possibly see is the URL of the page that you're on. That's the only thing that's exposed to ad serving algorithms by visiting a Perchance page, no matter how much information you input into a Perchance generator/page.

[–] perchance@lemmy.world 1 points 1 month ago (3 children)

Okay, sorry about that, can you try clearing and then importing again? I've added another fix.

[–] perchance@lemmy.world 1 points 1 month ago (2 children)

Possible explanation: https://www.reddit.com/r/perchance/comments/1isr339/comment/mdyvhnl

But actually, looking at the URL just now, it's the "cookie popup" script which is used for GDPR type stuff, which is legally required in the European Union: https://user-uploads.perchance.org/file/63c85ff7ce3ecc0323e0bbd555078fad.js This script is used at the platform level - not within any particular generator, so it's not specific to the story generator.

I'm not sure why NordVPN has flagged it. I have NordVPN and I haven't received any warnings for this (but I'm not in the EU - maybe that matters). Either way, it should be fine to just block it.

 

You can now click the gear icon in the text editor and create a "collab link" for your generator. If you share that link with others, they'll be able to edit/save the generator, and you'll be able to see each others text cursors/carets.

You can disable/invalidate the link, and regenerate a new one.

Please let me know if there are any issues! I may be able to improve the performance/latency of it after some more work on the server.

 

Several months ago I said new image generation quality would be coming soon. Then flux came out and I was like "oh cool, i'll just wait a month or so for community finetunes", and once again informed people that an image gen upgrade was not far off. But it turns out flux is really hard to finetune in its current form.

Aside: There have been attempts to fix this issue, but we're not quite there. I've been helping some people who are working on this (mainly dataset stuff, I'm no ML researcher), and progress is being made, but we're still at least a month away from 'serious' flux finetunes.

So base flux still doesn't know 'basic' stuff (e.g. doesn't even know most pokemon), and illustrious (another new model) requires a very specific prompting format.

While helping with the eventual open source flux finetune, I have also been attempting to put together a system that would intelligently route to the best model based on prompt content, and also generate tags for illustrious based on a natural language prompt, but it's still not good enough.

So Perchance images are atrociously bad at this point, and I considered just upgrading to SDXL, but this would likely mean two upgrades in a short period of time, both of which would require prompt engineering adjustments on the part of perchance generator devs. That would be annoying, and maybe more painful than just dealing with bad generation quality for another month or two.

In hindsight, I should have just upgraded to SDXL midway through 2024 (or even earlier). We may actually get another text gen upgrade before the image gen one at this rate. We're also getting close on video gen now with models like HunyuanVideo, which seems to be finetunable, and is quite fast with FastVideo.

Tangentially, I've been spending a lot of time on behind the scenes server stuff recently. For example, I've had to add filters to prevent people from uploading literal CSAM to perchance.org/upload - a problem that I naively did not consider when first creating the upload feature. This sort of work is annoying because it doesn't result in fun new features or plugins, but spending time on automating this sort of thing is important, because it ensures that e.g. using features like /upload doesn't require logging in, and doesn't e.g. require employing people for moderation. I'd much rather move a bit slower, and ensure perchance's sustainability and complete independence.

And tangential to that: One thing that I want to publicly promise, just so I can say "I told you so" in 20 years, is that Perchance will never "sell out" or "rug pull" in any sense of either phrase. It'll always be a bit weird. It'll never get investors, I'll never sell it, never require login, never send you emails (except e.g. password reset), never put ads on generators (unless it imports an AI/server-GPU-powered plugin), never add user-hostile social mechanics that try to increase 'engagement metrics', and so on. The OG devs here know this I hope, but there are newbies and non-devs here who think perchance is just another "AI site" that is burning investor money to keep it free, in preparation for a rugpull once they have market share. Perchance is a different kind of website. It's a public good that I maintain, not a "startup". The price you pay for this as someone who uses perchance is slower development, which I think is worth it, especially considering that it's always been like this, and people seem to like perchance (though I'm sure many wish I could fix/improve things faster).

So anyway, this was (supposed to be) just a quick post about what's been happening recently on the dev side of things. Apologies for the huge delay on the image gen side of things. Also sorry for the lack of response to a lot of posts and messages - I have a large backlog of stuff to get to (as usual, please feel free to ping me again and/or repost weekly).

 

I've received a few messages from experienced developers asking how they might be able to help improve Perchance. I typed out a decently long (but somewhat rambling and incomplete) response to a message just now and figured I might as well post it publicly for the benefit of others who are interested.

The TL;DR is probably: The most impactful thing that devs can do for the perchance community is to just have fun building things (generators/plugins/etc) that are interesting/useful to you, and then share your creations with friends or communities that might enjoy them. This is very helpful!

Message response below:


The Perchance site itself is really just a code editor with a sandboxed iframe (that the code is thrown into), and a mongodb server for accounts/generators, so not a lot of my dev time goes into that level of the platform. And the DSL/engine doesn't change much at this point (though an overhaul will likely come at some point), so most of my time is spent on creating plugins, examples/applications, and stuff like that.

I could add a bunch more features to the site, but I prefer to keep the foundation very simple, which is why I create plugins like perchance.org/upload-plugin and perchance.org/comments-plugin and so on. I.e. instead of adding comments as a "native" feature, I just add it as a plugin, which allows me to be more nimble and experimental.

There are limits to this, of course. One native feature that is sorely needed imo is collaborative editing - akin to Google Docs, so you can just share a link to start working on stuff with others. Another is optional AI-assisted code auto-completion. For both of those I need to upgrade to CodeMirror 6, but the Lezer stuff is kinda gnarly. If someone managed to get the Perchance DSL highlighted with CodeMirror 6 that would be very handy, but this is definitely not a "good first issue". I did spend one day on it, thinking that's all it'd take, but I now realize that it's something which I'll need to set aside several days for, and I've been putting it off.

Here's the basic setup for CodeMirror 6: https://perchance.org/codemirror6-basic-html#edit

And I originally thought I'd use the same mixed parsing approach that @codemirror/lang-html uses, except instead of the HTML script tags triggering the transition from non-JS text to JS-highlighted text, it'd be square brackets (and function headers), but I think the problem with that is that the HTML parser has the advantage that the closing script tag in HTML code always means "end of JS" (even if it's e.g. in the middle of a JS string! this can be somewhat surprising to many web devs), whereas closing square brackets can 'validly' occur in JS code without necessarily indicating the end of a square block. Someone here seems to have come to the conclusion that Lezer might not be a good fit for this sort of thing, and so a stream parser might be the way to go, but I'm not so sure, because IIUC, @codemirror/lang-javascript manages to do it with template strings. I.e. ${ to indicate start of JS, and } to indicate end. That's almost identical to what is needed for the Perchance DSL, so it seems like Lezer can do this. But maybe @codemirror/lang-javascript is doing some non-Lezer stuff, since IIRC there are some proprocessing/tokenization things you can do before it gets passed to Lezer. Either way, using the official JavaScript (or html/markdown/etc - which includes it as a sub-module) parser, with some minimal modifications, is probably the way to go, since I don't want to have to maintain a from-scratch lib of that level of complexity.

So that's one thing that comes to mind right now, but that said, probably the most helpful thing that community members can to do to help Perchance is to create generators/plugins/games/etc. An interesting one that I noticed a few days ago, as an example: https://perchance.org/ai-roguelike and another: https://perchance.org/infinitecraft-but-its-a-trading-card-game

The advantage of helping in this way is: 1) it's fun and you can just build stuff that's interesting to you, and 2) it doesn't require any coordination with me or anyone else. The latter point is pretty important because I'm a pretty solitary/hermit type of person, so it may be hard to get in contact with me for several weeks at a time.

I've spent quite a bit of time recently building generators to try and provide examples of games/experiences/tools that can be created with the AI plugins. The more people there are doing this, the more I can move down to the lower levels of Perchance. My bottleneck is currently at the higher "application" level, rather than the platform level, if that makes sense.

 

As usual, the Chrome team is leading the charge on some exciting new web platform tech. The goal is to release some prototypes and eventually write up the feature as a browser standard that would make its way into all browsers (i.e. not just Chrome).

The point is, it'd run completely on-device (no cloud access, works offline), so it'd be a very small model, but would likely still be smart enough for a lot of tasks - e.g. summarizing text, converting a list of words into a grammatically correct sentence/description, guessing an appropriate emotion based on some character dialogue, etc.

Article: https://developer.chrome.com/docs/ai/built-in

The key problem with these text generation models is how massive they are. They're so big that they could literally fill your entire device (for smart phones and cheap laptops, at least), and would bloat the initial browser download time from a few minutes to a few days for a lot of people.

Still, smaller models are getting surprisingly smart, and while they're still several times the size of the actual browser download itself, this download can be done in the background.

Either way, I'm excited about this new direction, because there are lots of tasks that don't require an extremely smart model, and so it's overkill to use /ai-text-plugin, especially since it means ads will be shown for non-logged-in users.

One problem that I do anticipate, is that the models will be extremely "safety-oriented", meaning refusal to even generate stuff like violence in a DnD fantasy adventure, and stuff like that. I know from experience that Google's Gemini models have false-positive-refusal rates that almost make them unusable even for many sfw tasks. There is a mention of LoRA fine-tuning in the article, which is very exciting and might help with that. If you're a web dev, you can use the links on the page to test their prototypes and give constructive+professional feedback on them. It'd be good for the health of the web platform to have some of the feedback be for use-cases like Perchance, and not just e.g. business applications.

Tangentially, builders here may also be interested in Transformers.js which allows you to run AI models in your browser. Ad-free AI plugins could already be created using this project, although for a lot of models the download times are a bit too long, and processing times also a bit too long (for mobile devices especially). Still, the situation is improving quite rapidly. /ai-character-chat already uses Transformers.js for text embedding.

0
submitted 2 years ago* (last edited 2 years ago) by perchance@lemmy.world to c/perchance@lemmy.world
 

Example generators made with this plugin:

See the plugin page for more. There will probably be issues/bugs! Thank you in advance to the pioneers who test this and report bugs/issues in these first few days/weeks 🫡

(It was actually possible to discover this plugin a few days ago, but no one made it through all the clues lol ^^ some people did at least figure out the first step)

 

Wondering if someone can get in contact with Raggedflight to ask if they'd like to donate the link-plugin to the admin account so I can put it into the official plugin list? Credit to Raggedflight would be added at the top of the page just like in https://perchance.org/image-plugin of course. No worries if they'd rather not!

 

Simple example usage: https://perchance.org/url-params-plugin-example?blah=abc123

It's really simple:

url = {import:url-params-plugin}

output
  [url.blah] // this will output 'abc124' if URL has '?blah=abc123' on the end

This plugin allows you to, for example, have several "different" generators within the same generator page, where each sub-generator has its own URL. Or to just adapt the output of your generators based on the URL. E.g. you might have an English and a French version of your generator with URLs like this:

In that case, within your code you can use [url.lang] to determine which language the user is viewing, and adjust your list selection/odds/etc. based on that.

You can also use it to e.g. link directly to a particular seed for the seeder plugin, and stuff like that.

(Note for experienced Perchance users: The old document.referrer hack is no longer required since Perchance now copies all parameters over to the iframe when initializing it)

1
submitted 2 years ago* (last edited 2 years ago) by perchance@lemmy.world to c/perchance@lemmy.world
 

For images and other files that you need for your generators/plugins/etc. - rather than using base64 strings, or external file hosting services like catbox.moe

https://perchance.org/upload

 

Previously all generators shared the null.perchance.org subdomain, but now thanks to Cloudflare moving wildcard DNS from the enterprise plan to the free plan (announcement post) I've given each generator its own subdomain. I really should have done this a year ago when they announced it - just got around to it today.

I've added some code to transfer localStorage data across to the new subdomains, but unfortunately this code has to run the first time you visit any generator, and causes a refresh to happen a second or two after page load. This'll be a bit annoying, but I can remove this code after a few months - it's just to make sure that any important data is transferred across. If someone hasn't visited a particular generator in a few months, then the localStorage data (e.g. from the remember-plugin) probably isn't very important (and if it is, it's still recoverable - they'd just have to make a post here on the lemmy community to get help on how to do it).

If, for some reason, you need to easily & programmatically access the new subdomain, you can use the global generatorPublicId variable (akin to generatorName which already existed). The full URL of the embedded iframe is https://${generatorPublicId}.perchance.org/${generatorName}. The null versions of generator embed URLs are auto-redirected to the new generatorPublicId versions, so you can still embed your generator in other websites using the normal embed code:

<iframe src="https://null.perchance.org/my-generator-name" style="width:100%; height:600px; border:none;"></iframe>

That iframe will redirect to:

https://50e67e76966106ad99d72edb729943b7.perchance.org/my-generator-name

Please let me know if you run into any troubles with this, or have any feedback/suggestions .𖥔 ݁ ˖

view more: next ›