#ad_discordbot (Fork of Fork of xNul's bot)
1 messages · Page 18 of 1
It looks scarier than it is
Just disable the guess imgmodel settings feature if you want to rely 100% on the base settings
but you won't be able to dynamically change model settings and tags depending on the model type
If you familiarize yourself with that settings handling, you can set up some very good things
then explain how do i trigger this
I've got dozens of SD15 and SDXL specific LORAs and such
when models change, it changes the LORA tags and everything
If you have 'xl' in the "filter" tag - it will score models higher that contain "xl" in the filename.
i started thinking that a command to send in discord with every tag will be useful, if im using bot for myself i may know, but if i let others use it has too much thing to let them know to start
If you have an "exclude" filter, it will also get scored higher if it is missing that from the filename
so that thing check the file name
When you change imgmodels, it gets the model name and compares it against the presets
The preset that scores highest is used
this also works with the auto-change imgmodel task, too
ill try to understand them first
If you put your XL models and 15 models into subfolders like /sdxl/ etc - those actually get merged into the filename
So you could more easily manage your filters that way
actually I was wrong about that last bit
filter: ['xl']
exclude: ['turbo']
exact_match: ''
payload:
width: 1024
height: 1024
tags:
- tag_preset_name: SDXL Tags```
this makes that if i mave a model with xl in the file name generate 1024x1024 imgs and also i can add in payload steps?
there is a tag to censor sd is there another for llm?
also i consider a bug that after using draw it replies to itself this could be a feature though
also got these 22:48:11.866 #5328 ERROR [bot.__main__]: Error merging selected imgmodel data with base imgmodel data: 'payload' 22:48:11.950 #5372 ERROR [bot.__main__]: Error updating settings with the selected imgmodel data: 'width'
false alarm
from my understanding this should work but doesnt
filter: ['xl']
exclude: ['turbo']
exact_match: ''
payload:
width: 1080
height: 1440
steps: 20
sampler_name: "Euler a"
scheduler: karras
tags:
- tag_preset_name: SDXL Tags```
keep getting this
23:04:34.030 #5328 ERROR [bot.__main__]: Error merging selected imgmodel data with base imgmodel data: 'payload'
23:04:34.116 #5372 ERROR [bot.__main__]: Error updating settings with the selected imgmodel data: 'width'```
sd running from different computer
Did you move / rename your image models - and then NOT re-launch your SD client?
The SD clients do not collect refreshed list of image models on demand… likely because A1111 coded it that way then everyone forked and didn’t tweak it
I just tested, changing one of my imgmodel names w/o relaunching SD, and it is also erroring same place
Ok I see why the subsequent errors are occuring too
I can improve the error handling here
the file is not found just because is not in that computer i think
The SD client thinks it is there
otherwise, the model would not appear in the models list (assuming you are using /imgmodel command or auto-change imgmodels)
the model did change though
The bot said that the model changed, but if you look at the SD cmd window I believe you will see this error:
ERROR [WinError 3] El sistema no puede encontrar la ruta especificada: 'D:\\stable-diffusion-webui\\models\\Stable-diffusion\\AniXL-tPonynai3_v6.safetensors'
bot says that model did change in discord chat
terminal gives the error
by generating a image, the model did change
Yes like I said, the bot isn't handling the error well
But the error isn't due to the bot, it's because SD is dumb and only collects the model list on startup
or if you explicitly click the Refresh Checkpoints button in the UI
yeah but i didnt change the name or delete file
If you close SD and launch it again, I don't think you'll get an error
still that error
with [[]] tag i could change the steps but everything i ve writteng didnt take effect
updated the bot semi recently?
updated for the tts
Did the SD terminal have same error?
Are you using the "Per server imgmodels" feature?
sd got no errors
if the default is true
Nah it’s disabled by default
Disable the guess imgmodel settings feature in dict imgmodels
that didnt work
change the steps
You also need to change imgmodels after changing the setting
When you do things like change characters, change imgmodel - it retains those settings internally and continues applying them until you change them via the bot functions
Such as /imgmodel command
In this case the Tags preset it still in effect
After disabling the setting - and changing imgmodel - it will not add a tags preset to internal settings
What SD client are you using?
a1111
Did you browse to the file path that it showed in error, and was it exact same path?
path is correct but it is on different computer
im using my laptop the bot
and my pc for sd
We may be getting somewhere
The bot tries to read the file to get its filesize and compare that to the presets. I need to add an exception for if it fails
Code currently assumes bot, SD and TGWUI are all on same rig
[[]] is very good but /image cant use tags ;-;
:O
:P
I just pushed it - try updating, and also turning the "guess model" feature back on
It should now print a warning one time when it fails to read the file.
Then, only use the other scoring methods for matching preset
I'll need to go through my code when I have some time and check if anything else could fail when using SD remotely
It's possible this is the only thing, though
working
Thanks for bearing with me on this
You should also try the post active settings feature - by enabling it and setting a dedicated channel via /set_server_settings_channel
what does it do?
ohhh
you have do deal with the design
single colored text is 😵💫
i suppose that if i use edit history the changes aplies to the bot
Yes
this is not working very well
the file name is RLTurbo_dreamshaper but gets the sd15 settings
exclude turbo from the first preset
Or, move the turbo preset above the other one. When there is a tied score the higher one is prioritized
You could also use exact match if necessary
where are setting for like who can use commands
like /image its fine but i dont want other to change the model
i only saw setting to disable dm
Discord server settings > Integrations
nice
The settings for DM commands are the only commands that can be used in DM
except bot owner can use any cmd in DM
They’re disabled by the bot for users by default
how do i remove voice channel?
Each server can only have one dedicated voice channel. I don’t have a means to remove it currently once set, but you can either change the play mode setting (config.yaml) or /toggle_tts to disable tts temporarily altogether
I’ll soon add an option to the /set_server_voice_channel command to clear the current value
You should strongly consider trying Forge or Reforge instead of A1111
I’ll recommend Swarm as well once I finish adding support for it in the bot 🤗
A1111 is significantly slower and will OOM before the other UIs
slower?
whats oom
out of maintenance?
i dont update a1111 very frequently
3month+
Out of memory
Yes A1111 will generate images slower than Forge or Reforge with same settings and same result
While using more Vram
:O
Reforge is more stable of the two but development is likely ended for it
Forge needs some new settings to use it via API which I added to the bot recently
forge is like a addon for a1111 so i can use it like always?
you are more of a forge user than reforge?
I just switched to Forge full time after making it work with the bot
I was using Reforge for API only
They are similar interface to A1111 but with many differences on the backend
Quick history lesson:
- Illyasviel released Forge awhile back. It was very good, however he then disappeared and no one could merge PRs or develop it further.
- Someone 5 months later decided to fork it as Reforge, then update it to include A1111 updates
- Illyasviel came back to Forge and flipped it upsidedown, made it compatible with Flux, appointed some other co-devs (including the Reforge guy) to ensure the project development no longer stagnates
After making it work with Flux development has mainly been fixing the resulting bugs
Forge is also using Gradio 4, there are a number of extensions which have some bugs due to incompatiblity
D:
I have an extension which I was able to update - other devs did the same or some other ambitious users are forking / making Forge compatible versions
They have a Discussions thread on it in the github
You should check it out btw
Auto-merging scripts/postprocessing_codeformer.py
CONFLICT (content): Merge conflict in scripts/postprocessing_codeformer.py
Auto-merging scripts/postprocessing_gfpgan.py
CONFLICT (content): Merge conflict in scripts/postprocessing_gfpgan.py
Auto-merging scripts/xyz_grid.py
Auto-merging style.css
CONFLICT (content): Merge conflict in style.css
Automatic merge failed; fix conflicts and then commit the result.``` 🥲
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.```
What is this from?
Did you try a fresh install of Forge, and are getting this error?
You'll definitely need to have two separate installations
Forge has settings to specify your checkpoints folder, etc (can be shared).
Personally I use symlinks
I have these symlinked from my A1111 folder
how do i do that
Awhile back I asked ChatGPT to make me a bat file that could do it via drag and drop
- put the bat file somewhere
- make a shortcut to it somewhere like your desktop
- right click the shortcut > Properties > Advanced > Check off
Run as Administrator - Now you may drag-drop a file or a folder onto the shortcut, and it will prompt for the destination path
So you might drop your extensions folder onto it and enter something like
C:\0_SD\stable-diffusion-webui-forge\extensions
:O
some how i have 2 sd running in the same port xd
192 and 127 are different :P
what are these?
uhhh if i launch forge with --api it crashes my fav extensions...
most extensions .-.
it is a lot faster though
These are quick settings presets for the entire UI (cfg, steps, dimensions, etc)
allows easily changing all your UI settings in a flash, when changing base model types
llama 3.2 🤩 im excited to use it in tgwui
🤩
Need to make sure there is a text_encoders subdirectory in the models folder (if you symlinked it from A1111)
Otherwise, I’d be interested in knowing the error in Forge console
If you are getting out of memory error, then you may need to include a new forge specific param in dict_basesettings (check settings templates), it’s commented
May need to guess and check the value for it
forge_inference_memory
oh
got that folder from github
but there no files in it
idk if there has to be something
i did the symlink of model and output and
modified the user bat
set COMMANDLINE_ARGS= --port 7862 --listen --api
set CUDA_VISIBLE_DEVICES=1
i just cant figure why everything goes wrong with --api
this appeard when i accessed the link with chrome
is the url + port correct in the bot's config.yaml?
bot literally printed this in the console
Enter this in your chrome
http://192.168.1.11:7862/docs
Let me know if you get the API interface
If you scroll down to the cmd-flags endpoint and test it - does it error?
?
In the chrome API page
You can click on an endpoint to expand it, then “try it out”
If below it says response code 200 then it was successful
yes the bot uses that endpoint to collect all the model data
It uses cmd-flags endpoint on startup only to read one of the values to determine which SD WebUI is being used
so actually does not matter?
well the bot will automatically fix certain things depending on what UI is being used
I just updated and I'm not getting the error
maybe you have some kind of firewall issue?
a1111 had no issue
network security setting etc
my local machine also cant
You may have set some "Allow" permission for A1111 explicitly, or something
or maybe the url/port is slightly different from A1111?
(if that specific port were "allowed")
it was the port
but just the flag
Running on local URL: http://0.0.0.0:7862``` literally same but automatic
let me cry a few secs
resolved then? 😛
it says that im using a1111
It determines it based on what the installation folder ends with
If your installation folder ends with -forge then it will acknowledge that Forge is running
such as stable-diffusion-webui-forge
Actually I was slightly wrong here is exactly how it determines the UI
the one click install pack does not have -forge at then end :v
Did you modify the directory name? Or is it same as default?
If default please share the directory name verbatim
this is the one click install pack, well its 4 but its really simple
up one level
o the 7zip
of
imo more people would install trough the pack
the github page
I'll rework the logic a little bit...
now that i gave it another thought, people may change the name so it is prettier or smth
now it just looks for any instance of "reforge" anywhere in the string, then checks if "forge" is anywhere in the string, etc
changed the order it checks so that "Reforge" won't accidentally be matched to "Forge"
@valid crypt tried it yet?
when said that i just cleaned the mess and renamed the folder :P
I don't know if any internal settings are populated with the directory name when you initially install it
I recommend reverting back to the forge directory name you had, for that reason
error! :D
that fine right?
if its fine consider changing it to warn and i suggest warn in orange
red is too scary
While resolving this had to merge in some WIP code I’ve been working on the backburner
Will see what I can do about that
Yeah it’s expected, for now
buddy
you know that you have a filter for sd right?
that doesnt apply to /image
😱
You likely need to change tags search mode to user llm
do that really work with /image...
i think it didnt work
added the settings, reloaded bot, character, imgmodel still dont work
Clarify what you’re talking about please
more than a bug it more like a suggestion
that does not apply to /image
and also it does not delete the message
the bot still tell the prompt
the image is not generated but like always there is a description of the image, so that is what im refering to
Do you have 2 separate tags with img_censoring ? If so, the first one may be getting will be prioritized if both are "matched"
it is about the llm sending the description
i say draw p**n
bot: i drew a n**ed woman
sd:
It's not drawing the image though, yes?
affirmative
not drawing but saying inappropriate stuffs
I'll update this just need to think about the best way to handle this one
so this could be a suggestion: censor for llm
from my understanding if the user does not say any inappropriate words, llm mostly dont, so tags for censorship?
same for sd, for llm
Please confirm... it's not sending a message with the problematic prompt, and also not drawing the image, when using /image command, correct?
It's only the tag activated prompt that is still presented in chat
the command ignores the censor
That's interesting...
to clarify
using draw --> problematic reply but sd blocked
using /image --> simply gives the image
does it say anything in the CMD window about prompt being flagged?
you could reproduce this "bug" though
let me do manual censor
ship
saf
e
😁
Trying to reproduce it
Ok big bug in /image - idk how I missed this but it isn't matching tags at all
You are an amazing user btw, you've found a lot of bugs - I'm very thankful
I got the /image command squared up, tags all working correctly again.
I'll be adding another censoring tag for LLM.
😳
oh no edge tts disappeared https://github.com/Unorthodox-oddball/text-generation-webui-edge-tts
yikes
it was a amazin extension 😔
Did you fork it to send that PR? Still have the fork?
i have it 😁
You are new edge dev 🤓
bruh
Share fork link bc I want to link it from my repo
i just wanted to ask if it is ethical to publish the fork :v
wait no
i dont have the fork
i have the files :O
Ah
Well you could just publish it, only difference is it won’t say “Fork of (link to a 404 page)”
?
If the original edge TTS project exists maybe just fork that
Then replace the files
Could just go one by one delete everything but the readme
Then git push your files
uhh how do i delete...
found it :)
how do i change the name?
oh
if everything is alr then this should work https://github.com/marcos33998/edge_tts/tree/master
i hope tomorrow i dont receive a copyright warn, law suit and being bullied on twitter
ill test if it works tomorrow
should work...
Recommend naming it like the other one though- text-generation-webui-edge-tts
@valid crypt just pushed fix for everything
/imagetags are now working- Improved handling for censoring
- added
llm_censoringtag and example and updated Wiki - Suppress the SwarmUI warning on startup
Learned how to raise a custom Exception in the process 🤓
the code itself require edge_tts as its name
Derp
?
I shouldv'e known
check this https://github.com/oobabooga/text-generation-webui/commit/9ca0cd7749f734bd5e7083d672dee8d400229257 it is dev though
this means i should update the main script?
still trying to figure out how to stop the bot replying all channels asked before but at least it works
thanks
like creating a separated tgwui
?
i think there is no way to prevent bot from replying if you ping it, when you do /main it always reply
might be the name of the bots all being zero
need to fine tune a new llm 8b or 11b maybe
11b works on my cpu about the best i can do 9b might be good 11b can be slow 8b best so far
found a bug: /toggletts (didnt try to hear) toggles through multiple server but only the bot in the server that you use the command will connect/disconnect
example
i disable tts in server A, bot disconnect in server A but still in B
I enable tts in server B, the bot in server A does not reconnect
per_server_settings is false in config.yaml ?
using the default
I'll check out the code now - I may have accidentally changed it to always behave as if server specific settings
while it should disconnect from all servers if that feature is disabled
terminal says per server setting not found, applying defgault
right, default is false
using before this update
The toggle_tts behavior was changed a month or so ago
ok yes, I see the flaw in the logic
My bot is on one server atm
Could you test this change?
vc_guild_ids = [self.ictx.guild.id] if config.per_server_settings else [guild.id for guild in client.guilds]
for vc_guild_id in vc_guild_ids:
await voice_clients.toggle_voice_client(vc_guild_id, message)
in the function toggle_tts_task
- If 'per-server settings' is enabled, it will only toggle the voice client in the current guild.
- Otherwise, it will iterate over all guilds that the bot is in and toggle them
You overwrote this line 😛
if self.embeds.enabled('change'):
Condition will be true anyway
my eyes says pass
yep
Yes agreed- now when you toggle tts it should apply to all servers
If so, I push change 🤗
ugh
sorry
One thing I messed up
Change the one little snippet to this
if config.is_per_server()
my eyes says pass
worked :)
very cool - there's a number of discord values the bot actually doesn't hold which need to use a .fetch() method to get.
Thought for a sec guild ID could be one
Pushed - so just undo those changes and Pull
Lmk when you've had a chance to test the improved censoring features, if all seems good on your end
soon
first impression: working
second impression: hard to list every word and typo
going for the deep test
done
result: bot can bypass the censor
checking user✅
checking bot❌
user can make bot say those words
🧐
the word in the ban list, the forth one from the right
I'm working on it now
If you don't mind!
... could you just slap this code in and test it?
😁
elif key == 'llm_censoring' and value == True:
censor_text = tag.get('matched_trigger', '')
censor_message = f' (text match: {censor_text})'
log.info(f"[TAGS] Censoring: LLM response was blocked{censor_message if censor_text else ''}")
await self.embeds.send('img_send', "LLM response was flagged as inappropriate", "Further task processing has been cancelled.", delete_after=5)
raise TaskCensored
alr
wait
i take this as the correct answer
wait
huh
hold plz 🙂
yeah, forget adding that code... I need to add a similar check right before it sends the response
i tell you an idea later :V
I'll have to analyze the text as it's generating really (while determining whether to send response chunks)
before it could trigger TTS, etc
true
this is getting complicated hehe
which comment?
says tag for image censoring feature
just a little detail
or im blind
im not blind, its a little detail
dict_tags
right, the code is not going to be there in the image censoring block
either another block or make it image/llm
I need to make a special little tag matching function.
When I build the full list of tags, I'm going to add llm_censoring tags to a separate list, in order to quickly check the LLM's reply against them
So I think the logic should be to block the text string that contains the censored text? Rather than nuke the whole response?
As in, the response chunk
I can replace the text chunk with:
LLM response was flagged as inappropriate.
actually, may be easier to just nuke it after detecting lol
I'm mostly doing this for you so whichever logic you think makes the most sense, I will apply here
either one sounds good to me
i was think on another filter to replace swear words to "filtered"
this is pretty good for now
nuke
what im thinking is there is some words that are too dangerous so nuke
some like sh*t then replace
this amazing too
just custom text is better :)
this is a piece of sh-potato
text replacement can already happen for user prompt as well as LLM's response (except currently only when the LLM response is used for image prompt).
So I may just work in text replacement on all LLM responses as well... need to think on that.
imagine a server getting wiped because of a bot sending I love n(for my own security)z and also the audio
funny
😆
my edgetts is working >_<
🤩
Pushed int to main
It collects all "llm_censoring" tags to a separate variable.
Whenever text is chunked, or complete response is finished - it will do a quick check against those tag triggers.
If it finds a match, it nukes the process, send the embed and logs it
🥳
I’ll be updating it to only apply that logic for search mode “llm” (or “userllm”)
Aaaand that's done. Also noticed I had left a debug print statement now removed
👌
Zero
APP
— Today at 11:16 PM
@ZeroGroq pauses for input
User Input: Change Zero's reply_to_itself attribute from 0.5 to 1.0
the ai is telling me the issue it is a setting in one of the files i need to edit to stop it replying all channels?
If you don’t want the bot to talk in a channel you’ll need to use /main to toggle whether it replies to everything or only @ mentions
Or remove its join/ View permissions for those channels
reply_to_itself is the chance that it replies to its own message
hmm and i can do that using slash commands sir?
there is a file i edited changed this setting the ai is telling me the issue but i forgot where the file is: Change Zero's reply_to_itself attribute from 0.5 to 1.0
Its a “behavior” setting - can be defined in base settings and/or character card
If in character card will override base settings
See Minty for example usage
ok thank you 🙂
what about clone the repo and call it minty_discordbot
ad is 💀
pretty sure this is a bug
from my understanding the bot cant be reloaded unless i close it and reopen
but i left it there and yeah...
I’ve seen this before I think discord issues can cause this
They occasionally have hiccups in their service
the on_ready event can be triggered multiple times as the bot reconnects.
if you have code you only want to run once, create a separate on_ready function like on_first_ready
async def on_ready(bot..?):
if self.first_ready:
self.first_ready = False
await self.on_first_ready()
and ofc init self.first_ready somewhere in the bot
as you don't create your own bot class, any variable outside the bot should work.
But be careful with python's local scope variables.
first_ready = True
def test():
first_ready = False
test()
print(first_ready)```
should still yield `True`.... so this is a case where using a class will work best!
perhaps active_settings!
Ahh, you already got one!
i'll move the background task initialisations there because it could cause bugs having multiple copies of "process background task" going on at once
Well the first_run() was not actually made for initial bot launch - it was for first every deployment of the bot on machine - sends welcome message
I understand what you're saying though
oh okay,
will update my code ^^
i've added a context manager to wrap sending messages to channels.
that can replace the need to do try:catch for the 403 error if the bot has no access to a channel
Thank you for the contribution 
I made a lot of neat changes you should check out, like Embeds()
I think the way I did Settings() is pretty neat too
no img generating message after changing model
only the first request
Known issue. This is something that @terse folio might be able to fix... I've tried a number of times with ChatGPT but can't figure it out
It has something to do with this. The track_progress() task likes to go kaput.
In the past the original code to handle these processes would often result in the whole generation getting screwed
I settled on the progress bar sometimes disappearing as... good enough
This is a good observation though, I'll need to see if this happens as predictably as you suggest
I'll never be able to get away from NeuralBeagle14-7B I love the output from this model
Also, the "SDXL Ghost Style" LORA has very cool results https://civitai.com/models/169671?modelVersionId=190677
- trigger: 'ghost style,ghostly'
positive_prompt: 'GhostlyStyle, <lora:SDXLGhostStyle:1.0>'
cool
sd take the natural language response as prompt?
funny
NeuralBeagle is just great all around IMO, good for RP and good for image prompts
XL loras don’t work well with Pony and vice versa, also - idk what model you’re trying out
the progress bar thing? I think its a bit random
the model was drunk
se reloaded it and got normal outputs
so
the update is in main, your models are probably working now
i think 3.1 is fully supported but still have to wait for 3.2
All seems to work for me.
I'm using a pretty outdated version of stable diffusion though.
not going to update it as i use some extensions that are no longer maintained.
What's the issue you're seeing?
Occasionally, the status bar will only display with 0% or 1% for a moment before the message disappears.
Generation continues and the results post to channel, but the status bar embed gets terminated
my guess is it's requesting status before a job is created in stable diffusion and it quits
add some logging and check the time to see what's being sent first
asyncio.gather doesn't start the tasks, that's telling the code to wait until all provided tasks complete
so as you're creating the tasks, they're starting in the background out of order (should be expected with async)
so what I would do is create the background task for the progress bar inside the generate image code after the initial request to generate
other option (easier) would be to just add an asyncio.sleep(0.1) at the start of the progress bar task
but I would not recommend this as the stable solution.
For example if someone is hosting SD across the network, you will still run into the same timing issue.
see if that helps!
I'll merge your PR tomorrow - and hopefully fix this progress bar thing... it's been bugging me for awhile too
reading more into the code, you already handle this by doing 5 retries to try accessing the progress endpoint.
And this information would be logged if failed.
I'm not sure what the issue is now,
Maybe that generation finishes before 1 second, (but this should still log the warning to console)
yep, nothing logs to console when it poofs
nah the generation takes considerably longer, when the bar disappears it always reads 0% (or maybe 1%)
the embed message goes away entirely
is it possible to run 2 image tasks at once?
Is there a semaphore or queue preventing that somewhere?
though, assuming a new instance of Task() is created for each, there should be no conflicts of one task deleting the other's embed by accident
The semaphore is gone - the queue is working great
This issue doesn't occur due to queueing, usually happens when nothing queued
does it happen on fresh start?
or after some use?
seems like it does like to happen after an image model change...
might be something wonky on SD end
okay, will test that out... might not work outdated
the restart_client endpoint was non existant for me!
all seems normal, changed models a few times
is it a specific model type that has issues?
i'm testing with Sd1.4/1.5 based models
Could have something to do with it.... haven't used a 1.5 model in like 1 year
XL models
okay, will test that
night!
sdxl with an llm in vram slows down my gpu quite a lot.
The progress bar on discord was stuck on 1% for a few seconds (longer than the 1 second loop that is happening in the code)
But in the SD console it said it was already at 4%.
So it's possible something is locking up in the code causing a timeout.
That could be on SD webui's side or the bot.
The progress bar does work, but slowly
it times out (happened on both tests)
once at 90%, and this time at 12%
it's 5 minutes by default
because the progress bar uses a different endpoint in a loop, it continues to run even though the bot will never send the image
The issue Marcos and I are having isn’t that though
But I have had timeout issue before, not often at all though
Hmmm, I see
Might have something to do with triggering image gen via tags activation
“draw… “
It creates and queues an image gen task
I think for starters I may use embeds.create() for that particular embed
Maybe a conflict with another embed same value
the embeds should be unique to the task.
That could be tested by giving tasks a random id to log while different embed actions happen
In any case I’ll add embeds to the list of attributes which should not be copied
I see what you did there with the first on ready
Cloned Embeds() may have been the issue
I prompt for a sexy cheerleader using Flux and she has an engagement ring - I have this intuition that all Flux babes are married by default
@valid crypt latest commit I think fixes the progress bar
more testing will prove it but so far I'm getting it 100% of the time now
i see a lot of tech talk
:D
Because I have a setting to disable a few Embed types, and because managing Embeds is a little tedious overall, I try to limit the number of Embed variables the bot creates
The original bot code used like 2 main Embeds and recycled them constantly, so if not being careful something like delete(embed1) would delete one you didn't want to delete
I resolved a lot of this headache by making each bot Task create its own set of unique Embed variables
so like embeds.embed1 from one task is completely different from embeds.embed1 in another task
The bot also used to have a different behavior when a text request had a tag triggering it to also generate an image
It would be greedy and do both. I changed it to basically duplicate all the variables of the current task, and queue it for image generation
do you know if dicord bot can identify the speaking user in a voice channel
TTS STT not yet implemented
you mean stt
woops, yep 😛
is a general question to the discord bot
not your
but as a discord bot
discord
bot
Yes, a discord bot could know who spoke
got a "bug"
if the computer losses internet connection tts dies
basically disconnects and never conect again
toggletts didnt work
im 99% sure about that
But other tasks are working?
maybe TTS was not enabled when bot was launched?
Reality updated on_ready() (function that triggers every time bot client established connection with discord) so that certain functions only run on initial bot startup, and not again after connection hiccups, etc
i left the bot there for a night, and while i was playing games i lost connection because my internet died for a minute, the next time i looked the bot has disconnected
I'll have to add some print statements pertaining to voice clients and stuff, and see what happens when I toggle internet off then on
then i rebooted the bot, to check if loosing connection of disconnecting from discord causes this bug and i reconnected, and i went for a shower.
eventually i sent this message
I can tell that bot will not automatically rejoin voice channels now with the adjusted code
?
now that i tried to hear, the bot is not speaking
yep, after rebooting everything is fine, doing a sencond test
bot will lose connection to discord and leave the channel, that's not related to code.
the voice client for the bot will probably error/cancel.
There might be a background task that does something that also errored when the internet went out.
will have to add some logging to see where and why
i think i introduced another variable, which may be connecting to different server's voice channel or sending message in different server
i know that losing connection is not bcs of the bot, but once disconnected it cant connect back wihtou a restart
The bot joins voice channels when it does load_character() but this is now skipped on reconnect
You could try using /character
While I think about rolling back the on ready changes 🙂
the bot might think it's still connected.
as I was testing voice stuff with my own test bot, reloading the code would cause it to bug a little.
where i would have to make it leave and rejoin the channel
did the discord bot commands still work after the internet outage?
how long was it off?
maybe there's a timeout that completely kills the bot?
right now i couldnt recreate but the last time only tts died
it could sent text and img
and /toggletts didnt bring it back
okay will try to replicate when i have time ^^
Same
I think we need init_characters() to always run for on_ready()
Or maybe I just need to keep separate tabs on what connections are active, and on subsequent calls to on_ready just reestablish them
pretty sure that losing connection either disconnects the bot forever or no voice
Reloading all character data n such is a bit heavy handed
Did you try… toggle tts twice?
Might think it’s still connected on the first one
for the case of the bot disconnected, i tried
Will just need to make a new little routine for reconnecting
I believe all other bot variables stay intact…
Just voice clients being problematic
got it yes
a few minutes to get it disconnected
got more details
once disconected the bot requires a message to reconnect
display bot has joinet the chat...
bot is ready...
it does do the api call to the tts
make sure to it doesn't start any while loops.
or if it does, have it cancel previously running background tasks of the same type
Won’t be doing that thought I blurted out (init chars again), will just focus on keeping tabs which VCs connected, if they are disconnected for unexpected reasons will reestablish them in on_ready
what is the prob of doing a split with \n\n
double
erm, lemme check...
if syntax == '\n\n':
chance_to_chunk = chance_to_chunk * 1.5
So if your value is 0.5 then it would actually be 0.75 if \n\n is detected
Your example is correct
alr
I'm almost done with this TTS reconnection thing I've actually been working on it the past 30 mins or so
i might be too lucky to not split 5times in a row
As far as I'm aware, the probability checks are working expectedly. Sometimes the dice just roll that way
I fixed the VC connection issue 😄
Pushed that
As VC connections are managed, it now sets a flag for each one.
If the bot enters on_ready() again (after a connection issue) - it now checks those flags and any known connections. If any connection states are unexpected, it resolves them.
While handling this - I noticed that requests (bot tasks) hang while the script tries resolving the main client/discord connection after internet is restored, which actually takes a full minute or so.
I think I need to add some client check before executing tasks, to quickly return something like "Bot is currently disconnected and attempting to reconnect. Please try again shortly" etc
👌
they all could be fake, 1 and 0 have that "metalic" sound that comes with tts for some reason.
2, has none of the metallic sound, sounds pretty perfect in terms of quality.
though something sounds odd at 5 seconds: "meeting you (cut?) than I"
2 has some strange intonations/expression
"thank you for always having time to chat with me?"
sounds like a question
we can guess that it is strange to thank someone for be able to chat or just some human confusion or va confusion
although it is processed, here is the true audio
That's pretty cool!
I found llama3 and 3.1 to not do well with following instructions properly on their own.
But some finetune makes it better, or perhaps that is because I am using a 5/6 bit quant
Qwen2.5 and Gemma2 have been good for with my testing so far iirc.
I found a really small 2bit quant of gemma2 27b that can barely fit on my gpu!
And it seems a lot more understanding compared to the 12-14b range models.
try this question
in a family every son has triple sisters than brothers, and every daughter has doble sisters than brothers. how many sons and daughter are there?
this is reflection llama 3.1 q2 L though
70b
this is qwen 32b q6
and its answer is correct
try this
Kiwi, Tardis and Spaghetti are playing with chips. They have started with 12, 11 and 10 chips respectively and, in each turn, the player who has the most chips distributes one to each of the others and discards another. The game ends when someone runs out of chips. How many turns will the game last?
the answer is 28
double brothers
and you usually express these kinds of expressions like “three times the number of” or “twice as many”
Prompts need improvement IMO unless you expect good results from
bad prompts
I wouldn’t trust an LLM with any important math, and these aren’t even logic problems really just confusing math
To solve these I’d instead be looking for a coding LLM that can write the code to execute the logic, and output the number of iterations it takes to fulfill the task
this is meant to be calculated by logic and not simulate the process
not good at english
key word, calculated
Most of the LLM testing logic examples I’ve seen are reasoning, and don’t imply “track three variables, on each iteration the variable with the maximum value is reduced by 2 while the others are incremented by one” It’s usually like Jack and Jill go to the park, Jack is sick, Jill is pregnant. Something something who cooks dinner?
a simplified example of that question would be:
In a school chess tournament with 317 participants, each match is a one-on-one elimination, where there are no ties, and a player is eliminated after each loss. Players who win continue to compete against other winners until only one player remains. If a participant has no available opponent in a round, they do not play that round. How many total matches must be played to determine the overall winner?
llm tried to simulate the process and gave the wrong answer
@halcyon quarry how would you make llm solve:
We have a 3x5 board and a piece placed on one of the squares. On each move, the piece can move to an adjacent square either horizontally or vertically, but not diagonally. From how many squares on the board is it possible to visit all squares within 14 moves?
i think that qwen2.5 q4m has the same math level as gpt4o
My point is our use cases don’t involve any math… or does yours?
just for fun
I have a puzzle game which involves a game board with a 3x5 tile configuration. The puzzle is solved by placing a piece onto one of the game board tiles, then moving it 14 times to visit every tile. However, the piece cannot be moved vertically. How many solutions are possible for this puzzle game?
I don’t see how an LLM is expected to solve something like this unless it’s training data includes variations of the same puzzle with successful responses
that is what LLM should do
solve problems that it has never seen before
i ve never seen that question, but i can solve it
Uh huh, but LLMs don’t think really. The big boys like ChatGPT likely have additional background processing tools, a miriad of finetuned models working in the background, variables for storing and manipulating data, etc
😔
Probably runs code with math functions and crap
Probably works similar to my Flows tag… background prompt to a specialized context: Determine if prompt is conversational, puzzle, x, y, z…. Answers puzzle. Next bg prompt to specialized context; is the puzzle a riddle, math related, reasoning, combination, etc
ps you got the idea wrong and a mistake, although with your prompt it identified that it is a Hamiltonian path like problem
do you have access to o1?
im curious
preview
I believe so
can you try? plz
ppl say that o1 is strong as hll at math beating 90% of dr blahblahblah
says answer is 15
From my question, it says 8 solutions
nice
I had to tweak it slightly because I wrote "vertically" instead of "diagonally" and I also changed my last question to: How many starting positions can result in solving the puzzle?
From your question copy pasted https://chatgpt.com/share/6702a69f-93b4-8013-8751-778f0479d50c
In this case it didn't do any math or anything, training data included specific puzzles, identifying puzzle types, rules of puzzles, etc etc. The answer was already trained into it
lemme try
its because of o1 ._ . chatgpt gave 16 which is absurd and qwen want to code
qwen's code gave 0 F
try to solve this, it's in spanish because this is tough to express as it is much easier by looking at a img
Alargando los lados del triángulo ABC de la figura construimos el A'B'C'. Si sabemos que AC=AC', BA=BA' y CB=CB', Cual es el cociente entre las superficies S(A'B'C')/S(ABC)
@halcyon quarry are you working on something of the bot?
Not right now, just being a dad
Plans:
- add a check for discord client has stable connection
- finish persist tag code
- finish the SwarmUI support code I began
i see
- remaining items on todo list
bros prompt is god
found a dedicated qwen model for math 🥳
It’s just better clarity on what the situation is, rules and objective
A 3x5 board is a piece of lumber
Actually this first item isn’t solvable lol Bot would need connection
why
Eh… idk, need to do some more testing 🤓
i dont see any logical paradox
It’s odd that the bot will receive requests immediately after internet is restored, but it takes a minute or so before functions accessing the client will work… the paradox is that the bot is getting the requests at all
you mean that is discord who communicate first so if there is no connection there is nothing
If I disable internet, wait 10 seconds, enable internet, then wait 10 seconds, then send a request to bot it will begin the task then get hung up
as loosing connection is not very frequent and only tts get impacted, the fix could be manual and be a command
Until a minute or so later when the bot runs on_ready() again meaning it’s established a new connection to discord
yea, it would be better to have the llm code something that solves the solution rather than trying to do it itself.
I'm not really talking about math problems, more just sticking to character... simple things! which are surprizingly hard for small models.
I'll try your word problems next time I have it online though
oh nice, how does that work out?
you remind me that i have to try qwen 7b
hmm, wonder what causes that.
had some buggy experiences with some models crashing Cuda even!
with buggy i mean that after certain amount of token it goes crazy
mixture of chinese english and symbols and nonsens
yea similar experience
"Illegal memory access" + keeping old prompts in cache somehow.
often not following the instructions, and making up nonsense from all the combined chaged prompts
owww the first one is buggy
should have always chosen quantfactory 😔
i lied
they are buggy
so far this is the best prompt to test LLM
Point A' is located along the extension of line AB such that B is the midpoint of AA'.
Point B' is located along the extension of line BC such that C is the midpoint of BB'.
Point C' is located along the extension of line CA such that A is the midpoint of CC'.
This results in a larger triangle A'B'C' surrounding the original triangle ABC.
So what the ratio of the area of both triangles?```
it got the answer but then...
hmm, I know the most recent models are supposed to be 8k or higher nowdays.
But this seems like the kind of bug you could have going over the context limit in the past
i just thought a little bit about stt, and oof idk
1.bot must be always listening
2.if we want to make bot reply faster --> few seconds of silence to send the msg
3.beable to cut the response as user might want to add something or others reason like not interested or want the bot to stay silence
4.wrap the user's input if user is trying to add
5.more stuffs if multi speaker...
Will overcome whatever obstacles there are, whenever I'm ambitious enough to try tackling it
the other side, choosing a good stt that has quality and speed
the bot is already listening for a lot of things
text is much easier to track as user can think before hitting enter
if stt is too sensitive will send un letter as input like a
or a noise
thankfully multi speaker is easy, discord gives you access to separate voice streams.
inference speed is another thing though.
Yes Whisper STT is fast, but to do streaming in almost real time, you have to re-run multiple times on a handful of previous audio each second/time interval you decide on
the order of the conversation is important too
i think that is better to wrap them
of course!
that's something I haven't thought of yet..
hmmm, I think Its possible as whisper gives you timestamps for text output
ooo also chucking the voice to not wait for the entire sentence before sending data to the llm
yea, that's a complicated one
could be by silence like always
you'll want some system prompt that can indicate if a user has been cut off mid sentence
Reality: like --
(later)
Reality: -- this
and some improvements to the tts, right now i suggest adding a toggle to always chunk the first . or \n...
mhmm, too small of a chunk can cause audio hallucinations
if tts tries to just generate a word
that is why only the first one
with the time of the first one, its pretty easy to process the rest in time
yea, that makes sense
for a human sometime we have to think for example:
tell me a story about a knight and .... (sent to bot)... and evil magician (interrupt and wrap)
yup
to solve this, if the user is still speaking --
have the bot generate slower, like a few tokens at a time and constantly checking for new user inputs
so in the end, it might only generate a few words going in the wrong direction, then correcting itself
as there is a feature about chunking the output text might be a good idea to add it to the prompt like
you have been cut off by the user and you was say "blahblahblah"
instead of generate slower it could be only delaying tts
getting stt -> text gen tuned is the most important.
because that's your input to output.
Tts is just the method of output.
Like you were saying, if the bot goes generating some thing based on a half finished sentence, it wont matter if tts is delayed, it's already generated the wrong output
hmmm speaking of tts,
are there any decent models that can be finetuned/do cloning that don't use 6gb+ of vram!
i think mine is taking only 1~gb
O:
I've been using Xtts at fp32, i think it should be possible to half that, but would have to fork the lib
mine is not for zero shot
this is a extension that call https://github.com/Artrajz/vits-simple-api through api
I used to use a Vits tts a while ago iirc
it was okay, but couldn't pronounce some words, I had to make a lookup table for words that would swap out phonemes before passing them to the tts
Will try it out!
https://github.com/Plachtaa/VITS-fast-fine-tuning you can train model easily with this
That'll be epic if it all goes smoothly!
this is not just about vits but a lot of variants, just the extension only can use the basic vits, ill try to make it use others
the 1 is gpt sovits, im not sure of how much vram but i dont think it is a lot
0 is a zero shot without finetuning
Yea, it was really minimal and could even be ran on cpu at real time
This persistent tags... tag... the juice just isn't worth the squeeze
I'm not liking all the changes that need to be made to accomodate it
eh... idk...
😔
I'm likely going to add this feature after all, but I'm not thrilled about some things I had to change up
debugging one little issue and it should be working expectedly
i wonder why you are not thrilled about the changes ¯_(ツ)_/¯
"all tags" are compiled for each request. While the code was checking them for "LLM" related tag values, I was removing data that was not applicable in the "Img" matching phase
But when a tag is triggered with "persist", I need to ensure that tag is applied again. And not applied twice
So for next requests I need to compare tags to any triggered persistent tags and they need to be identical
So, I can't remove data from tags while checking them
just means it has to iterate over irrelavent data later on
aaaaanyway, I have it working now
Some additional logic for it...
- Only applies to same channel the persistent tag was triggered in
- Only re-applies on the same match phase that it was originally triggered in. If it was triggered after LLM phase (post-LLM / pre-Img gen), then it would trigger in the same match phase on the next request
@valid crypt if you could test out this branch a little bit I would appreciate it
https://github.com/altoiddealer/ad_discordbot/tree/persistent-tags
I expect that it will work as you had suggested
Here's an example tag that uses it:
- trigger: persist test
persist: 2
should_send_text: false
Just change branches for a bit (as am I), let me know if everything is still working expectedly, and if the reason you were interested in having this added is fulfilled
I don't think I messed anything up in the process but I had to change a lot of lines to plug this in
should_send_text: false?
You could use anything, like prefix_context: etc
when match phases occur, it fetches any captured 'persistent tags' that are relavent for the current channel and match phase.
Before it checks a tag for trigger matches, it will first compare to any of those persistent tags, and will automatically "match" it
i created a new folder with the new branch and i pasted all the config files
reboot fixed it
Even if you don't consider yourself a "developer" I recommend getting the GitHub Desktop app
how so?
To switch branches I just select from this drop down here, and this doesn't affect any user files
It will show a little "down arrow" icon next to repositories that have new commits in this dropdown (I already went through and "Pulled" them).
So, it's just great for managing any github content on the PC
pretty much working
it told me the prompt after a few interactions
and instantly found a bug
hahaha
yes
and not just the time it got triggered
but all the time got bypassed
second problem
Apparently I must not realize something about condition logic, I have a bunch of if statements, I'd have thought that since the censor check is higher up that the lower one for if persist would not trigger, but apparently they are all checked simultaneously or something
Did it censor the tag at the same time?
?
When it said "a persistent tag was matched" did it also block that generation?
you think so?, although i can check terminal
If it didn't censor that initial tag match then I would be pretty stumped
I can see how it could bypass on the next requests
(until I fix that... working on it now)
nothing about blocking of censor,...
before the 5th i reloaded the character to change the trigger word to funtiontest
a missing screenshot
the forever came out of no where
That's an oversight by me, not actually repeating forever in this case 😛
bad print statement
oki
now this thing with the censoring...
You basically created a workaround to avoid it, but I don't think this workaround could be created by user
erm
OK I know the issue
sort of
Fixed the "Forever" message
💀 💀 💀 💀
do you use the default windows file explorer?
is painful to me to wait for the long loading time and the poor search function...
ive just come up with an idea, ai alarm or whatever, idk
- tag to create tags
2.llm creates tags
3.tags that expires by rl time - a system that sends the current date and time when the date is reached using tags or something
by doing this we can connect the rl to the bot and maybe can help its other aspects, idk
I saw something about some people in China modding their 2080tis to double the vram.
Didn't expect to see them sold world wide now!
I wonder if it's worth it, (I have a 2080ti and it's still really fast for all these models nowdays)
But is the inherent risk of Ebay worth it?
That would be cool though.
4060ti 16gb has 6gb less vram but risk free https://www.newegg.com/msi-rtx-4060-ti-ventus-2x-black-16g-oc-nvidia-geforce-rtx-4060-ti-16gb-gddr6/p/N82E16814137818
Were the censor tags not working at all on the persist branc?
if you didnt update i say no
ofc 100$ cheaper
yea, good point,
And model splitting across gpus has probably gotten better too!
for tgwui yes, its fantastic
some motherboard support splitting the x16 pcie into 2x8 which means you can plug 2 4060ti 16gb without bottleneck, and maybe another 4060ti 16gb in the x4 from chipset...
to go beyond the price goes
gonna leave my question here, how do i load transformer in 4bit, checked the option in tgwui and saved... (rn im getting cuda out memory (bot) and tgwui does not)
Might have to try that!
Got a new powersupply with lots of overhead for the 2080ti a while back.
And the 4060ti draws a lot less power, almost half.
It would be realistic to be able to fit a few in there without further modifications!
speaking on censoring,
have you see the censoring code in the openai-api extension?
They load up an embedding model and compare the embedding of the text to some swear words.
(ofc this could be improved upon)
But maybe it would be a good idea for more fluid censoring!
I merged the persistent tags to MAIN
You could also use Flows tag to have a specialized character review the text, and return "true" or "false"
Thanks for the suggestions!
Some good ones
The current code in collect_llm_tag_values looks like it should be working fine.
The if statement raises an exception if censoring is detected which will stop the loop.
What I did notice though, is the function iterates through a list of tags.
Perhaps there's something that happens before that is not censored but set to persist, then the next tag is censored and exits the loop.
?
I rarely use transformers.
I think even for LLava I was using gptq (which is slow with recent updates)
there is probably a way to quantized the transformers model to 4bit before hand.
Perhaps tgwui tries to load everything into ram/vram?
Maybe it can quantize on the fly... not sure.
Iirc quantizing to 4bit was a time consuming process.
Long ago I was manually quantizing my own llama1 models because the gptq ones I downloaded kept failing for some reason.
(That was probably for a different loader anyway, it could be faster with transformers!)
in tgwui there is a option to load in 4bit
the problem is that using the qwen math gguf i encountered some problems but with 4bit transformer didnt
Hmmm, maybe you should ask in the general/help chat here, or maybe the transformers github, it could be a them issue
the thing is the bot is not reading the setting i think
i thought the bot could load in 4bit as tgwui can
try loading it without the bot and hitting save settings, the loading with the bot
that is what i did
Hm!
There are 2 cmd_flag text files.
One for tgwui, and one for the bot (that is also for tgwui)
I think... i might be remembering it wrong because I sometimes keep a backup of a file in another dir.
But make sure you put the start flag in the right file ^^
i simply do /llm
and bot loads the model in full weights
;-;
this is what i have
I had merged another branch in that may have reverted the code... looking into it now'
ok... on the LLM side, llm_censoring tag will only have an effect if it includes triggers
oh ok I see the issue...
sort of...
Ahhh, I never really did that.
I have a dedicated 3b model to use for testing the bot that I put in the cmd_flags.txt
That's so I can also load SD or TTS while debugging
actually no I don't see what the issue is
maybe they use different functions to load the model
try it yourself
suffix with a word that is prohibited and make it say it
im not sure if the cmdflag would change anything
my conversation
Before the LLM sends any messages, it runs that text through a check_censored() function.
What it does is checks if any triggers from any llm_censoring tags match anywhere in the text
Ok here is the problem here
the trigger regex currently looks for word boundaries only
I'm going to update the pattern to include non-word characters such as "xxx" or xxx! or xxx? or 'xxx' etc
censoring is a hard battle, people will xx* or xxxtest or x x x
even other lookalike unicode characters 𝓍𝓍𝓍
yes there are ways to santize unicode lookalikes to their ascii versions.
But don't stress too hard about actual censoring for like the public use!
But yea, I can see how it's a great tool for getting the bot to avoid talking about something if people aren't actively trying to break it 😸
im not very sure
yeah something seems broken after all... wtf I know it was working...
people can 𝓍𝓍𝓍 but bot is harder
just in case, caps :)
found the bug, but the regex was another thing for sure
really found it this time 😛
code was not actually collecting the "llm_censoring" tags to check later.
I may have had it working, then tweaked it in a way that I thought it would still work but actually stopped working
But now its working.
In the process noticed that /regenerate does not handle the censoring gracefully - fixing that
@valid crypt The censoring should now be working great on MAIN
ok
do you know something about this?
Are you using the same exact loader?
When I search the TGWUI code for 'load_in_4bit' I see that this value is only recognized in a function called huggingface_loader()
😵💫
I see that Transformers will use this function
what
can you explain a little bit more
i just /llm to load it
Are you sure that the bot is using loader "Transformers" - same as what you are using in the UI?
Check your models/config-user.yaml file and ensure that the model in question has these values:
loader: Transformers
load_in_4bit: true
you somehow fixed it...
solved :)
im pretty sure that yesterday there wasnt so many parameters...
¯_(ツ)_/¯
I think when you click save config, it saves all relavent settings (including defaults)
and if you have a user config it will print all
@halcyon quarry how are you doing and how is the project going?
Good morning thanks for asking the project and myself are both doing quite well
Over the past few months I was able to add a few features that I thought would never see the light of day most of which are pertaining to using the bot on multiple servers
I didn’t think I would be able to figure out TTS streaming but alas that is also working
Development has slowed obit since I am distracted by a game and also due to my contributing towards the SD web UI Forge Project
Pushed minor update, include new "XTC" sampler param defaults
@halcyon quarry good luck man
so the tts streaming is implemented already? and what's the logic behind it?
and is it real time?
sorry for bombing you with qs haha
I modified the TGWUI chat wrapper function, to extract the part which would trigger TTS generation only at the end of the generation
Now when the bot is triggered to stream a text response (on a sentence completeion, double line break etc) via that feature - it can now trigger TTS gen on that text
so it's not real time?
maybe you can try triggering the tts on ",. : ;". when it detects a new sentence basically.
It's user configurable
is it possible to make it real time tts
as it is generating the text
not waiting for a full sentence
if you split text on " " space then maybe