Default value on page load?

https://lemmy.world/post/10925684

Default value on page load? - Lemmy.World

There was a recent thread that has been deleted titled: [allogen] just the most genericest generator ever This generator had a nice feature to apply artists to the t2i plugin… but it had a LOT of external stuff going on plus performance-killing full-size page background images… as well as a lot of extra code and styles that I don’t really need. I know @[email protected] [https://lemmy.world/u/VioneT] commented on it. Based on that gen, I figured it would be handy to have an artist plugin… so I made one called “artist-plugin” so I could import it into t21 generators. https://perchance.org/artist-plugin [https://perchance.org/artist-plugin] Now I’m working on a demo generator using this plugin, and I’m 99.9% happy with it so far. I’m still doing minor tweaks to make it even cleaner. It’s VERY basic: https://perchance.org/aa3den2ecy [https://perchance.org/aa3den2ecy] Everything is working perfectly EXCEPT: When the page first loads, the artist that displays is NOT being used for the initial images that are displayed (because it’s random from the plugin). Clicking on the buttons (Artist name buttons or random Artist button) works as intended, and then everything is fine until the next page reload. If you click the “Update Images” button BEFORE choosing an artist, everything is random and the artist title is not related to the images. How can I get the Artist correct (in the heading AND in the prompts) on the first page load? Init? Store a variable? I’m sure I’m missing something silly and simple. Thanx for any help!

I updated the fork of the original one on this generator. I switched the artist list to the importable one.

I suggest messaging @[email protected] if they ever have any updates to the Artist list or if they need any help in pre-processing their list.

ps. that generator is also on the learn-perchance-plugins-text-to-image page.

S5cr957jem ― Perchance Generator

Thanks! In the plugin, there has been one update to the artists already since I first checked @[email protected] 's original generator. I also fixed case and sort for the artist names in the plugin (and added a few artists), and will maintain that in the plugin to avoid having to include .titleCase in the generator code.
@Alllo - Lemmy.World

https://perchance.org/beautiful-people [https://perchance.org/beautiful-people] come make some ai art :)

I’ve removed the copy button on each name and only have it on the top, next to the artist name.

If you have any ideas for prompts to generalize the artists style, i.e. currently it is only showing results for portraits, what if we had a sample prompt for a landscape, etc. for easy test of the artist’s style…

Pinging @[email protected] if you have any input on this.

@Alllo - Lemmy.World

https://perchance.org/beautiful-people [https://perchance.org/beautiful-people] come make some ai art :)

If you have any ideas for prompts to generalize the artists style, i.e. currently it is only showing results for portraits, what if we had a sample prompt for a landscape, etc. for easy test of the artist’s style…

Hmm… that might be tricky because the vast majority of the artists in the list primarily draw/paint people. I changed the prompt to “seascape” and only a few don’t include people. I spose you could add (people) to the negative prompt and see what happens.

A more ambitious project would be to have multiple subjects to choose from.

wow such team player VioneT. have you tried a prompt with nothing but “an image by the artist ____”? I can type that with Luis Royo and get Luis Royo images. can also type it with rossdraws and get rossdraws images. may allow what you seek? ty for curious question. i will also do something similar when i generate all my reference images if you don’t mind, thank you

Hi, so I’ve been superfocused on the android game im making and so im just doing the slightest anything here atm. you asked ideas so: also i cannot look at your generator because perchance is currently down.

The artist list on Allogen is about 85% of the artists that, according to another site, are available on StableDiffusion1.5 Will probably finish it tonight or tomorrow. Rarely do I have such free time, but probably tomorrow.

Though the artist list will be present in Allogen, my thoughts as to the artist reference is to have no moving parts at all. aka make a private generator that generates one image per artist and use it once. Gather all the generated images, scale them to be tiny, and host them myself somewhere. Then, over time, add an entry for each artist so a single button brings up the list of artists on allogen with an image example next to each ~so my users can just select which artists they want and don’t want while comparing.

and i cannot see your code but yes what isn’t working sounds simple and fixable. I encountered questions of how to have it load correctly at the start. If I remember correctly, I could not do anything about having it load instantly with a preset, so my code causes it to basically ignore the first automatic load, load the saved variables from local storage, then reload (right at the start). I do not know how to programmatically add perchance objects. Maybe adding the script part where it loads the variables above the script part including the perchance html would cause it to only load once. If I experiment with and come up with a solution I will say. Seems super easy to try some things just perchance is down atm

The artist list itself is so huge it seems unuseable until a quality artist reference comes up, and generating an image for each artist is not the way. cool idea on the random artists. Were I doing this like I am coding my characters in my game and, in general game things, I would have each artist be an object that includes detail such as their Era and Style so, for example, all artists matching a Style can be grouped.

thus thoughts. happy perchance down holiday

ping ping ping pings received.

i still have 349 artists to add.

let the images start initially, and then load your custom variables, and then re update() the images. It will look like they start having loaded correctly.

I have no reason to rush, though I would in exchange for your firstborn child, the tears of a mermaid, and three feathers from a hippogryph. On allogen, said artist list is actually so huge that it is unwieldy. And I am way deep in the android games I am making, so my focus is largely elsewhere except for occasional steps forward allogenwise. It may be that when I start tackling the structuring for my artist section to make it not unwieldy is when I come to the time to complete the list. I also occasionally socialize with unwitting nearby humans to lull them in to a false sense of security ~it’s during those times that I can casually do huge list things and would do the remaining 349 entries. Could be tomorrow. Could be 700 years from now. All just guesses. No idea. I see tho you two are using it, eyeing it’s takeability in to all perchance, and don’t want to manually do the 900+ entries yourselves. I appreciate the credit ty VioneT. Will say when there is something I should say. bai

beware the spaceyetis