Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)AD
AdComfortable1514 @lemmy.world
Posts 13
Comments 51
(NSFW) Getting "returned nothing" error for all my [] when using lists and don't know why. ( Plus some extra questions.)
  • 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.

  • [text-to-image] You can now upload your own dataset to the Fusion-gen + other features

    Feature 1: Add your own dataset

    You can now upload your own private dataset to the fusion gen using this template

    Ideally , you can try using AI chatbots to expand the code within a category that interests you.

    Feel free to share your dataset on the fusion discord page : https://discord.gg/dbkbhf8H2E

    //----//

    Feature 2 : Token search

    You can search tokens in the fusion generator.

    Search tokens example

    !

    !

    !

    !

    Words that sound similiar in English do not necessarily share similiarity in Stable Diffusion.

    Take for example

    "happyhalloween" and "happyeaster" and "happy"

    each correspond to completely different 1x768 vectors ,

    even though they sound like they would share some kind of similarity due to all having "happy" in their name, they don't.

    The words are just "labels" that are attributed to values in a big dictionary.

    The values ( 1x768 vectors) is what Stable diffusion uses , and these can be very different even though their "labels" sound similar .

    Bit difficult to demonstrate similarity between token vectors, but I plan to. See below for further info.

    So its good to search the list for any purpose :)!

    //---//

    Other stuff (feel free to skip this)

    Working on adding a feature to show % similarity between tokens in order to showcase this later on.

    TLDR; we use vector math to calculate cosine similarity between tokens.

    Its the angle between the vectors, the cos(theta) angle , which can have a value from 0 (perpendicular, no similarity) to 1 (parallell , same vector direction).

    Progress so far is that I've managed to extract the token vectors in the SD model.

    Out of the 7.5 GB original SD model , the 47K token vectors only make up 152 Mb ,

    which may actually be manageble to download when starting the fusion gen.

    !

    The sd15_tokens.pt is a ~47000 x 768 tensor ( a big list)

    so if I want the token vector for ID 1005 I can get it by writing sd15_tokens[1005] in python code

    Why go through this trouble?

    Thing is with this, you can search a token ID and then get 10 other tokens from the list with the greatest similarity.

    Which can be really useful. This will also play a role when auto-scaling weights for prompts, which I plan to add.

    Cuz you can get some amazing results by scaling sections of the prompt to weights in the 0.1-0.3 range. But its hard to do manually.

    0

    [AI chat] HuggingChat App

    Just found out Huggingface has an app with various chatbot models.

    !

    !

    Conversations are private:

    !

    Some models can do NSFW stuff.

    Hermes-2 is completely unfiltered as far as I can tell. Might be cool to add to the perchance website.

    Thought it was cool so I'd figure I share. .

    Link to huggingChat App : https://huggingface.co/chat/

    //-----//

    Also check out

    1000 Character prompts which you can try loading into the models: https://huggingface.co/codeShare/perchance-ai-chat/tree/main

    Ability to upload your own dataset to the fusion gen : https://lemmy.world/post/16703198

    I encorage people to use the AI models to build your own dataset of stuff for T2i generation , or for other purposes.

    TLDR: Give the AI model a code snippet , tell them to expand it, like "manga series from 2000-2020" or something

    You can use this template for this : https://perchance.org/template-fusion-generator-dataset

    If you have created a useful dataset for T2i generation , you can post it on the fusion gen page : https://discord.gg/dbkbhf8H2E

    Cheers

    0
    [Help] How to check if generator name exists
  • 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" )

  • [Help] How to check if generator name exists

    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?

    2
    Deleting images / galleries
  • 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.

  • [T2i] What are the rules of this game?
  • Thanks :) !

    1. Download the vocab.json and find some way to sample it : https://huggingface.co/runwayml/stable-diffusion-v1-5/raw/main/tokenizer/vocab.json

    Note that the vocab.json is badly configured for emoji symbols. They read as a garbled mess like ĮãĤĬãģŁãģĦ</w>

    Ignore those.

    Instead use emojis in prompt. Find some ways to sample these as well : https://perchance.org/fusion-t2i-emojis-2

    All unicode symbols (not required , but can be fun to see what weird stuff you can create with these symbols) : https://perchance.org/fusion-t2i-unicode-2

    You can try entering some words/emojis in this SD tokenizer , and you will see that they match the vocab.json list : https://sd-tokenizer.rocker.boo/

    1. Divide vocab.json list two categories:

    Suffix tokens = tokens that end with </w> , which represents whitespace. Like "banana " .

    Prefix tokens = tokens without whitespace. Like "post" used in words like "postapocaplypse " or "postman "

    Prefix tokens give properties to suffix tokens when placed in front of them.

    1. If you have a means to invoke random prefix- , suffix- and emoji- tokens you can now mix them to create crazy results

    I recommend using Notepad++ to sort the tokens.

    1. Follow the cross attention rule: "SD reads the prompt left to right , one token at a time, finding association from the previous token to the current token (and the inage rendered thus far)"

    You can try the -prefix . -suffix and the emoji-tokens out on the fusion generator if you like (I'm the dev) : https://perchance.org/fusion-ai-image-generator

    There are also other datasets there which you may find useful.

    There is a tutorial at the top, but its kinda wordy and haphazard.

    I recently wrote a guide on Fusion Generator Discord for NSFW stuff : https://discord.gg/j6qAX3MWub

    You can also find savefiles posted there with example prompts which can be loaded into the fusion-generator

    I don't want to present it as a "how to prompt" guide since there is no correct way to prompt things.

    It's more a way to show users that there are more options available to them , should they wish to use them.

  • [T2i] What are the rules of this game?

    Just a fun WTF result I got from a prompt recently

    images

    ! ! ! ! ! ! ! ! ! ! ! ! !

    3
    Generator in need for mods
  • 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.

  • [Request] Create a "Oops Something went wrong" page if a generator fails to load on Perchance

    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

    4

    [Help] Two-tier selection with dynamic imports

    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 :) !

    2

    [text-to-image] All unicode symbols for T2i generation

    Source : https://isthisthingon.org/unicode/allchars1.php

    This might be helpful for some people. A whole bunch of unicode symbols in one generator. I have yet to try them all in text-to-image generation

    Unicode generator (contains all items but not the "unicode-paired" emojis that exist on phone): https://perchance.org/fusion-t2i-unicode-2

    Emoji generator (contains some "unicode-paired" emojis , but not all as there seem to be trouble storing them in a perchance generator text-editor): https://perchance.org/fusion-t2i-emojis-2

    You can check how SD interprets the emojis here : https://sd-tokenizer.rocker.boo/

    0
    VTT Token Style Discussion
  • Virtual tabletop stuff

    isometric level roleplaying
    

    isometric knight character  reference sheet 
    

    birdseye view of a knight  from above 
    

    knight icon for tabletop game character 
    

    8bit knight sprite turnbased rpg 
    
  • How to create an MMORPG with the comments plugin as your database (using the new `onComment` feature)
  • 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.

  • How to create an MMORPG with the comments plugin as your database (using the new `onComment` feature)
  • (And if @[email protected] 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)

  • How to create an MMORPG with the comments plugin as your database (using the new `onComment` feature)
  • 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.

  • How to implement Adcoms Tokens
  • Will try to give tips on usage to Beautiful People via Discord DM:s instead of here.

    Discord link to 🔸✨📝🔰🔹 Fusion AI Image generator page : https://discord.gg/hSvEe5QK

    Perchance discord server : https://discord.gg/A3SWynpT

    For others who wish to use the token list in their generators , feel free to use the links below:

    For testing:

    You can test out the tokens in the 🔸✨📝🔰🔹 Fusion AI Image generator https://perchance.org/fusion-ai-image-generator.

    For example , by writing " #commonSuffix# " in the generator you get a token from the "Common Suffix" subset of tokens.

    You can write " #commonSuffix1# #commonSuffix2# .... #commonSuffix9# " to get up to 9 different tokens from the same dataset within a given prompt input field.

    Optionally , you can sample the dataset using the 🔀 button in the generator.

    Source for tokens : https://huggingface.co/openai/clip-vit-base-patch32/blob/main/vocab.json

    Generators:

    https://perchance.org/fusion-t2i-sd15-clip-tokens

    All 47K tokens split into prefix/suffix groups:

    https://perchance.org/fusion-t2i-sd15-clip-tokens-prefix

    https://perchance.org/fusion-t2i-sd15-clip-tokens-suffix

    All 47K tokens split into prefix/suffix and rarity in the training data (size of their ID number , where exotic == highest IDs):

    https://perchance.org/fusion-t2i-sd15-clip-tokens-common-prefix

    https://perchance.org/fusion-t2i-sd15-clip-tokens-average-prefix

    https://perchance.org/fusion-t2i-sd15-clip-tokens-rare-prefix

    https://perchance.org/fusion-t2i-sd15-clip-tokens-weird-prefix

    https://perchance.org/fusion-t2i-sd15-clip-tokens-exotic-prefix

    //----//

    https://perchance.org/fusion-t2i-sd15-clip-tokens-common-suffix

    https://perchance.org/fusion-t2i-sd15-clip-tokens-average-suffix

    https://perchance.org/fusion-t2i-sd15-clip-tokens-rare-suffix

    https://perchance.org/fusion-t2i-sd15-clip-tokens-weird-suffix

    https://perchance.org/fusion-t2i-sd15-clip-tokens-exotic-suffix

  • [Request] AI Image gallery features - Add comments section below images + other stuff

    Link to my generator : https://perchance.org/fusion-ai-image-generator

    Pinging dev since this is a request : @[email protected]

    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 :) !

    3

    [Help] dynamic-import for large datasets occasionally reads values as 'undefined'

    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?

    4

    [Request] Loading/Unloading imported datasets

    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?

    17

    Fusion Image Generator 🔸✨📝🔰🔹 (perchance t2i-generator)

    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.

    3