I'd say yes
Add a little code snippet that explicitly selects the model.
If a new update is coming "quite soon"
, then that could be several months from now.
And if the new update means
by default replacing the current (three?) SD 1.5 models
with a single SD 1.5 model.
Why not use all of them? As in older models + the new one , via this system?
//---//
So what I mean by this is;
In the next update ,
The new SD 1.5 model could be available by default
, and if user writes (model:::anime) , (model:::photo) or (model:::anthro)
, then it uses the "older" SD 1.5 models.
Yeah , I understand the situation.
I appreciate you telling me model selection is within the top categories on civitai.
I didn't know multiple models were being used.
Any chance you could allow a user to specify which model to generate with , to override switching models based on keywords?
Like for example writing (model:::Anime) in the prompt to use an anime model?
Added an EDIT , to give context to "results don't match".
//--//
Yeah , that sounds reasonable. Thanks for pinging the dev.
But however I look at it , the Perchance model can't be the Deliberate V2 model.
I just want the .safetensors file of the perchance SD1.5 model to be available online.
![the background blur](https://lemmy.world/pictrs/image/2b74ff6d-6147-4dce-8a9a-c85306cf30a3.jpeg?thumbnail=256&format=webp)
![](https://lemmy.world/pictrs/image/2b74ff6d-6147-4dce-8a9a-c85306cf30a3.jpeg?thumbnail=1024&format=webp)
Yes I know this was asked before: https://lemmy.world/post/8258092
And it seems back then the model used might have been SD1.5+Deliberate V2
Possibly this one : https://huggingface.co/XpucT/Deliberate/tree/main
But results don't match.
EDIT : By this I mean if run an image prompt for a given seed on any Deliberate model with settings that match the percance generator then I get very different results
It would be nice to have the perchance SD 1.5 model uploaded on huggingface so people can use it on other platforms and/or privately.
The perchance text-to-image generator is a really well-balanced SD 1.5 model!
I feel it would be good for the SD community to have it available for download online.
I'm not even going to adress your post.
I've heard this lingo before.
Godamn redditors trying to infiltrate the perchance forums.
There's no reasoning with this rhetoric
![the background blur](https://lemmy.world/pictrs/image/01d3b886-52c4-4843-9fdb-d103a95c4047.jpeg?thumbnail=256&format=webp)
![](https://lemmy.world/pictrs/image/01d3b886-52c4-4843-9fdb-d103a95c4047.jpeg?thumbnail=1024&format=webp)
Feed it an image, get the closest matching prompt out of a set of written alternatives.
Try it here: https://huggingface.co/spaces/pharmapsychotic/CLIP-Interrogator
Example
Input image from google
Result when running the output prompt on perchance text-to-image model
Source code for this version : https://github.com/pharmapsychotic/clip-interrogator
In this source code, here are the list of pre-made "prompt fragments" this module can spit out:
You can write any prompt fragments in a list, and the output will be the "closest matching result".
There are other online variants that use CLIP , but sample a different prompt library to find the "closest match" : https://imagetoprompt.com/tools/i2p
The difference between these two is just what "pre-written prompt fragments" they have choosen to match with the image. Both use the CLIP model.
What is it?
The CLIP model a part of the Stable Diffusion model , but it is a "standalone" thing that can be used for other stuff than just image generation
It would be nice to have the CLIP model available as a standalone thing on perchance.
The CLIP model : https://github.com/openai/CLIP/blob/main/CLIP.png
Practical use cases
Making for example a "fantasy character" image-to-prompt generator (note the order) by feeding it "fantasy prompt fragments" to match with
How does this work?
The CLIP model is where the "magic" happens.
Image below describes how CLIP is trained. It matches words with images in this kind-of-grid style format
The CLIP model can process an image , or a text , and both will generate a 1x768 vector that are "the same" .
That's the "magic".
How to make your own purpose-built CLIP interrogator on perchance (assuming this is a feature)
Tokenizer creates 77-token prompt chunk embedding from any kind of text ("the prompt")
CLIP processes a 77-token prompt chunk embedding into 1x768 text encoding
Image (any kind) becomes a 1x768 image encoding (this requires GPU resources).
Image encoding A and Text encoding B "match" are calculated using cosine similarity via the formula below
Where the final range from 1 to 0.
1 = 100% match between image A and text B encodings , and 0 = no match at all.
Do this for 1000 text encodings and pick the "text" that gives the highest cosine similarity.
That's it. Now you have a "prompt" from an image.
//---//
![the background blur](https://lemmy.world/pictrs/image/e042783f-a1c8-425a-b92d-020d56f3e659.jpeg?thumbnail=256&format=webp)
![](https://lemmy.world/pictrs/image/e042783f-a1c8-425a-b92d-020d56f3e659.jpeg?thumbnail=1024&format=webp)
A common feature in T2i generation is to skip the last and final layer (matrix calculation) in the CLIP text-encoding model
This will "distort" the text encoding slightly , which SD users have discovered works to their benefit when prompting with common english words like "banana", "car" , "anime", "woman", "tree" etc
Being able to select between a CLIP Skip 2 text encoder , and the default text-encoder will be an appreciated feature for perchance users.
For exotic tokens like emojis or other tokens with high ID in the vocab.json , the un-modified CLIP configuration (CLIP skip 1) is far superior.
But for "boring normal english word" prompts , CLIP skip 2 will often improve the output.
This code here shows how one can import a SD1.5 CLIP text encoder configured to CLIP skip 2
https://github.com/huggingface/diffusers/issues/3212
//---//
Sidenote: Personally , I'd love to see a split of the:
text prompt -> tokenizer -> embedding -> text-encoding -> image generation
pipeline into their separate modules on perchance
So instead of sending a text to the perchance server the user can send an embedding (many are available to be downloaded online) or a text+embedding mix.
, or a text encoding configured to either CLIP skip 1 or 2
to the perchance server and get an image back.
The CLIP model is unique in that it can create both text- and image-encodings. By checking cosine similarity between the text and image encodings you can generate a text prompt for any given input image, that when prompted , will generate "that kind of image".
Note that for either of these cases there wont be a text prompt for the image. The pipeline is a "one-way-process".
//---//
Main thing here to consider is adding a CLIP Skip 2 option, as I think a lot of "standard" text-to-image generators on perchance would benefit from having this option.
But the chatrooms still have to be visible to everyone though?
If not I feel that could open up all sorts of avenues for illegal activity
I've implemented that kind of system in my generator: https://perchance.org/fusion-ai-image-generator
I invoke it by letting the user write , for example ,
"photo of a #adjective# #name#"
and then prior before sending the prompt to the generator I run
"photo of a #adjective# #name#".replaceText("#adjective#", adjectives.selectOne).replaceText("#names#", name.selectOne)
to get the randomized string
//----//
In Stable Diffusion the "prompt" is not an "instruction" as in ai-chat.
The Stable Diffusion model never refers to the prompt when generating the image.
Instead, it converts the string to numbers and runs them through layers and layers of matrices.
Like a ball tumbling down aling the pins in a pachinko machine.
SD Prompting is very "psuedo-science" since nobody really knows what this kind of grid can and can't do with the "ball" you throw into it.
Since I'm building a randomizer around this , I've covered a lot of topics on this in the fusion discord: https://discord.gg/dbkbhf8H2E
//---//
Also;
NSFW topics are better asked at https://lemmy.world/c/casual_perchance.
Questions asked at this forum are better if written in a SFW context.
I see. Thanks! I can use this.
Since its async , I think what I'll do is use the code to make a wrapper function for the dynamic import plugin, something like :
myDynamicImportWrapper( "blahblah" , default = "template-fusion-generator-dataset" )
![the background blur](https://lemmy.world/pictrs/image/ef8588ef-fb97-4fec-ade0-0965e83e80bf.jpeg?thumbnail=256&format=webp)
![](https://lemmy.world/pictrs/image/ef8588ef-fb97-4fec-ade0-0965e83e80bf.jpeg?thumbnail=1024&format=webp)
Hello y'all,
Does anyone know how to check if a perchance generator name exists on perchance?
Context:
I've added a feature to allow users to load their own datasets into the fusion-gen. The code is above, but the feature itself looks like this:
I'd like to be able to check if the string matches a generator that exists on perchance. Does anyone know the name of that function?
Agree.
IMO The owner of a generator should be entitled to remove content from their image gallery
IDGAF about peoples NSFW preferences , but I've had occasional past experiences with users on my generator (fusion gen) who post content for the sake of harassment.
For example scat , geriatrics , bugs and gore , or just writing messages in the prompt. This happens rarely, thankfully.
But having the tools at hand to remove/hide such content would be good.
Those issues are entirely subjective.
Are you even part of the furry community?
This sounds a lot like the rhetoric of someone who is an outsider that seeks to stir the pot because a group offends them.
As long as they don't invade your space , don't make an effort to invade theirs.
There are tons of generators on Perchance , each with their own crowd of people.
There is no reason for you to use the furry-generator , unless that is what you are actually interested in.
What do you mean by "ill behaviour" exactly?
Are we talking people being abusive in the comments section?
Or is this more related to what people generate and post to the galleries?
I will do that. Big thanks for taking the time :) !
![the background blur](https://lemmy.world/pictrs/image/f9462297-2fdb-4bb0-9fb1-4f1e9cf06942.jpeg?thumbnail=256&format=webp)
![](https://lemmy.world/pictrs/image/f9462297-2fdb-4bb0-9fb1-4f1e9cf06942.jpeg?thumbnail=1024&format=webp)
For me , whenever I load datasets into the Fusion Generator I have to be mindful on how many items I load into the generator upon start.
If I load too much data , or do something crazy with the HTML , then there is a risk some users ( like those who browse perchance on older phones ) will not be able to access the generator page at all.
They will get a browser error message, and will not be able to access the generator at all to report the problem. They will be locked out forever , effectively.
So my suggestion is to have some kind of default "Oops something went wrong" page when loading generators on a perchance page.
The generator owner can customize the text written on the page. Maybe the image as well.
Importantly , they should be able to direct the user to somewhere (like a discord page) where they can report the problem.
TLDR : If the generator fails to load , show a link to a "Bug Report" page
![the background blur](https://lemmy.world/pictrs/image/0300928c-3294-474f-b2ae-6db2046c0b87.jpeg?thumbnail=256&format=webp)
![](https://lemmy.world/pictrs/image/0300928c-3294-474f-b2ae-6db2046c0b87.jpeg?thumbnail=1024&format=webp)
So I'm testing out a new method for sampling prompts which I , at scale , would need to import via the dynamic imports plugin .
I want to use a two-tier selection process.
I select a random category like "Star Trek" and then within that category select "tags" that are associated with "Star Trek" (more info below).
This works for normal imports. But I'm wondering how to make this possible for dynamic imports.
I have no clue how to do this. I have no idea what is causing the error either.
Example here to showcase the problem (you can skip reading this post and just go here ):
Example-generator:
https://perchance.org/fusion-t2i-tv-series-perchance-example-1
Sub-generators with different methods :
https://perchance.org/fusion-t2i-tv-series-1
https://perchance.org/fusion-t2i-tv-series-2
Reason behind this:
I want to randomly select a category, for instance "Star Trek" . Then within that category, I have asked Bing Copilot , which is an AI chatbot that can browse the web , to generate "tags" that are associated with "Star Trek".
It looks like this in https://perchance.org/fusion-t2i-tv-series-2.
//-----//
Discord link to .json savefile for those who wish to test the prompts
Again , this works for normal imports.
But since I will likely be able to get a LOT of data out of Bing Copilot for stuff , I'd like some ideas/suggestions on how to make this work with dynamic imports.
No rush , but ideas are very welcome :) !
Cool! Added them to the fusion generator under the #celeb# wildcard : https://perchance.org/fusion-ai-image-generator
Link to sub-generator (Not dependent on your generator ): https://perchance.org/fusion-t2i-celebs-1
Cool!
Thanks! Yeah , this is great !
I'm thinking of creating some sort of space where people can share their generator settings with each other.
So for example , if Bob has configured the fusion generator to generate " frogs on a beach" or something , he can save the settings he used and upload them to a shared directory
Then Alice can download that savefile , load it into the generator and generate "frogs on a beach" on her device.
It would be nice to have an Image URL to go with every .json file , but I don't think I can do that since there is no way for me to moderate that properly.
//----//
Sidenote:
Been on a hiatus from the AI chat , but I'm thinking a similiar feature could be even more useful there.
E.g Instead of inventing a scenario , or inventing a character to chat with , I pick a json file from a public directory with a scenario and/or character and load it into the AI chat generator
Again; this would also be a good feature to use with an URL image.
So you browse a gallery , click an image of "a frog on a beach" with lots of upvotes , and the .json file is loaded into the AI chat and you can have a conversation with "a frog on a beach"
//-----//
Extra sidenote :
A "global" image gallery could be pretty cool.
So all perchance AI generators that upload to the folder "global" will all upload to to the same folder.
And if you click the image you get a link to the generator it was uploaded from.
Can be a cool discovery tool for users , and a way to encourage competition between generator creators.
(And if @perchance@lemmy.world is reading this , being able to add the .json save-file to the images in the image gallery would be helpful. Either within the EXIF metadata of the saved image png , or within a hidden "text field" that can store additional info apart from the text prompt, or something similiar)
Such a chat-feature would be really useful to me!
I just added a feature where users can save the generator prompt settings as a json file: https://perchance.org/fusion-ai-image-generator
So maybe copy-pasting the .json file could create a compact link or something.
Then another user clicks the link and it will load into the generator. IDK
Haven't added this new chat format yet. Open to ideas.
Question ; If I add this feature to my AI image generator https://perchance.org/fusion-ai-image-generator, and people choose to use NSFW backgrounds in chat , is that going to cause problems for site ad-monetization?
Also ; can we add a "comments" button to images posted in the AI image gallery?
Link to my generator : https://perchance.org/fusion-ai-image-generator
Pinging dev since this is a request : @perchance@lemmy.world
Hi ,
Here are some key points of mine with regards to possible improvements of the image gallery:
1. Comments on images
Users on my generator have suggested adding the feature to post comments to individual images in the image gallery.
So for instance; when browsing images in the AI image gallery , the user can press a comment 💬 button and post a public comment below the image.
similiar/ identical to the comments plugin: https://perchance.org/comments-plugin
I think comments below images is a great idea for community engagement!
2. Access already uploaded images
If possible , I'd like to be able to access images already uploaded to the generator through a function call.
For example :
" image_url = getImageURL( _id , 'public') "
, or
" list_of_Images = getImages ( 'public' ) "
That way I code my own image gallery , with a comments section below each image.
I understand such a feature might be tricky with regards to site-wide moderation and user privacy , but it's worth asking.
3. Image moderation by generator owner
It might be worth looking into ways for the owner of a generator to moderate their own image gallery , such as;
-
Deleting/hiding images from their gallery , which I believe the owner of a generator is entitled to do.
-
Marking SFW images in the gallery as NSFW , and vice versa , assuming this works with site-wide moderation.
-
Or move images from different folders , e.g instead of deleting images , I can move items from the "public" folder to a "nsfw" folder.
4. Changing image gallery folders
It would be nice to be able to change gallery folders on the generator with a button press , or a tabbed interface.
E.g I have "folder1" , "folder2" and the "public" gallery sections.
And when I press a button "change folder" the image gallery toggles between "public" , "folder1" and "folder2"
//----//
These are my suggestions of possible improvements to the perchance image gallery.
What are your thoughts on the perchance image gallery? Comment below with your own feedback on this topic :) !
![the background blur](https://lemmy.world/pictrs/image/fca59436-a74d-48f8-8e90-48cd1bf43c03.jpeg?thumbnail=256&format=webp)
![](https://lemmy.world/pictrs/image/fca59436-a74d-48f8-8e90-48cd1bf43c03.jpeg?thumbnail=1024&format=webp)
Hello , To experiment with the wonderful brand new dynamic-import-plugin I decided to try implementing this new feature on my generator for 164K first names of people , which you can find here .
The source of the names can be found here : https://github.com/Debdut/names.io
My goal here was to find a "good general solution" with the dynamic-import-plugin that I can implement for more important generators with larger datasets in the future.
The dynamic-import-plugin great improvement ; I can get access to the full list of names without long loading times. But I also have some new problems.
Question 1 (main issue)
I have this issue where the the imported values will occasionally read as 'undefined' when I import stuff. You can see it in the image above.
Here is what the sub-generator fusion-t2i-names-12 looks like :
What are the recommendations to solving this?
EDIT: Many names in this dataset contain non-standard letters , e.g different from A-Z. I am starting to suspect that might be the issue. In which case , should I just put [String("...")] over every name with non-standard letters or is there a better way?
Question 2 (secondary)
TLDR : "Am I coding this correctly?"
When I request 100 values at once from a loaded generator I initially get the "freeze" mentioned in the Dynamic Import Plugin Guide.
I'd like for an entire 10K dataset to be loaded when the generator opens . How do I do this?
Reading the code , my interpretation is that I am already doing this.
But it feels like I'm missing something here since I still get a significant "freeze" when requesting items after startup, hence the question.
Question 3 (non-essential)
In the fusion-t2i-names-12 I have this textfields where a user can press a button and get some some values for the dataset.
It would be nice to be able to display these values fusion-t2i-names-12 but I have no idea how to do this since the "_data" is placed in the $output field.
I don't want to copy paste _data as that would mean my 10K sub-set of words is now a 20K subset of words.
I assume that would impact the "main generator" if I did this and cause even more loading times.
But I'm not sure. I'm fine with copy-pasting as long as it won't affect the main generator. What should I do here?
![the background blur](https://lemmy.world/pictrs/image/51ab19bb-8529-43cc-bf79-38da22243163.jpeg?thumbnail=256&format=webp)
![](https://lemmy.world/pictrs/image/51ab19bb-8529-43cc-bf79-38da22243163.jpeg?thumbnail=1024&format=webp)
I have a image generator which samples a few fairly large datasets (around 10K words per category).
The user selects a dataset , from which a word is randomly selected.
As such , I only need to load the dataset which is currently selected.
I'd like for the other datasets to be un-loaded until the user selects them.
Is there a way to do this?
Or , can this problem be resolved by other means?
![the background blur](https://lemmy.world/pictrs/image/804e627a-d677-4393-9c6a-cee8f1005aa2.jpeg?thumbnail=256&format=webp)
![](https://lemmy.world/pictrs/image/804e627a-d677-4393-9c6a-cee8f1005aa2.jpeg?thumbnail=1024&format=webp)
Link to the generator : https://perchance.org/fusion-ai-image-generator
What is it?
A T2I generator to which I have added prompt switching + various other modes on both the prompt and the negatives.
Note the the public image gallery for this generator is NSFW
I have added sampling that can be enabled/disabled or appended to an existing prompt for every new generation.
I have yet to make the HTML for the generator which is why I am using the t2i-framework plugin for now.
The interface is confusing right now, but the generator is configured so that a user does not have to change any settings (apart from maybe the dataset used) to get things to work.
The big datasets includes the 47K CLIP tokens , 63K unique search words for the NSFW dataset (general category) , and randomized selection of 30K unique tags from danbooru sites from the sd-webui-tagcomplete extension.
Sampling
As in the normal image generator , you can press the dice 🎲 to get a number of tokens from the selected dataset.
As an additional feature , sampling of tokens can be done automatically by selecting the 🔀,✏️ modes at the bottom
CLIP token dataset
Sampling includes 47K CLIP tokens ordered by rarity (frequency by which these words appeared in the training data) and if they are a prefix-token or a suffix-token.
Suffix tokens have a trailing </w> symbol and are the "normal" tokens, e.g "car</w>" , "banana</w>" , "happy</w>".
Prefix tokens lack the the trailing </w> and will give new properties to existing tokens when placed next to them.
If you wish to invoke a single prefix token in the prompt you can write #prefix# , e.g "photo of a #prefix#banana" to see how this works. Tokens from other datasets can be invoked in a similiar manner.
The #prandom# sampling is done by pairing together a random prefix-token with a random suffix-token. This is useful for randomizing stuff.
✳️ Prepositions
Prepositions are stuff a user writes between things in a sentence.
Take the prompt "A photo of a cat on a table" and it becomes "photo cat table" without prepositions.
SD 1.5 was trained on interpreting stuff written as sentences , so adding some prepositions can sometimes be good.
Other times (for exotic tokens or for the #artnsfw# dataset) , the prepositions can make the image more boring.
You can set the % rate for which a preposition will be placed between sampled tokens.
Getting started
For new users: just write something in the Main 📝 field and hit generate.
Should things get too confusing/overwhelming you can open the generator in incognito-mode to get the default settings.
//----//
That's the TLDR of this generator that I made.
If you can ignore the confusing interface , you can have a lot of fun with it.
It works really well on mobile as you don't have to type anything. You can just hit "generate" and it will randomize automatically.
Current status / help
Currently I'm trying to get to grips with the tagcomplete #artnsfw# dataset , and the other datasets.
There is a problem where the generator will sometimes reload when on mobile.
I need also some more options for the ✨Base prompts.
Additionally , I'm thinking about changing the image gallery at some point.
Preferably to an option where users don't have to dump everything (NSFW and non-NSFW) into the "Public" folder in order to be visible, e.g have buttons that a user can click that will change the shown gallery.