![User banner](https://lemmy.world/pictrs/image/68dea124-b450-4a20-9e69-80facb928c42.jpeg)
There is no native image upscaler in Perchance. You can download the image, then upscale it in other services.
Something like that too. Though, I don't have any VPN enabled (on Microsoft Edge, Windows 10), I guess they are quite limiting the free tier API now i.e. there is a limit to consecutive requests.
Here's the character link: https://perchance.org/ai-character-chat?data=Chloe~0bbbcdc9119e3a37bf986ac033c43548.gz
@perchance@lemmy.world - There's seems to be a fetch POST
problem again as of now.
Hello, you can check the changes here: https://perchance.org/vgs5qtexr3
First, you don't need to have multiple layers per color. You can just have one layer, on the generator its called base
, then under it, is the images per color, then you can use Perchance's dynamic odds to select the correct image.
output
[x = base.evaluateItem] [imageLayerCombiner(data)] ^[clicked == "lion"] // selects the base, then uses it for the selections.
data
...
layers
...
base // base layer
filter = [baseFilters.evaluateItem]
https://i.imgur.com/B6nOqdc.png^[x == 'blank'] //blank
https://i.imgur.com/4sFFKFS.png^[x == 'brownpinkBase']
https://i.imgur.com/xxCVLzl.png^[x == 'redBase']
https://i.imgur.com/IstBWcB.png^[x == 'blueBase']
https://i.imgur.com/JIPN8jR.png^[x == 'lavendarBase']
https://i.imgur.com/ZFlZfFp.png^[x == 'gingerBase']
https://i.imgur.com/fpAEPbi.png^[x == 'goldBase']
...
base // a separate list to select the base.
blank
redBase
blueBase
brownpinkBase
lavendarBase
gingerBase
goldBase
baseFilters // List of filter per base, selected with the dynamic odds.
hue-rotate({0-40}deg) saturate({0-100}%) brightness({50-150}%)^[x == 'brownpinkBase']
hue-rotate({0-10}deg) saturate({50-120}%) brightness({50-150}%)^[x == 'redBase']
hue-rotate({0-35}deg) saturate({50-120}%) brightness({50-130}%)^[x == 'blueBase']
hue-rotate({0-50}deg) saturate({50-120}%) brightness({50-130}%)^[x == 'lavendarBase']
hue-rotate({0-20}deg) saturate({50-100}%) brightness({50-100}%)^[x == 'gingerBase']
hue-rotate({0-10}deg) saturate({50-120}%) brightness({50-110}%)^[x == 'goldBase']
Saw this while looking at the code:
...
// NOTE: triggering change/input events like this doesn't trigger addEventListener handlers - like those added via initHandlers, above, but
// for now this is a happy accident because it's not for modifiers to not show up until you've actually typed something - reduces UI
// complexity on first impression.
...
So, I think it is not intended to not show the modifiers on load, but it gives a good UI.
The modifiers only shows upon user input on the description after the reload.
I mean, do you use the 'brain' icon for an AI to rewrite the prompt? If so, you need to re-add the (saveTitle:::...) (saveDescription:::...)
after it
Are you using the 'auto improve'? it might be removing the saveTitle
and saveDescription
What browser and device/operating system are you using? it works for me on Windows 10, Microsoft Edge
Edit: Also tested it on Chrome, Firefox, Opera GX and all works.
Try this simple prompt: A red ball (saveTitle:::Hello) (saveDescription:::This is a test description)
Can you link the generator that you are using? I was able to save the picture to the gallery with the specified title and description on the prompt (tested on ai-text-to-image-generator, ai-character-generator and text2image-generator).
Second this, so we can probably use 'anime' keywords in a 'realistic' model :)
Without padding, you can't really see the background on the generation iframe
, but it applies nonetheless:
It's because the message is split by the whitespaces, meaning 'living room' would be split to 'living' and 'room'. You could remove the .split(...).map(...)
and just normalize the message with .toLowerCase()
i.e. message.content.toLowerCase()
then it should work for the 'living room'.
Here's a code that might be what you want:
const backgroundUrls = {
'beach': 'https://user-uploads.perchance.org/file/a4c99b37a4d466b9a3fac8c9864d92b7.webp',
'cottages': 'https://user-uploads.perchance.org/file/13a5f82ae06233afcd35df95c5ffe806.webp',
// Add more background keywords and URLs as needed
};
const avatarUrls = {
'ramon': 'https://user-uploads.perchance.org/file/c986b9d02086c6cf9833761199d2fc52.webp',
'kylie': 'https://user-uploads.perchance.org/file/a6ba77a96dfd17a50101eba227435c07.webp',
// Add more avatar keywords as needed
};
oc.thread.on("MessageAdded", function({message}) {
if (message.author == 'user') { // you can change which reply can trigger the code, currently it is the user triggering the code
let words = message.content.split(/[\s+']/gm).map(a => a.toLowerCase()) // just separates the text into words
let foundBG = Object.keys(backgroundUrls).find((a) => words.includes(a)); // finds the keyword that is found on the message
let foundAVATAR = Object.keys(avatarUrls).find((a) => words.includes(a));
if (foundBG) oc.thread.messages.at(-1).scene = { 'background': {'url': backgroundUrls[foundBG]} }; // if a background keyword is found, change the bg
if (foundAVATAR) oc.character.avatar.url = avatarUrls[foundAVATAR]; // if an avatar keyword is found, change the avatar
message.expectsReply = false; // this just tells the AI not to reply to the user's message (remove if you need the AI to reply)
}
});
Images are from my unfinished VN: a-trip-to-the-beach :)
Not sure if you knew, but you can navigate to the galleries via the menu when saving the image to the gallery, even if there isn't a gallery element on the page. But yes, it could save some space on the server if we can disable the gallery.
I don't think it was implemented. Only the data.inputs
on the onFinish
was added.
Ah, .sentenceCase
is used to only capitalize the 1st letter of the sentence. You might want to use .titleCase
to capitalize each word.
I didn't intend the comment to mean that the 'this issue should be ignored' but just stating an observation on the generators that I've seen in Perchance (maybe I intended it unconsciously, so sorry), but I get what you mean that it is quite limiting not to be able to use the regular ways of accessing/manipulating the DOM.
In most cases, I don't think people would directly use the document.body
(unless they are appending something to it) so this might be just for rare cases.
Most of the time, they would be working with what they have added on the HTML panel, and not on the parent of it.
Update 4: Fixed
Update 3: It seems that changing the 'src' of the iframe
of the embedded seems to apply the changes. Clicking on the 'Go to Event' buttons on the home tab seems to revert the page to its previous versions. A video recording of the problem.
Update 2: Can confirm that the changes are reflected after a couple of minutes, for now.
Update: The embedded page has now reflected the changes. Will monitor if any other changes are immediately (or at least after a little bit of time) reflected.
I'm posting again to re-open a previous bug.
Previous Post: https://lemmy.world/post/15639946
Currently, the /hub where the /hub-events is embedded to, doesn't have the updated /hub-events page.
I've updated the code in the /hub-events last July 25. But currently, the change to it isn't reflected on the embedded /hub-events on the /hub at the Events tab.
Last time, it updated itself after a few minutes, but now two days have passed it hasn't updated yet.
Not sure when this problem happened, but if you take a look at https://perchance.org/a-testing-gen which has an embedded Perchance page to https://perchance.org/b-testing-gen, the changes on the embedded generator /b-testing-gen, isn't applied on the iframe on /a-testing-gen.
I've tried disabling the cache on DevTools, reloaded both gens (and saved them again) and the changes on /b-testing-gen isn't applied on the /a-testing-gen.
HTML tables with the Perchance Syntax! With Header Rows, Footer, Caption, and First Column Header Options!
![Improved Make Table Plugin](https://lemmy.world/pictrs/image/6cf67939-e0f9-4866-a7f7-45330b446de9.webp?format=webp&thumbnail=256)
Improved Make Table Plugin
This is a modification of the make-table-plugin with added features:
- Row Heights (option to change heights of each row)
- Row Alignments (option to change the alignment of the text in the row)
- Header Rows (makes the first row of the table bold, and an option to stylize it)
- Footer Rows (last row bold, and option to stylize it)
- Column Header (bold first column of the table, and option to stylize it)
- Caption (adds a Caption to the table, with option to place it at the top, and at the bottom, and to stylize it).
Here is an example of a table that can be made from it: !
I've also created a Helper to help create tables with the plugin at Improved Make Table Plugin Helper.
Suppose we have the following list: ```plaintext createInstance = {import:create-instance-plugin}
person
name = [this.nameList]
nameList
Salman
Manny
Rhian
age = {31-49}
child = [this.child_obj]
child_obj
name = [this.nameList]
nameList
Anne
Arram
Amelia
age = {3-17}
If we output:
text
[p = createInstance(person, "deep"), p.name] [p.age] [p.name] [p.age]
We can see that it has fixed the `name` and the `age` property on the instance. However, if we output:
text
[p = createInstance(person, "deep"), p.child.name] [p.child.age] [p.child.name] [p.child.age]
It would throw `undefined`. Now looking at similar list:
text
person
name = {Salman|Manny|Rhian}
age = {31-49}
child = [this.child_obj]
child_obj
name = {Anne|Arram|Amelia}
age = {3-17}
output [p = createInstance(person, "deep"), p.child.name] [p.child.age] [p.child.name] [p.child.age] ``` This would have the values fixed and working.
Looking at the code of the create-instance-plugin
, it would only allow the 'deep' fixing of properties if there isn't any items/lists in it. What that means is the following:
text child_obj name = [this.nameList] nameList Anne Arram Amelia age = {3-17}
This object/list, has a list ( nameList
) within it as well as properties (name
and age
), while:
text child_obj name = {Anne|Arram|Amelia} age = {3-17}
Only has properties. and based on Line 22
of the create-instance-plugin
:
js ... } else if(propValue.getPropertyKeys && propValue.getPropertyKeys.length > 0 && propValue.getLength === 0) { ...
If the list to be fixed has a list within it other than the properties i.e. propValue.getLength
is not zero, then it wouldn't fix the properties within it.
The first child_obj
has a nameList
with it, and upon calling propValue.getLength
it would have 1
while the second child_obj
will return a propValue.getLength
of 0
since it doesn't have any lists.
Thus, the solution for the problem is just removing the propValue.getLength === 0
check OR create another check without it.
---
TLDR; propValue.getLength === 0
at Line 22
of the create-instance-plugin can be removed to allow properties that rely on same level lists to be fixed. Here is the demo of the problem with a 'remixed' create instance plugin with the fix.
I've been made aware that the code I've written to access text-to-speech from ElevenLabs API is no longer working.
I've tested it and it seems that the CORS-Proxy that is being used in ai-character-chat
currently doens't allow POST
methods (which is being used to 'post' the text to be 'spoken' in ElevenLabs).
Not a major/priority issue but might be nice to be fixed. I also wonder how many are using text to speech (even just using the Speech Synthesis code) in the ai-character-chat
....
Found out about this possible improvement to the URL Params Plugin in which you currently cannot pass through URL params in the null.perchance
domain in an <iframe>
i.e. it doesn't parse the passed through parameters.
I was able to pass through parameters in an iframe in the normal perchance
domain, but without the null
part, it has the navigation bar and seems to mess up the CSS. I'm currently applying it to 'navigate' from the 'Home' tab of the hub to the 'Events' tab, then select the appropriate events page using the URL params.
cross-posted from: https://lemmy.world/post/14744285
> I've mentioned this on another post, but I'll create a new thread to hear other opinions. > > I'm proposing to have the Community Events on Perchance Hub be hosted on this Lemmy Community. > > To accomplish this, the Forms tab on the Perchance Hub would be changed to Events tab. It would host the Event posts from this community. > > That is, anyone can post an Event thread here and it would be mirrored on the Perchance Hub. > > Technical Notes: The posts here would be retrieved (via the Lemmy API) and the posts would be filtered to events only. The Event posts will then be parsed and neatly displayed on the Perchance Hub. This would mean that the posts would have a template to follow. > > This is so that anyone is welcome to create Events and those Event makers would be the ones who will manage their own events (no longer needing to wait the Perchance Hub update). > > This way, there could be different events running, managed by different people, with different topics, event types, and limitations/rules and to update the details on the Perchance Hub, the event creators can just edit the event posts and it would reflect on the Hub. > > Not yet sure about what details would be on the Perchance Hub. But something like @BluePower's Upcoming Events Page might be a good format/structure to remix with (although the comments plugin on each event on Perchance Hub might not be used since the Event Post already have a comments/thread to talk with). > > Technical Notes: The mirrored details can probably include a cover image, ability for the creators to change the colors on the Hub, specify if it is an 'image' event, 'generator/page' based event, etc., so the formatting on the Hub would be nice. > > In Summary: > - Community Events will be hosted in https://lemmy.world/c/casual_perchance > - Events are now hosted/managed by Event Creators > - The posts would have a (somewhat strict) template to nicely structure them on the mirror on the Perchance Hub. > - Events can simultaneously ran by different people, with different topics, event types, limitations or rules. > - Events can be updated by the Event Creator > - Event Details and Content / Template Format is not yet decided > - Format in the Perchance Hub is not yet designed. > > Additional Notes: > - With this, I might remove the 'announcement modal' on the hub upon first visit (or when there is update to it) to remove the clutter. > - Might also implement a dark mode to the Hub. (will require quite an overhaul on the hub page) > - Might dynamically add the Event's banner on the Home Page for each event (with the most recent and about to end event on the top). > - I currently do not have a stable internet so these changes might take a while to implement xD
I've mentioned this on another post, but I'll create a new thread to hear other opinions.
I'm proposing to have the Community Events on Perchance Hub be hosted on this Lemmy Community.
To accomplish this, the Forms tab on the Perchance Hub would be changed to Events tab. It would host the Event posts from this community.
That is, anyone can post an Event thread here and it would be mirrored on the Perchance Hub. > Technical Notes: The posts here would be retrieved (via the Lemmy API) and the posts would be filtered to events only. The Event posts will then be parsed and neatly displayed on the Perchance Hub. This would mean that the posts would have a template to follow.
This is so that anyone is welcome to create Events and those Event makers would be the ones who will manage their own events (no longer needing to wait the Perchance Hub update).
This way, there could be different events running, managed by different people, with different topics, event types, and limitations/rules and to update the details on the Perchance Hub, the event creators can just edit the event posts and it would reflect on the Hub.
Not yet sure about what details would be on the Perchance Hub. But something like @BluePower's Upcoming Events Page might be a good format/structure to remix with (although the comments plugin on each event on Perchance Hub might not be used since the Event Post already have a comments/thread to talk with). > Technical Notes: The mirrored details can probably include a cover image, ability for the creators to change the colors on the Hub, specify if it is an 'image' event, 'generator/page' based event, etc., so the formatting on the Hub would be nice.
In Summary:
- Community Events will be hosted in https://lemmy.world/c/casual_perchance
- Events are now hosted/managed by Event Creators
- The posts would have a (somewhat strict) template to nicely structure them on the mirror on the Perchance Hub.
- Events can simultaneously ran by different people, with different topics, event types, limitations or rules.
- Events can be updated by the Event Creator
- Event Details and Content / Template Format is not yet decided
- Format in the Perchance Hub is not yet designed.
Additional Notes:
- With this, I might remove the 'announcement modal' on the hub upon first visit (or when there is update to it) to remove the clutter.
- Might also implement a dark mode to the Hub. (will require quite an overhaul on the hub page)
- Might dynamically add the Event's banner on the Home Page for each event (with the most recent and about to end event on the top).
- I currently do not have a stable internet so these changes might take a while to implement xD
Here is my attempt on modifying the tabs-plugin
to allow 'Nested' Tabs.
Link to the Modified Plugin.
Demo Generator using the modified plugin.
> This was made to address the problem of SynthAce (asked at the Perchance Hub - Learn Tab)
Technical Notes
-
I have reverted the 'minified'
window.Tabs
function to the un-minified to learn more about how the function works. > The code is originally from Zoltantothcom's Vanilla JavaScript Tabs Project -
On the
let titles
code, I have removed theonclick
on the<li>
elements as removing them didn't have any impact on the plugin. I have also added a dataset attributetablist
on the<a>
elements inside the<li>
elements which will be thetabListKey
(this is important to only reset the current tab's list and not all the tabs). -
On the
let contents
code, I've also renamed thedata-belongs-to-tab-list
to justdata-tablist
. -
On the main div with class
tabs-plugin
, I've also added thedata-tablist
to specify which tab has which key. -
On the reverted
Tabs
function, I've added atabList
variable which is taken from the tab list key of the main tab element. -
I've modified the
reset
function to pass through the tab list key to only reset the tab with the same keys, preventing resetting of the other tabs. It uses thequerySelectorAll
and selects only the items with the specified tab list key. -
I've also modified the
onClick
function to pass through the tab list key to only update ( and reset ) the specified tab. Since previously it would update all tabs which causes problems in nested tabs.
@perchance@lemmy.world - pinging dev :)
Here is my implementation of 'remembering' the resized size of the textarea
inputs. It is using the ResizeObserver
(documentation) and will only observe textarea
elements with resize
style property enabled.
It is enabled with the @inputs
:
[remember(root, "@inputs")]
EDIT: It would only save the resized size if you have inputs on the textarea.
EDIT 2: Fixed width responsiveness (for elements with width: 100%; max-width: ... ; resize: vertical
where if the width gets lower than its maxed, it would save the width and fix the size without option to resize it back (since it is only resize: vertical
). It now only saves the resizable direction i.e. height if resize is vertical
and vice versa. For both
or normal textarea
it would save both width and height.
Here is the modified plugin: https://perchance.org/t2w8fixecn
Here is an example of it: https://perchance.org/5tfbmi0gtc
Due to the number of similar questions about the AI tools, here is a compiled list of frequently asked questions about the AI tools in Perchance.
Perchance AI FAQ
Please read it carefully and if you have any questions that isn't mentioned there, you can comment here.
On the ai-text-plugin
, there is a way to get the inputs that were sent to the AI using the onStart(data)
function:
> onStart(data)
- the code you put in this will run at the start of the generation process. You can access the inputs being used with data.inputs.instruction
, data.inputs.startWith
, etc.
I am wondering if we could also get the same for the text-to-image-plugin
?
It can be either on the onStart(data)
or on the onFinish(data)
in which we can get the inputs/static values that were used for the response of the AI e.g. data.inputs.prompt
, data.inputs.negativePrompt
, etc.
With this, some features that can be implemented is a local history of past generations, in which the previous inputs were temporarily stored in the storage (or on the local storage so even if the page reloaded, the history is saved), then the users can revisit the previous generations (I have set up something similar like this on my text to image generators but they have some hacks to work).
This is not really a priority but might be good to have. Thanks!
Posted from Reddit
https://www.reddit.com/r/perchance/comments/1ajj91l/false_positives_regarding_adblocker_still_an_issue/
Here is a guide to allow Ads on AI-powered generators in Perchance.
https://perchance.org/allow-ads-guide
Please note that not all steps there might work for you, we all have different Internet Providers and personalized settings. Otherwise, please post any problems encountered or other solutions you have found on enabling Ads on this thread.
> P.S. I'm not a Dev of the website
Perchance is now up!
Perchance is currently down
Jan 22
Happened about around 12PM UTC. As of 1:55PM UTC it is up.
Jan 31
Around 4:35 AM UTC, went down again. Up on 8:26 AM UTC.
Around 2:11 PM UTC, down again. Around 2:30 PM UTC, up again.
If you are importing a generator that imports a AI-Powered Plugin (i.e. ai-text-plugin
or text-to-image-plugin
or both).
Please note that it would add Advertisements in your generator, even if you aren't using the AI-Powered Plugin from the imported generator. This is due to the AI-Powered Plugins being sustained by advertisements.
>I'm having an issue with the Perchance AI Character Chat. When I try to export my data - threads and/or all data - it gets stuck on the "Exporting thread..." screen and then, finally, crashes the whole browser. Just two days ago I was still able to export my data just fine. > > Anybody have this same issue or, more importantly, know how to fix it? > > I'm running Ubuntu LTS 22.04, browser is Chromium 120.0.6099.71 (64-bit)
Posted by Kaarnikkainen on this Reddit Post.
I tested on a VirtualBox with same Ubuntu and Chromium Version, it seem to have exported successfully on my end (though I was able to just export a simple character and a couple of chat messages on the thread).
This is reported by Lamatiel on Discord.
Using the external lore file (lore book) doesn't properly get saved/used. The manual lore input works just fine.
Here are some fixes that I made in this copy of the page
- Line 7777 @ HTML Panel -
m.text
tom.text.split('\n').join('\n\n')
to have proper empty lines per lore entry on the textarea display. - Line 7783 @ HTML Panel -
e.text
toe.text.split('\n').join('\n\n')
, same reason as above, so even without reloading the URLs the formatting would be good. - Added
let newLoreBookEntries = result.loreBookUrlEntriesText.replace(/\r/g, "").split(/\n{2,}/).map(e => e.trim()).filter(e => e);
after Line 7790 @ HTML Panel to parse the lore from the lorebook URL files. - Added
newLoreEntries = newLoreEntries.concat(newLoreBookEntries)
to combine the lore from manual entry and lorebook URL entries, added after the previous line. - Line 7816 @ HTML Panel -
originalLoreEntriesText !== result.loreEntriesText
tooriginalLoreEntriesText !== newLoreEntries.join("\n\n")
, this would compare the new lore entries to the original one better since the old comparison only compares the manual lore entries.
Some notes:
- Upon saving the character after writing the lorebook URLs on the Character Edit, the lore doesn't apply immediately. We need to go to
/lore
, show the character specific lore, then reload the URLs, then save, for the lorebook URLs to apply. - Removing the lorebook URLs doesn't remove the lore from that URL from the current lore list, we need to manually remove it.
There seems to be a bug with creating a consumable list, then using .evaluateItem
from it doesn't consume the item.
Demo: ``` items a b c
output $output = [this.getRawListText.split('\n').slice(2).join('\n')] A: [x = items.consumableList, ''] [x.evaluateItem] [x.evaluateItem] [x.evaluateItem] [x.evaluateItem]<br> B: [x = items.consumableList, ''] [x] [x] [x] [x]<br> C: [x = items.consumableList, ''] [x.selectOne] [x.selectOne] [x.selectOne] [x.selectOne] ```
A
doesn't workB
andC
Works
I think it is because .evaluateItem
essentially converts the consumable list to text, which will not consume it, although it should do a .selectOne
(a reference post) behind the scenes which should consume from the list, but it is not working.
![VioneT](https://lemmy.world/pictrs/image/1a6bfb01-d7bb-4b30-a85b-ca12d89bedaa.jpeg?format=webp&thumbnail=64)
Doing Perchance.org things...
Links
- Perchance: vionet20-gens
- Mastodon: VioneT20@mastodon.social
- Reddit: /u/VioneT20