#ad_discordbot (Fork of Fork of xNul's bot)
1 messages ยท Page 2 of 1
There's triggers to generate an image response, and there's triggers to switch characters
by default, "generate" would trigger an image response but not a dynamic context
"draw" will trigger both
You can customize it if you prefer different behavior
Since youve been gone for awhile I recommend starting from scratch, and comparing your files that have customized settings
The structure of imgmodels file may be different now (imgloras became imgtags, etc)
Also see if you are using the API method... setting in config.py
btw, coqui_tts has a glaring problem: It doesn't filter out *stuff* or does any other kind of filtering.
Need extensions/silero_tts/tts_preprocessor.py, which I connected to coqui as a test and works wonderfully.
Your SD port is probably different than what is in config.py
(Im guessing)
silero_tts only speaks stuff "between quotes" as far as I know, and has many more filters and fixes, it's quite intricate actually.
Its the same port
Ah, I think I understand... like giggles it speaks aloud "giggles"
Like I said, you need to start from scratch
Feel free to share a copy of that character that failed, I could see if there is a glaring issue
Or, something I need to take into consideration with the code
Yeah, basically.
It's not an issue with your bot though
I'm intrigued on the filtering... Ill check that out, might be able to make that configurable
I honestly can't do RP with coqui in it's current state though
The main hook with coqui really is its ease of use and "good enough" on-the-fly voice emulation
So deleting ad_discordbot and just pulling it all again should do it?
like, I clipped a few seconds from a david attenborough interview and the replies are pretty good
Yeah, it is quite impressive, though not consistent sadly
I'd recommend backing up the folder, then yes clone a new copy
Ok i did that, and still same thing
yeah the voice does change dramatically sometimes between sentences, and a few random pauses here and there
Does it say something like this in your cmd window?
Dynamic Context: Character: M1nty-SDXL | Prompt: a picture of an ant | History: []
check config to ensure it has this option
'filter': [''], # Example: 'xl' = likely just SDXL models. Can match multiple such as ['xl', '15']
And dynamic context seems to be on
Please share a copy of the character that is failing to load
I mean the character doesn't matter. The minty file even doesn't does pictures
I only changed the token in config, otherwise its all original
Like here i just selected minty from the github page
I'm deleteing my own config file and using the one from github
let's see if I can reproduce...
I deleted the entire ad discordbot folder, and pulled it again. And put the minty character file in
Idk man... I replaced my config file with the default one, and simply added my bot token.
I launched, used /character and picked my character, then "draw a cat"
Weird
Your character failing to load could be a problem...
Also note, I am currently on latest stable releases of A1111 and testgen-webui
Lets try updating everything then
Another thing you could try...
launch A1111, and in url bar add "/docs" (may be http://127.0.0.1:7860/docs)
find the GET: /sdapi/v1/sd-models
"Try it out"
"Execute"
The bot essentially performs this to fetch the model list.
Yes, the problem was that in recent ooba versions the load_character() function returns 7 values now
So, now that you've updated that is resolved
(its compatible with my code)
OK - the problem is that the "draw" is case sensitive ๐
(try "draw __")
did dynamic context trigger in your cmd window?
Ok... is A1111 launched with --api flag?
man what the heck...
Config file only gets read again once you restart the bot right?
yes
I try to remove the / from the end of http://127.0.0.1:7860 if that makes a difference
Lol it did
You're killin me man ๐
So at first it didn't work because outdated. And while trying to fix it, i just copy pasted the url from browser
aha
maybe you messed up the syntax for the generate image / dynamic context
ensure those are exactly as in the original config.py file
also ensure the character M1nty-SDXL.yaml is in text-generation-webui\characters

It just doesn't likes me
When you directly tag it like @chatbot it doesn't draws. While if you reply to it, and ask it to draw, it does
It;s because there is no space " " between the @mention and the word "draw"
@vast elm draw a duck
@vast elmdraw a duck
๐ฅ
ok I see it didn't actually draw
Ah
the problem is the "on prefix only" setting
Turned on prefix only off
space...
support for the lrctl extension, if you use a lot of A111 loras
param variances (add randomness to sd settings)
nsfw image filter handling
License for the coqui model is actually trash though.
I'm looking at it now and seems typical to me, no?
There will be another update in a bit that requires a few key changes in config.py and in your characters.
On the plus side, this update should allow any extension specific parameters to be defined, per character.
This will probably also allow any tts extension to work, not just coqui_tts
Wow, I think I also fixed a pretty big bug
The message request queueing feature wasn't actually working... well?
Its working correctly now, along with the @ mentioning feature that was mysteriously not working as intended.
I may be able to get image requests to queue up now as well (I don't have time for it now though)
For the life of me, I can't figure out why it has "This interaction failed" after selecting a character from /characters command.
It's just cosmetic, though, all of the code executes correctly.
quick comment - I never get good images from Juggernaut. But goddamn, it is an excellent model for img2img
Having a bit of an issue. I built a new system and put on a fresh Ubuntu install. Installed textgen, your bot, and stable diffusion.
Everything works as it did before, but images are causing a problem. When I use the /image command, sometimes it will generate + post, other times it does not and the bot will indefinitely try to post it, eventually getting a "we are being rate limited" error after several minutes of waiting. Other times, the image posts successfully. When it fails, it seems that SD is indeed generating the image (I can see the progress bar load to 100%). Neither SD or the bot are throwing errors when this occurs though, so I'm a bit confused.
I know that's not much to go off of, figured i'd check to see if you have any ideas though!
Fresh copy of the bot?
I've seen the rate limited message before, but it's been awhile since I've seen it in any unusual manner
I'll get that if I launch the bot and try changing characters too fast
(change char, reload bot, change char again)
Yup, everything is fresh, minus a few changes in quick settings to match what I have used in SD. Oddly enough, sometimes when the bot doesn't produce the image, it I go on SD and generate a random image, the bot will suddenly post the one I requested, making me wonder if the problem is SD
hmm.
Is it the current stable version, or the RC for upcoming version?
or other, dev branch, etc
SD? Should be current - I pulled it from main, can double check though
1.6.1 which seems to be normal, looks like RC is 1.7.0
ok, same here 1.6.1
1.7.0 will be stable release soon
is launched with --api right?
Yup --api added to command line args. What's weird is that it works intermittently
Might do 0-4 images, requiring the bot to reboot each time it fails as it won't do anything else. I suspected an issue with SD API but can't think of anything that would cause it
It looks like you could have more verbose logging by setting an environment variable... https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings
You could try changing it from INFO to DEBUG
might see something in the log
Thanks, will take a look at that
the image generation code in my bot doesn't have much print statements on progress... we could stick a few in there to see exactly where it is getting stuck
Sounds good, I'll give the SD debug a try in a few minutes and see if anything comes up. The bot worked perfectly on my previous system, and nothing has changed, so I suspect something funky with SD.
I stuck a few print statements, you should get a better idea of where it is getting stuck
we can narrow in on it
well, the bot is always changing and I tend to tighten up a little code here and there if something looks loose
I'm on windows, could be some code that doesn't jive as well in ubuntu shrugs
Can't remember if I had it running on Ubuntu before, but i ran it on Arch on my previous system and no issues there.
Found this w/debug:
-Image requested via discord, gets stuck:
Then SD w/debug shows:
Then, I manually generated an image on SD (not on Discord) works fine and comes up as
Well, seems normal. response code 200 means it processed the request
try the code I shared with the print statements
oddly enough, the first image request from Discord never ended up in the Outputs folder in SD, but the one created within SD itself is there.
Will do
hum
ok
Is there an sd_outputs folder in ad_discordbot?
maybe it doesn't have permissions to create the folder
(or something)
There is a folder, it does have some files in it from when it occasionally worked before, but not the one I just attempted
I put even a few more print statements
ok will try that now, thanks
hmm getting this now:
File "/home/bot/text-generation-webui/bot.py", line 138, in <module>
tts_client = config.discord['tts_settings']['extension'] # tts client
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'tts_settings'
hmm
on config.py you should have this:
'tts_settings': { # REQUIRES: 'pip install pynacl' in textgen-webui venv for bot to join a voice channel
'extension': '',
yes ๐ Big changes
Sorry, I could be a better coder if I took into consideration backward compatibility (user doesn't upgrade config.py)
I added a new chunk of settings into config.py, tts_setttings. Those need to be there
Oh no worries, it's just that I may be a version behind but just jumped bot.py ahead likely for those print statements. Usually I just read the documentation and do a proper full upgrade
I asked if it was a fresh copy of the bot and you said yes heh.
Anyway yes I highly recommend upgrading to current version
fixed a juicy bug today
Yes you did - sorry my mistake, I forgot how much work you put in the past week or so hehe
Yeah I haven't put this much effort in in like 2 months
hmm so after updating it was getting caught at sending payload to a1111_txt2img(). I closed it out, did a full reinstall of discord in the textgen folder and it has worked 10x in a row so far, so i'll have to see. As a side note, even outside of this issue, those print statements are really handy to see settings being passed at a glance
scratch that. There it goes again lol. Got caught on "sending payload to a1111_txt2img()...".
This is what SD is showing for the stuck image:
Total progress: 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 5/5 [00:00<00:00, 10.70it/s]
2023-12-08 21:31:09 DEBUG [PIL.PngImagePlugin] STREAM b'IHDR' 16 130, 13.97it/s]
2023-12-08 21:31:09 DEBUG [PIL.PngImagePlugin] STREAM b'tEXt' 41 210
2023-12-08 21:31:09 DEBUG [PIL.PngImagePlugin] STREAM b'IDAT' 263 65536
Thank you, i'll put them on tomorrow, gotta get some sleep, early day tomorrow
& thanks for all your help, much appreciated!
np
Might be interesting https://github.com/erew123/alltalk_tts
Thanks, I'll check it out. I'm almost done with another new feature... only affects bot.py for once ๐
slash command /speak where you just input whatever text you want spoken, and choose the voice from dropdown or attach a custom voice
Did u see that latest version I pushed now supports loading any extension params per character, as well as possibly supporting other tts clients
No, I don't think I have the voice part yet (haven't updated in a few days
)
I only use this bot sporadically, I just like hanging around here.
and I enjoy that!
So I have this new /speak command working - the way it works is it uses your text input for oobaโs โcontinueโ function, paired with max_new_tokens: 1. So it just generates what you wrote
Iโm going to check out a number of other tts extensions to try and maximize compatibility
I figured out a way to overflow command options into additional menus when there will be more than 25 items in a dropdown list (discord limit), but its a comically overhanded workaround.
It's cool that it works... just, not an elegant solution by any means... I basically have a series of command definitions nested in 'if' statements, so it registers the correct version depending on the total number of items
Just pushed an update for that new "/speak" command and it is very comprehensive.
This update also makes silero_tts and elevenlabs_tts supported (not just for /speak)
The menus for /speak are dynamic and functional for those 3 extensions
If you guys speak different languages, don't worry all of the supported languages for each extension are selectable from the menu
There was a bug (typo) that I just fixed. Sorry to anyone that updated and had errors.
The /speak command now replaces underscores with spaces and capitalizes for nicer looking options.
** GOOD NEWS EVERYBODY**
The /imgmodel command now supports up to 100 models!
On startup, the command will be populated with the appropriate number of dropdown menus (up to 25 items in each)
limit_imgmodels() = ๐ฎ
yay xD
If you have more than 100 models, I know a psychiatrist.
But I can also add support for more models
Just counted them and I only got to 52... Although I have before that deleted about 20-30 since I ran out of storage space...
Just pushed an update to fix Upload File not working in "/speak" command (only works for coqui_tts)
Includes a very unethical change, which is it now allows an mp3 as input, which it will convert to wav (coqui_tts requires .wav as input)
Next on my to-do list... I'm revamping the "imgtags" feature so it encompasses all the extras I've been putting in config.py recently (they'll be coming OUT).
Meaning, there will be more parameters than positive_prompt, negative_prompt and trumps.
I'll make sure inclusion of the parameters is optional (won't need a bunch of empty keys for each trigger definition)
Characters and imgmodels will also be allowed to have their own imgtags
I have the Discord bot running, default character set within the /Characters folder with Ecne_Bot.yaml that seems to be running good now.
I'm going to take a look into tts option, and also have to wait on fixing up the connected SDXL server of mine when the new 3060 12gb comes in. It does work with draw, but that hardware was not made for SDXL at all...
So, starting to catch up.
๐
You can define baseline TTS settings using ooba's settings template
And/Or, use the 'extensions:' dictionary in each character
(as shown in the example M1nty character)
I see in the example:
Must be defined using exact name of extension (in '../extensions/').
extensions:
coqui_tts
For the different tts and parameters that work with ooba. I can work with that, thank you.
Indeed. If you plan on changing characters frequently and want to use generic settings, you could define those using ooba's settings template (as if you were going to use the webui directly rather than the bot)
Those would be overrided by any character specific settings
For now it'd definitely just be this one character. I'm trying to get something running with all the features my users want. Eventually figure out speaking to it and getting a speech reply back. Really personalize it for images, and a buddy is trying to build a lora based on the game character models for drawing with SDXL.
And then figure out how to put all my documents, guides, and wiki as either reference, or direct knowledge for it to tell users about the game/.
very cool, I'd be interested in knowing how everything goes!
Before I forked this bot, the code was alreay quite sloppy, and I cleaned things up as I went and noticed things.
For the past few days I've been working from the beginning and up to restructure the logic of settings handling, and toss out useless code.
Finally got a grip on it ๐ Changes will only affect bot.py
Main benefit will be that values in activesettings.yaml will be completely optional. As it stands they are required
The AllTalk tts extension (fork of coqui_tts) probably works I havenโt had a chance to make it officially supported
I expect to include code to take advantage of its features
Alltalk, I'll take a look right now.
It has methods for handling stuff like this maybe even (stuff like this)
Have you seen this yet?
I'm going to reboot the system when I'm home.. I can do anything but reboot the system remotely unfortunately.
I think that error means the bot has not been granted sufficient permissions
has it been behaving fine for the same requests?
I'm making very good progress on cleaning up the code... the whole logic of initializing the character, changing characters was a bit clunky. I've got it absolutely rock solid now
Yeah he was working good up until I left the house. I'll take a look. Idk maybe the not is quarantined or something. He is using a uncensored model, and not sure what my testers are asking in DM right now.
OK now he's working. After shelling me 8 responses at once. Weird connection issue maybe.
Iโve got an error like that when using a bot command from a channel the bot is not in
You may have users with command permissions trying to send commands from other channels
if he's being hammered with requests it also may not be queuing correctly... I only recently fixed text queues, images just block (will fix that soon), some other things might interrupt request queues
Tightening up all the above is a high priority for me now ๐
A recent ooba update seems to have broke the bot... should have it up to date by tonight
I solved "this interaction failed" for /character command ๐ช
technically I have everything in tip top shape, however some of the responses I'm getting are all whacked out, which I think has something to do with the new key value "chat_template_str"
actually, maybe it was some other optional key I added to the list...
I pushed the update.
oobabooga keeps changing the number of positional arguments and return values from load_character() function, so this will error if not on a recent versionof textgen-webui
Bot now has a welcome message thingy
The /main command now toggles the channel on/off as a 'main channel'
It should be much more difficult to run into errors now, especially with character switching, etc.
Something seems a little screwy with dynamic context feature (such as char swap for โdrawโ), fix coming soon
Dynamic context is still screwy, however I resolved a few other issues I had created
Turns out my dynamic context code is still fine, I didnโt muck that part up.
Itโs just that new textgen version no longer replaces {{user}} and {{char}} with correct names for Chat mode, which explains the sudden strange output
Iโll be restoring this behavior as a config option
I got the new Mixtral7bx8 to work on my setup.. just barely, but crazy like 4 times the speed of my Vicuna 30b and 32k token trunc. I'm going to try adding it into the discord bot and see how it goes.
Some of my recent commits were not as good as I thought before I pushed them.
I have a stable update coming very shortly
However, it won't be compatible with older versions of textgen-webui
Thank you, I did update my setup yesterday to the newest ooba and your discord bot, and was working good for my case.
Ah okay
Luckily it's an easy, move my old textgen to textgen2 or 3, and just clone a new textgen
I found some issues with the logic in dynamic_context. I also added a function to mimic what textgen-webui recently removed... it used to replace {{user}} with value of name1 and {{char}} with value of name2 in the character context
One thing:
When I run command:
python bot.py --loader exllamav2_hf --model turboderp_Mixtral-8x7B-instruct-exl2_3.5bpw --gpu-split 10,11.5
do I also need to put in the max-seq-len 32768
Are the commands based on the server.py ?
For now, I think you may need to do that.
I need to take a sec and make sure the bot collects all the current information
I don't think it collects that parameter at the moment... I'll be checking and adding if needed
I really need to figure out if this new model is good for conversations and knowledge. So far it seems good, and that speed and triple paragraphs reply is just ridiculous good.
I'm jelly, I only have a 4070ti ๐
Ohman, I couldn't afford 4000 series though lol
Only got 12gb vram to play with though
I just pushed a nice update
er.. forgot the new config.py (new setting)
just pushed updated config.py
just copy/paste the new replace_char_names block into your existing config.py
on my to-do list, is to integrate all the default config settings into bot.py so that config updates don't break anything
Upgraded, set configs, and so this is my command:
python bot.py --api --listen --loader exllamav2_hf --model turboderp_Mixtral-8x7B-instruct-exl2_3.5bpw --max_seq_len 32768 --cache_8bit --num_experts_per_token 2 --gpu-split 10,11.5
Whoops something missing on my end I think:
File "<unknown>", line 1
[,"Dundell2","M1nty"]
^
SyntaxError: invalid syntax
I added a bit of code that will automatically add the user's name and the characters name to State keys: "stopping_string" and "custom_stopping_string"
So, if your state settings include something like "client.user.display_name" or "i.author.user_name" those should now be removed
name1_value = user_input['state']['name1']
name2_value = user_input['state']['name2']
user_input['state']['custom_stopping_strings'] += f',"{name1_value}","{name2_value}"'
user_input['state']['stopping_strings'] += f',"{name1_value}","{name2_value}"'
This:
custom_stopping_strings: '"### Assistant","### Human","</END>"'
Will now become this automatically depending on who's talking to who:
custom_stopping_strings: '"### Assistant","### Human","</END>","altoiddealer","M1nty"'
Ohhh... I see my folly here
If there are no existing stopping strings this will error
I just fixed it now
I will never claim to be a great developer ๐ค
pull the new bot.py and that error should resolve
Pulled and testing now thank you
He seems to be working now, and now I can have my guys test him out and see how this new model works. Thanks again
Also on my to-do list is the debug spam regarding extensions
Ah, They caught an error 3 times overreloading now.
ERROR [2023-12-18 11:58:49]: Ignoring exception in on_message (Line: 515 in on_error, client.py )
Traceback (most recent call last):
File "/home/dundell/miniconda3/envs/textgen/lib/python3.11/site-packages/discord/abc.py", line 1561, in send
data = await state.http.send_message(channel.id, params=params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dundell/miniconda3/envs/textgen/lib/python3.11/site-packages/discord/http.py", line 745, in request
raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50006): Cannot send an empty message
Not sure what the issue is currently. When I try locally on ooba, I don't see the error.
this is for a regular text request or an image request?
Normal text. I won't be getting back to sdxl image making until Friday
Just simple requests.
Another was just what gods are in Gaelic, wich it answered, and then just who is Morrgihan
I added a try / except block in on_message, so maybe a more useful error message will show up
I added it in one sec
woops, its going to print a bunch of other stuff too... was looking into the settings stuff
lol I saw
That did it thanks
current_hidden_states = F.silu(gate) * up
~~~~~~~~~~~^~
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 12.00 MiB. GPU 1 has a total capacty of 11.76 GiB of which 14.69 MiB is free. Including non-PyTorch memory, this process has 11.60 GiB memory in use. Of the allocated memory 11.40 GiB is allocated by PyTorch, and 71.52 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
aha
I knew this was pushing it... I might have to throw in this rtx 2080 super 8gb my brother left me just to run this then.
Reduced it down to 22k
So command is:
python bot.py --api --listen --loader exllamav2_hf --model turboderp_Mixtral-8x7B-instruct-exl2_3.5bpw --max_seq_len 22768 --cache_8bit --num_experts_per_token 2 --gpu-split 10,11.5
I'll work on implementing the additional 8GB vram for other extensions and such as well.
Thank you for that. I would have spent half the day trying to figure that out.
np! Surprised I didn't have that exception block
Just pushed an update that confirms support for alltalk_tts
really great improvement on coqui
Just pushed a simple bot.py update that resolves the following:
-I was unnecessarily reprocessing settings at the beginning of most interactions. I think this may have even been causing some interactions to timeout (?)
In any case - Fixed.
-I was updating extension settings on every message response, however they don't actually need updating at this stage, they are already updating at the right times.
Like the other settings thing, this was excessively heavy handed and caused debug spam on every message.
Fixed.
The only drawback to the above changes, is that manual changes in activesettings.yaml will not be automatically applied.
This isn't the intended usage, though. Make updates to the character file, dict files, etc, then use settings commands (/character, /imgmodel, etc) to sync in the new settings.
-History settings were not being honored in Dynamic Context.
Fixed.
Yep, I actually just fixed that now.,.. please try this version
I personally always have A1111 running so I never encountered the error ๐ Genuinely surprised no one else mentioned this until tonight
You'll have to teach me about that sometime ;p got it working!
I 'broke it' but that's my fault
I'll see if I can make that not "break" it, too...
Although;
I said 'sorry fella' and that happened haha
from what ive seen so far though great job man, cool stuff
If you won't be generating any images, disable the stuff in config.py that will trigger an image response
@halcyon quarry any idea why my bot isnt very talkative?
it did answer on the 3rd message but then the 4th one was "As an" again
Might be what I was seeing a few times. Ckeck token length, and vram usage
You may have max_new_tokens set too high. My example character suggests setting it to 1000 but that may be too high
if that's the case, try lowering it to something around 700
Does it also happen when you're just using the oobaboogas webui?
Yes, if the context + your prompt + max_new_tokens is greater than than the context limit, your context will get screwed
There is an auto_max_new_tokens parameter that I haven't played with but from the sound of it, this should be a set-it-and-forget it solution to dynamically calculate and apply it for every prompt
I've updated the suggested settings. Also noticed that I had a duplicate setting param in my script which wasn't hurting anything but now it looks prettier ๐
Tell me if lowering max_new_tokens resolves it ๐
next big ticket item on my to-do list, is get image requests to queue up with each other / text requests
It's the holiday season, and a new season started in this game I play (Diablo 2 mod called Median XL) so could take a lil' bit
Probably no chance D2RA would work with that I assume :/
If you are a diablo 2 fan, then you'll be blown away by Median XL
I came across it 3 years ago and, at the time, I was shocked to know a team of people were actively updating it for like 15 years or something.
Since then that dedicated team has pushed huge updates every 2-4 months with ladder resets. It's mindblowing
Can fooocus be used with the discord API?
I have been testing out a ryzen 5 2600 + RTX 2080 super 8GB for my SDXL server, and it's going over much better than I thought. So I'm trying to make it work how I like it.
And then upgrade my current setu to x3 RTX 3060 12gb's for my chat bot.
I think I can just work in the a1111, and get it how I like though. I was just wondering.
I'll have to look into it... at some point
It's not a matter of if it can be used with Discord, it's a matter of whether I can make the bot script compatible
Yeah it's just some settings I'm not getting to work right with 8GB cards with A1111. 3 8GB cards tested, and it either runs out of vram, or setting --medvram gives garbage images and then crashes on the second image..
I might just not be understanding the settings for sdxl in A1111. Fooocus just works right out of the box for all 3 cards GTX 1070 8gb, 1070 8gb, and this RTX 2080Super 8gb
I'm not even sure what Fooocus has for api though
--medvram shouldn't affect the image quality though? I use medvram
pretty sure it just increases generation time
maybe try --lowvram really
I'm going to start over, try again fresh git clone of a1111
I'm in process of debugging an error I encountered... error after using /speak command, then using "draw..."
ugh. Couldn't find an immediate solution... maybe tomorrow.
I think I got it to work now with A1111. I was missing vae fix, and some additional settings, and missing --medvram-sdxl command, and the google-perftools
Now 1024x1024 images using juggernaut sdxl model is running 6.5GB vram
and working good.,
I'll test out the discord bot with it and see how it goes as well.
Yes I'm horrendous for typos. Might be my keyboard usually a space or a t missing.
Trying something right now, let you know how it goes
Nice output ๐๐ป
I just pushed an update to resolve some issues
I know that's a bit vague - it's a very significant update
Thanks yeah we're now all set up on the fp16 Juggernaut v7 with vae fix model. Seems to work well. I just need to set maybe to 60 steps, but everyone is having fun taking turns testing the discord bots image making.
Going to mess around a bit with imgtags I think it is. Create a quick 30 step default, and a quality 70 step options
I git puled, and promting theAI to draw a picture for me works again. I also figuredout how to add a default 30 step, and a detailed 70 steps wiht the same model so that's all set now and working.
Nice
Hmm, so after switching imgmodels to my detailed 70 step, and trying to do a second image is causing some issue with error:
Error updating channel topic: 403 Forbidden (error code: 50013): Missing Permissions
Updated imgmodel settings to: Detailed (70 Steps)
An error occurred: 'controlnet'
If I load it again, I can run a new image, but then I need to load it everytime
I ran into another issue using controlnet tonight, separate issue but probably same cause.
Iโll be fixing something tomorrow.
Sorry for the issue ๐
Hmmโฆ okay, thatโs actually different I think
Does your bot have permission to update the channel topic?
announce_imgmodels feature
I've readded the bot with admin rights to everything to test. So far nothing new.
The only thing I've noticed is either running imgmodel, or doing a /reset allows for a new picture.
I might remove the second imgmodel option and see if just running defaults doesn't stop the process.
So what is the process you follow that causes the error?
Is it when using /image command?
thanks for the bot, i finally got it working with a1111, do you happen to know how to fix " An error occurred: 'controlnet' " . It will generate the first image fine but any after that fail unless i restart bot.py
I've just made a few updates... testing them now...
oh awesome!
Is this using the /image command, or "draw __"
the /image command
I think I resolved this... pushing it now
you're awesome!
Go ahead and tell me if you run into the same issue ๐
I recently made some sweeping changes to the settings handling, and there's been a few hiccups since then
I personally haven't reproduced this exact issue... so I'm not sure if my changes fixed it or not
But I definitely solved another issue, with settings carrying over from one image request to the next
๐พ
hell yeah thanks a ton!
I was at a party wowing some peeps with the controlnet feature, then realized the controlnet was persisting for all future images
now here I am 1:37AM, can't sleep leaving this sort of bug unsquashed lol
lmao
enjoy, let me know if you run into any other issues
will do! ๐ซก
This issue should be resolved now, sorry for the error ๐
Thanks! Sorry I had to put my son to bed and.. Well as usual he finds a way to tired me out and pass out right next to him.
next update is going to clean up the handling of controlnet and reactor extensions...
Nice! That always bugged me
It was keeping the interaction open and eventually timing out - until I added a โinteraction.response.send_message()โ
I noticed my /imgmodel command wasnโt having the Interaction Failed issue, which is because chatGPT correctly included that syntax for the message send at the end
I'll steal that code for sure
Idea: Make the bot accumulate several messages and then make it reply (or not) at random times. Basically just following the chat.
I guess this needs a very good multi-character RP model though.
There is a โchance to replyโ behavior settingโฆ I have to look into whether or not the unreplied messages go into history (probably not)
Iโm going to add that. Good idea
It will probably work better if the example dialogue includes multiple user messages, and the character responding to previous messages
Yeah, it would also probably need a very specific context for it to know to be part of a chatbox
Though I'm guessing many people already do that for their Discord AI characters.
Pushed an update to add default controlnet / reactor settings in bot.py (they won't do anything if the extensions are disabled in config.py and also activated in some way (such as in /image command).
These extension args are not required in activesettings.yaml anymore.
Reactor support has been fixed, as I noticed it stopped working after a recent update.
I cannot for the life of me get the bot to join vc.
The voice channel is set correctly. The bot has perms to join vc. There's no join command to make it join. I'm in the voice channel when I start the bot.
Must be something I'm messing up, because I tried coqui and that didn't work either.
Well... I found the issue.
Related to a previous one I was having, too.
It's still just that I can't use any Kanji/Japanese in my yaml file or it'll cause decode errors.
Also, having an error when switching characters.
So after fucking with it for hours my only issue was that I can't put Japanese in my yaml file. As soon as I removed it, the bot joined and the tts is working.
Kinda sucks that I can't use it, because I had to remove information in Japanese about the character, but.
Dunno why character swapping isn't working for me at all now.
It seems like it may be because my example character is the same as my current character, if I have to guess based on reading the error.
are you changing characters too often? Discord has a 10 minute cooldown window
Nope. I just decided to test the command to see if it'd even work. I don't even see any characters I can change to.
There's no drop down/selection or anything like that after.
wouldnt be surprised if there was some problems with character encoding, even though it should all be utf8
that would be the first place I would look anyway
"your welcome"
Excellent large language model
Yeah it usually uses proper grammar so that threw me off honestly
It was working fine in your version regarding having Kanji in the yaml file without any errors after it was changed to utf8, but even with the encoding set to utf8 in this bot there's still an error for whatever reason
altoid did fix some bug I had with the character selection, maybe some other bug got introduced then
I removed the Kanji entirely to see if that's what was causing the vc joining to not work, and it was. No clue what's bricking the characters not working since I've removed it now.
maybe try stopping the script, letting the bot leave, then restart the script
By leave, do you mean go offline? So basically, restart it but just make sure the bot goes offline first? Or do you mean kicking the bot and then re inviting it to the server entirely
As usual my disclaimer if I say something extremely dumb is that I probably really need sleep by now since it's 5 am, but I really just wanted to get this working
Waited for it to go offline and then started it again.
Nope. As soon as I /character and then press enter since there are no other options, instant error.
What the hell lmao.
I coded it into the character's yaml file that its knows its creators name. It used to work with this bot previously, but now if the bot tries to type Hakumei it just breaks.
I didn't even type the name in Japanese in the yaml file, it's in plain English/romaji
I did have the conversation partner names in discord as a stopping string to brute force it into not hallucinating conversations, but that was "{name} :" not "{name}"
weird
it should be able to say the name of the person it's talking to either way
now that I think of it I guess it should have been "\n{name}: " just to be on the safe side
Well my brain isn't functioning anymore, time to knock out.
I have to be a dad for a bit, but weโll figure this out
The issue is likely because I retain all settings including character info to the activesettinga.yaml file. Something is probably getting borked when it saves that and reads it back
I did recently hardcode some stopping strings 
Which is the cause of this behavior here
Iโll figure out an elegant way to make that optional. And see if thereโs a setting I can tweak with the yaml formatting
The thing with the character no showing in the menu is bizarre, I repeatedly change to the same character constantly.
The 10 minute cooldown doesnโt apply when changing to same character
After scratching my head for a bit on the character menu error, I believe the character โnameโ key must be identical for both, and discord doesnโt want to assign same โvalueโ. I can resolve this by using the filename as the โvalueโ - it will probably allow duplicate names then
er no... the labels and values are derived from the filenames in /characters/ firectory, so it should not be possible for it to assign the same value to multiple menu options
...unless you have both a .json and a .yaml with the same filename...
I seem to have resolved the kanji thing
UPDATE
1. I recently added hardcoded stopping strings for the user's name and the character's name.
These are now optional, just include "name1" and/or "name2" in your stopping_strings. See example character "M1nty".
2. The bot can now load .json and .yaml character files. They can even have the same filename.
3. Kanji characters (and presumably other special characters) are now supported in character files.
I just woke up; when Merc mentioned the stopping strings I figured that's what was happening. I only glanced over the new {char} and /n (etc) stuff that current ooba and your bot are using.
I'll try everything immediately, when I actually get up. Gonna try & get more sleep.
๐
I deleted all my json files and only use yaml now.
That was a very unusual error so it wouldnโt surprise me if it isnโt resolved with the update
A thing to note: discord command options donโt update right awayโฆ they will refresh right away if you close and reopen your app (desktop app, phone app, etc)
Noted, will ctrl + r.
just pushed a small update...
-Removed a dev print() statement from bot.py
-Updated the suggested usage for the new stopping strings (now suggests "\nname1:" and "\nname2:")
it will replace name1 and name2 regardless of anything before/after it
Another update...
I noticed that it was still only accepting the old format convention for textgen custom settings (settings.json).
Now it will correctly load settings.yaml (or settings.json)
Updated everything, getting these two errors now.
Just when loading the script/after choosing the model.
I think something is not formatted correctly in the character file
Try wrapping the context with quotes, or check for anything else that may be missing a closing quote
That - trigger line looks suspiciousโฆ note that my bot does not yet have custom character-specific imgtags
(On the todo list)
I tried deleting the name and left it as just ' ' and it still returned the same error.
I copied everything else exactly as you have it in M1nty.yaml.
Scratch that.
Just noticed something.
Let me know ๐
I try everything I can think of to try before I say anything, so it might take a bit.
At this point I'm just gonna give you the yaml file and see if you can fix whatever I've done
Sounds good
I tried deleting everything after the context, (character description etc) and that didn't change anything; I still got the same errors. I removed the Reiko trigger but the error's still the same.
(I know certain things are repeated a lot, but it helped the bot retain it when asked as opposed to only having one instance of it in the file when testing previously)
Iโll take a look in a litle bit
I feel like I just gave my baby away
The stopping strings need to be nested under a state: key
Thereโs also a lot of keys after the โcontextโ key that I donโt know if textgenwebui even recognizes (character_description, creator, etc).
I recommend you try the character in textgenwebui interface with โverbose and you will see all the context/history/etc shown to the LLM
The example character for textgen only has name, greeting and context
One more thing - I think those keys after โpresetsโ (triggers etc) are indented further than they are supposed to be
No idea what this means, dunno how to do it.
I fixed it.
I now I need to fix my other character.
I somehow only just now noticed that things still weren't the same as in m1nty.
If it still returns the error I've been getting when changing characters after I update this one, I'll send the error in an image.
Alright, everything works now.
I just wasn't using the right file format & needed to fix my other character.
Thanks โค๏ธ
Now we just need whisper stt support ๐ถ
Iโll look into it ๐ค
There's already an extension for it in textgenwebui, so I'd imagine it's doable. I just personally wouldn't know where to begin. Also, since it records mic audio in textgenwebui when you enable it, it might be tricky to have it recognize speech live/without a recording. I have no idea.
Yeah I've been working with mantella extension for skyrim with AI NPC voicings, but that uses that xvasync, which I think does everything to text on the users end.
Idk how that works with actual tts stt extensions
For anyone using Alltalk_tts, if you get the deepspeed option installed, you can enable that via textgenwebui inerface (alltalk_tts github has screenshots showing how to get to the settings page).
If deepspeed is enabled via that settings page, it will always be activated including when in use with this bot
I noticed over the holiday weekend that the "auto-select imgmodels" feature, in mode "random" started changing to the same model over and over again.
Its supposed to remove the current imdmodel from the list so it doesn't select the same one again - however, it was modifying the main instance of the all_imgmodels dictionary rather than a copy of it.
Will push a fix shortly (need to test a bit more).
testing out alltalk + deepspeed + voice channel settings tonight
Deepspeed made the tts generation way faster. Definitely worth it.
Someone commented on it in this server previously, but it's strange that coqui/alltalk will randomly switch to a british accent for whatever reason after speaking for a bit.
I see it uses like 2GB vram?
Ah, yeah so everything's loaded correctly, but that extra 2GB vram is messing me up. I'll have to wait on it and install the new 3rd RTX 3060 12GB
I figured this would be the case for me x.x I'll just have to wait a week for the cable extension to come in for it.
Is there anyone actually using the /llmcontext, /llmstate and /behavior commands?
I have not used those. Still figuring out/image with CNET_input to see if I can have a denoising level of like 0.4 and come out with some img2img. So far nothing similar beyond background lines.
Youโre not getting good results with cnet?
I'll try some of them out and see how they perform.
Well I'm planning to axe them ๐
Ah, okay. Never mind then.
unless there's people actually using them
I just looked at them, and having different forms for specific types of conversation/tasks actually looks pretty cool.
It seems like a nice feature to have, but if it's just extra work to maintain with not enough people using it, then scrapping it is fine.
When I set up those commands, there was not char specific behaviors and states - and also no dynamic context feature.
Now, you can more or less switch things up by just using character / dyanimc context
Mm, makes sense. There doesn't seem to be a need for the extra commands with that in mind, then.
On a side note- have you ever tried the openchat model? I'm not sure if it's just how the model's responses are structed formatting wise conversationally or what, but. Its responses are... weird.
Havenโt tried openchat
I was always a fan of the airoboros models until mistral came around
Hm. I use openorca zephyr now. I've used others, and as far as generally accurate and current knowledge while also being uncensored goes- that seems to be the best for my use case.
Also just generally good at just holding a normal conversation.
Supposedly the openchat model is better than mistral & gpt3.5 turbo by far.
Based on all the videos I've watched etc.
But its text generation is... odd.
Iโll have to check it out!
If thereโs anyone who uses the /llmcontext, /llmstate and /behavior commands let me knowโฆ otherwise theyโre going the way of the dodo
The deed is done - those commands are axed
Pushed an update which removes 3 of the .yaml dict files, and adds one "dict_base_settings.yaml".
Here, you can configure a base layer of behavior, state, context, imgmodel* and imgtag* information (* coming soon).
This shouldn't affect anyone's current settings... this just makes it easier to set some general settings so you don't have to include a bunch of redundant settings in each character.
For instance if you want all characters to use alltalk_tts extension, you could put that info in the llmcontext > extensions portion of the base settings. It would then apply to all characters (unless they specify otherwise)
Update
New version of bot.py makes dict_base_settings.yaml work for everything including imgmodels and imgtags
This is a nice improvement for managing imgmodel settings. Maybe not as useful for imgtags, but that will change once I replace them outright with drumroll ... "tags"
Personally Iโm very excited about this update ๐ค
the bot seems to come with no requirements.txt, is there a way to install those?
The only thing needed is pip install discord
To join voice channels, it has one more requirementโฆ install instructions are on my github page
for me its missing basically all the requirements, like pyyaml, pydub, gradio, ...
Those all come with textgenwebui
Which is required to run it
Follow the install instructions and it will work ๐
does ooba install the requirements in a venv? else im a little lost on why its missing those..
Make sure bot.py is in the textgenwebui directory
Then make sure you use the cmd file from textgenwebui which activates the venv
Enjoy! Let me know if you have any other trouble or feedback
Be sure to look at the part How to update
works great so far. wasn't able to find it on the quick, but where would I be able to change the prompt template?
in dict_base_settings.yaml
Or you can do it per-character, using example character M1nty for reference
Any settings from the character / imgmodel command / etc will override ones in base settings. You can see currently active settings in activesettings.yaml
thank you! however i couldn't find where to specify the instruction format used. is it preset?
also it prints /n in the message instead of doing line breaks, is this a config issue?
I also noticed the /n issue yesterdayโฆ unsure why that started happening. Will fix it tonight
Iโm fairly certain templates are now in the ninji format only?
Preset can be โMidnight Enigmaโ etc
much appreciated!
oh, i was talking about these templates
that's probably part of the reason the \n issue is happening... as a temporary fix you could copy/paste the contents of the correct template into base settings file
The issue is likely that the template strings I have in there have (double backslash)n instead of \n.
I had copy/pasted those values from one of the modules... may not be correct syntax in my code.
Testing
that fixed it indeed!
Btw, the bot currently doesn't even support instruct mode ๐ค Need to look into that as well...
Yep, quick test I see that was the issue... my strings had double backslashes
Just pushed the fix
I've been trying to get some website or search extensions working last night, but nothing yet. I remember one of them was saying instruct or instruct-chat needed, but I couldn't get it to work right anyways. Just something I'm working on this week.
I'm going to clean up some duplicate code where message requests & image requests overlap, because the time has come... then I will figure out the best way to change modes
I've seen a few of those popping up recently on Reddit, have you tested a few in the webui? I'm interested in supporting the feature, would be nice to know what is the best one
A few are strange chrome-based, which is fine for windows users mostly. I've been trying to get just the 'LLM_Web_search' one to work as it's not chrome required, and uses duckduckgo.
There are other options I can try. This one I just spent a few hours to get it loaded fine, but there's just no calling it. All hallucinations
I might try to get lucid web search to work. I think it would just take me to work on the AI box directly, and not SSH'd from my laptop.
PSA: I see alltalk_tts just got an update
This is the extension I noticedโฆ you tried this one?
I seem to have broken my textgen, going to have to clone it again :/ I should really start making a backup
Geez, my error was my config.yaml file in models was causing errors. Cloning ooba, and moving the models folder was just causing the same error until I kept the new config.yaml x.x
Ah I suppose they changed the formatting or something
Every nowandthen
Ok so ooba and discord bot are latest, and I'll take a look at the settings for img thanks
Then once working, I really want to see if I can get one of those simplified search features working at least.
Ok so I actually got instruct mode set up a lot easier than I thought it would take
Update Bot now supports chat-instruct and instruct modes.
There is currently no command to switch modes, you'll have to put it in the settings (activesettings.yaml or char file).
From my quick testing everything works as expected. If anyone sees any issues let me know!
So I think the right thing to do at this point, is to expand the /character command to include mode, inst_template, cht_inst_prompt, grammar
Small update: dynamic labels for /imgmodel and /speak commands
Anyone here actually use chat-instruct mode? Do you save/load your prompt template in some way?
Hi i was investigating moving to this from oobabot but getting confused, is there an option to load the webui interface so can select the model using the webui. I have a 3 gpu system/sometimes switch models so would prefer to load it that way rather than the having to select a model when it loads, is that possible? Like some command python bot.py --api --listen --load webui or such?
Or if not is there a command to load the webui after so i can change it? When i run the command atm it doesnt seem to load the webui after.
I plan on adding a command to change llm model during runtime, maybe sooner than later
It wont be integrated with the webui interface, though
Thanks, is there a way to get the webui to load at least? Sorry being dumb but i can get the bot to work, but dont know address to access the webui
ahh so you cant use the webui with the bot? Or am i just missing some arg for it?
Canโt use the interface with the bot, unless youโre running two separate instances
If you can even do that ๐ I donโt know
Alright thanks shame yeah its a 70b model so cant run two instances lol. Guess ill stick with 7b if run this as well.
The bot does honor your custom settings defined in the native settings.yaml - you can also enter settings in activesettings.yaml for immediate effect, or add them to the character file and use /character
see example character M1nty for formatting that
Yeah thanks, i got the bot itself working. I just like to switch models/use the webui, i suppose if set args right will be able to get it to work with 70b and sillytav. I got the assistant working with a 13b model tested in discord. Still an option for a stable diffusion bot through thanks ๐
Let me know if you have any other questions! Iโll try and work in the model switching soon
Iโve got a big list of things to do ๐
Thanks, ive managed to get it fully working with command : python bot.py --api --listen --loader exllamav2_hf --model LoneStriker_lzlv_70b_fp16_hf-4.0bpw-h6-exl2-2 --gpu-split 13,0,24
Nevermind fixed it I think.
Do you think it would be possible to make a bat file rather than have to use command prompt then paste command to make this work on windows?
Do you mean to run the discord bot? I made mine into a bat file that I always use to run it.
Yeah I have :
@echo off
python C:\Users\wuff\AI\text-generation-webui-main\bot.py --api --listen --loader exllamav2_hf --model LoneStriker_lzlv_70b_fp16_hf-4.0bpw-h6-exl2-2 --gpu-split 13,0,24
pause
so far but then just errors out when trys to run import tourch
Hmm... I'm not sure if the gpu split will work because I haven't tried it, but I can copy & send what's in my bat file. Gimmie a minute.
Oh that command works in command prompt ill test it again to make sure
You'd just have to edit the flags that you need to start the bat with yourself & see what works.
cd /D "%~dp0"
set PATH=%PATH%;%SystemRoot%\system32
echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniconda which can not be silently installed under a path with spaces. && goto end
@rem fix failed install when installing to a separate drive
set TMP=%cd%\installer_files
set TEMP=%cd%\installer_files
@rem deactivate existing conda envs as needed to avoid conflicts
(call conda deactivate && call conda deactivate && call conda deactivate) 2>nul
@rem config
set CONDA_ROOT_PREFIX=%cd%\installer_files\conda
set INSTALL_ENV_DIR=%cd%\installer_files\env
@rem environment isolation
set PYTHONNOUSERSITE=1
set PYTHONPATH=
set PYTHONHOME=
set "CUDA_PATH=%INSTALL_ENV_DIR%"
set "CUDA_HOME=%CUDA_PATH%"
@rem activate installer env
call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniconda hook not found. && goto end )
@rem enter commands
call python bot.py --loader exllamav2 --model-menu --extensions whisper_stt
echo Done!
cmd /k "%*"
:end
pause```
Just change what you need after call python bot.py
copy that and save it as whatever you want.bat, make sure you put the bat file in C:\Users\ (your user)\ (your folder location)\oobabooga_windows\text-generation-webui
Thank you very much that worked ^
Happy to help, cheers
Just need to figure out how to get minty to load now lol. But its working otherwise
oh wait i guess they would go in characters folder hmm
Yep
yus they working thanks now to see if can get stable working and all set. I assume it copys the 4096 context and stuff from ooba settings then?
Yep
I think oobabot has a "memory" of the last 7 messages, just curious how this is
Just standard chat historyโฆ probably about that many messages before things start slipping out of context
okays you have this setup good everything seems to work out of box lol once got that bat setup, still miss the webui but i suppose silly tavern setup right can replace most of that.
Ah, so it currently does not save history for messages it does not reply ti
nice ๐ yep that is the forte of the bot, making images
Ahh so it remember say something i said 3 messages ago or only from what reply to last message?
If you donโt set a โmainโ or you adjust the settings so it doesnโt always reply - it wouldnโt see messages it doesnโt immediately reply to
Ahh its set to main i know can use () will tell others that in the chat.
Itโs also quite easy to toggle that on/off
Still will play with it tomorrow lol that was a long night but got both yours and oobabot running for now, should make it easier to migrate
If you get into a heated convo ๐
Iโm probably going to get LLM model switching in tomorrowโฆ
is there a reason one can't use the webui? might be certain extentions that might be useful in that in future?
Really not sureโฆ note that I forked this awhile ago so thereโs still a few things I donโt 100% whatโs going on backend
Ahh right well still thanks for that, seems like you might be only guy still making bot stuff currently.
Iโm loving it ๐ Great canvas to paint ideas on
yeah im suprised too cause something like this handy for help bots and stuff id guess if programmed right, should be merged into the main program imo lol
If you get into the imgtags feature with a bunch of LORAs and have lrctrl extension, I wrote a thing that does a great job automatically crossfading multiple loras
That sounds a little way beyond me lol. I got the hardware to do some training but no clue how to lol.
I just finished the workstation today, had 68 gig vram with an a4000 but gonna send that back to save some cash lol.
Itโs just trigger words to add stuff to image payload, including loras if you download em
Lrctrl is an a1111 extension that improves native lora handling
So like if wanted a photo of a dog or something it would add tags for the breed and stuff I assume?
Itโs just anything you want it to arbitrarily add to the prompt/neg prompt
I'll mention it to my friend tomorrow that, im just the hardwre guy, he is one who would know about stuff like that.
Thereโs a lot of possibilities with the โdynamic context โ feature too, which can swap characters, apply custom instructions, manipulate history, all from a simple trigger word
anyway, hope you and your friends enjoy, Iโll accept any feedback
I'll link him to that tomorrow yeah might want to play with thanks.
I want to run a Mixtral model so badly. But I really need to upgrade my ram.
@civic bison and all:
Just pushed an update that adds a new command, /llmmodel - it processes model loading just the same as when the script initializes
Ordered more ram, gonna be able to do a lot more testing.
But I think from now on I'm gonna be running dolphin 2.7 mixtral once it gets here. Did some gguf testing with lm studio and it's better than any model I've used beforehand by far.
I'm in the process of upgrading my main AI to x3 rtx 3060 12GBs, and starting a more dev environment testing Box with x2 P40 24GB cards. Hopefully setupnbt the end up next week.
Damn. Nice. I only have a single 3090, but only 16gb ram. I have 64gb coming now.
I'm on mixtral v0.1 with my discord bot right now. Just fits 24GB vram with 22k context.
I think I'm just limited by dram, or I'm not using the right settings. Because idk how to get the bot to load with my 24gb vram. Not with exllamav2 at least.
I use 3.5bpw mixtral with 22k context tokens. Really all there is
Ah, I don't think I've tried the 3bit option with exllamav2.
It just barely fits 22.8GB
Not enough room to include alltalk for my discord bot. So I need to expand as well
Have you tried out dolphin 2.7?
Well... it literally just came out yesterday. But
Any dolphin mixtral?
Oh I have it on my list. I was very interested in it with the description of including a better training set for programming.
I need my discord bot Ecne, to assist with people on a game server, and to Also help me customize a different game's proprietary C++ style scripts.
But dolphin 3.0 hoping they perfect it, and doublecheck coding
Yeah I'm really looking forward to 3.0. Wanted to try out 2.7 to see if the general quality was there though. I only did simple tests since inference was slow, but it could make a working html page with css pretty well.
LMstudio with gguf at 4 bit loads for me with 2.7 if I offload 50 layers to gpu.
I didn't get to see or test how well it writes c++, but that's the only language I've been learning so hopefully it's good with that.
A lot of models mostly have python in their training data more than any other language though. So hopefully the cpp is good and extensive enough.
Kept saying ggml... meant to say gguf.
Itโs working in the webui not with the bot?
Won't work for me with either of them. Probably because I need to try 3bit.
The 4bit 128 act order one should fit based on filesize, so I'm thinking it might just be a dram issue. I'll know when my ram gets here.
Of course, the bot is bug-free ๐
where can i get the link for this
@calm rain could you pin the message above that links to the github? Or give me pinning permissions? ๐
tyvm
pinned the original post here, should set up a bot to automatically do that
Or give me pinning permissions? for some reason Pin and Delete Other People's Messages are one single boolean perm toggle in discord, so that'll only happen if/when we need more moderators here
i don't understand why discord works this way
Even if Pin was a separate permission, you can't assign roles/permissions to threads, only to their parent channel (the forum.)
So, right now, you would need a specialized bot or some custom command to allow thread-creators do something like that.
I had to stop using the bot for now was making my pc hitch while gaming for some reason, im going to test it again when get a second pc
Personally I stop the bot when gaming, then launch it again when I'm done ๐
I'm hopefully going to have t 2nd dedicated AI Desktop up and running tomorrow, and see how well that does, and also see if my Discord Server likes having 2 Discord AI Bots
Please report / request anything you find when 2 bots are interacting, I haven't tested any of those features personally ๐
Prep'd for tomorrow to upgrade and building. My main AI Going with x3 3060 12GBs, and a development second box with 1 P40 24GB for now. Going to test the speeds, and probably add a second P40 or at least my 1080ti 11GB just for testing.
My ram will get here on the 10th. Looking forward to testing gpt pilot with mixtral and seeing what I can make with it. I'll see if I can get it running with the bot, to test how it performs and what I can do with it.
She'll do
But I think 3 is the limit for this casr
My 2nd bot is going to have to wait. Cause no way it's going to fit the case I had picked out
My ram got here a day earlier than it was supposed to.
That aside, I tested one of Lonestriker's exllamav2 quants. LoneStriker/dolphin-2.7-mixtral-8x7b-3.75bpw-h6-exl2 Loads in ooba, but inference is super slow. (On my single 3090.) I'm tired, so I'll probably play with it more when I wake up, but maybe I just need a lower bpw and then token generation will be faster. Once I have a decent amount of tokens/s, I'll see how it runs with the bot.
Maybe if I lower the context size that'll improve performance as well.
I know something about Dolphin was trained on 16k it continuously says?? So maybe lower it to like 14k and see
Also the first quetion upon loading is usually like 5 t/s
Then, idk there's been some updates to things and see if upgrading requirements does any changes
Lowering it to 2048 made inference way faster. Now I might just need to use 3.0 bpw instead of 3.75 with 2048 and it should be fast enough for a chatbot.
4096 context using 3.0 bpw works great. Gonna text with the bot now.
That works for me even with alltalk.
It'd probably work better with instruct mode, but it's functional and fast either way.
Did you see that I added support for instruct mode?
I saw you mention it a while back, but didn't read into it any further.
Currently, you can either include it in your characterโs โstateโ keys - or set that parameter in activesettings
Or omit the parameter in activesettings but include it in basesettings.
mode: instruct
When you launch the bot it will find the instruct template from the model and apply it - otherwise it will use a template defined in activesettings/basesettings/character state etc
The cmd window will state everything
Good to know. Will try it out.
Is there a m1nty instruct example character template?
If not I'll try it out soon either way. Have some stuff to do for a while.
The ooba default instruct templates are in basesettings
Pushed an update to add the new textgen parameter keys regarding dynamic_temperature
(compatibility update)
I've noticed something I was wondering... So the Discord bot program has a 1980 character limit. If I ask it to summarize a script with 2300 characters, it just says bye.
If I reduce he script and ask it to summarize 1800 characters worth of a given script, it answers quite well..
Is there a way to increase this limit, or is there anything you can think of for Nitro 4000 character users? I was also wondering if I have Nitro, does my Bot program also get 4000 limit...
Or maybe I'm not understanding it right.
Honestly, I might just call it good enough cause it does work great asis, and just make my new box strictly textgenUI to ask it longer script questions and support.
When you send message over 1980 chars discord truncates the message? Or is the bot not accepting it?
Ah I seeโฆ discord does cut itโฆ well, maybe I could add a file upload option for prompting so you use a txt file
if you have nitro, discord cuts at 4000
Well txt file could then read > 4000 ๐ Iโll put this on the back burner
I already have plans to make a command similar to my /image function for more advanced text requests
Started working on the revamped "tags" feature... could still be a few days out. Will be extremely versatile and cut down quite a bit of clutter from config.py
@ altoiddealer maybe this is usefull for you: https://github.com/oobabooga/text-generation-webui/wiki/01-โ-Chat-Tab#chat-style . I experiment with following pattern: [ ###instruction: This is an erotic adventure game, and your task is to write a reply in name of "<|character|>" where 3 options are given for the user to then choose from, make a sequel out of the material in input [ ** ] ###input: One afternoon they both discover Silvia and Chela hiding behind the hotel building, where there is a mysterious pavilion - a favorite walking route of the older Indian women on the team... ###response: ] (I did it in German, here is an poorly Google-translation only to show the pattern to explore that. ) I did not find the description from ooba for this. the place to insert it is : Parameters Tab> instruction Template > scroll down to > Command for chat-instruct mode (stay alert NOT to delete the <|prompt|> there. Also be sure >chat Tab>down to >mode > 'chat-instruct' is chosen. // [**] you experiment with complex instructions // if the ###response: answer turns to repeat the same, I set up a new chat and give some last stuff from the last conversation in the input , to have some continuity , make good times cordially Petite Epona
I don't use the UI much, was wondering if people are using some method to quickly change chat-instruct prompts, aside from editing the chat-instruct field
for me that field is very helpful to discover more komplex instructions, als I'm absolut beginner in this stuff . Was hoping to learn from You
๐ and to give some help
Well, I did add support for this recently - just copy/paste your prompt into the chat-instruct parameter in activesettings.yaml and change the mode to chat-instruct
works exactly the same as in the UI
What is on my to-do list is a means to easily change that without having to reload the script
or change characters, etc
Pushed an update to add the new textgen-webui key, prompt_lookup_num_tokens
Note that I had issues running latest textgenwebui with alltalk_tts 1.8 - I updated to 1.9 and it works again
Finally finished upgrading my main bot to x3 RTX 3060 12GB's
So back in business working on Mixtral, and adding in tts, additional features.
Next push has been delayed as Iโve been too busy gaming, but will be soon
Only thing I'll be looking into I think actually with my 2 boxes plus my laptop with basic Mistral, is setting up OpenAI API for the two boxes, while maintaining the Discord bot as well if possible. Trying to do so my 2 people using him to slightly develop some python tools, and use my 3 boxes in autogen studios (1 local, and 2 OpenAI api'd in) to test agents.
I got Mixtral Dolphin 2.7 5BPW and Alltalk working with the upgrade... It's a tight fit geez
If I run ooba first, can I call bot.py on a seperate instance? I'e just been running lines for each AI as:
python bot.py --api --listen --loader exllamav2_hf --model turboderp_Mixtral-8x7B-instruct-exl2_3.5bpw --max_seq_len 22768 --cache_8bit --num_experts_per_token 2 --gpu-split 3,10,10
and:
python3 bot.py --api --listen --extension telegram_bot --loader llama.cpp --model Wizard-Vicuna-30B-Uncensored.Q4_K_M.gguf --max_seq_len 2048 --n-gpu-layers 61 --threads 8
Can I just run bot.py with ooba preloaded with the extensionsI want and api/listen?
Probably not. At some point Iโll look into changing it to use the API
Would be a pretty big code overhaul I think though
Iโm done with my game, had an amazing run on โhardcoreโ mode but finally ripโd. Development shall now resume ๐
There's another interesting feature I have in mind, after coming across this implementation here https://www.reddit.com/r/StableDiffusion/comments/19dfvf3/rpgdiffusionmaster_mastering_texttoimage/
This relies on using Multimodal LLMs, but my idea is to add some sort of workflow control where the first response from the LLM can be used as input for a subsequent text request, using another defined character/settings/etc... that response again being used as input... and so on, before you receive the final result. I need to think on how to cleanly add such a feature
Best way to explain is to look at the last image on the reddit post which diagrams how it works. My idea is for each step to be controlled by a different character card or instruction tailored for that step, I imagine the end result would be the same
user has simple input - bot comes up with very complex image prompt correctly formatted for regional prompting.
I see, so multiple LLM's, or would it be the same LLM with a different character assignment to get a different perspective?
I see the example was a large # of steps, thenbuilding the base image steps 1~20, assigning location boxes for each to give a detailed prompt for that location with 20~30 steps each, etc.
Which goes back to the whole theory that LLM's aren't bad, and people just aren't prompting them to their full potential. Interesting.
Same LLM - I believe a character card with just example dialogue of example inputs and desired replies, most models could understand... before revising scripts or anything I'd first make the character cards and try each step
I could be wrong ๐ Heck even if it does a shit job assigning regions, it would probably be good enough.
I have good faith in it making good prompts for each component though - its really the regional prompting assignments step that I'm unsure about
The way regional prompting works, is it only generates in the defined region for X steps, then goes to the next region for the next steps, etc.
So the four little images shows that the top left was done in 5 steps, top right after 5 more, and the bottom parts 10 steps each. The base prompt is applied over the entire image to help unify everything
There is a syntax to use with the A1111 regional prompting extension to define the regions and prompts - so the idea is to have the LLM focus on specific tasks to ultimately craft that final image payload to send to A1111
I'm making good progress on this 'tags' revamp...
that's less regional prompting and more multiprompted tiled generation
"regional prompting" as a concept does the same steps as normal and just sends different prompts to different areas (via mucking with SD's crossattention)
Maybe I described it a little wonky, but as you wrote it is as I intended
It's been awhile since I used that feature... as I remember it, it does not diffuse the entire image uniformly but each region sequentially
in any case, the end result is more or less the same for both concepts (whichever it actually is)
In their little preview images it shows at Step 5 only the top left region being mostly diffused, the rest partially diffused (base prompt partially diffusing everything). Then the top right has most attention... All the while, the base prompt keeps nudging everything to a finished product.
if your understanding of what words mean comes from what auto webui extensions do you gonna think some wildly wrong things lol
That's it, I'm going to look at the project page right now lol
Don't mean to talk out of my ass
(which to be fair is also partially my fault, my Dynamic Thresholding extension does like 50 things that are unrelated to dynthresh)
here's what regional prompting looks like in swarm (which is a zero-nonsense just latent couple split conditioning)
Ahhhh yes, I am indeed talking out my butt ๐
But yes - I see this RPG-DiffusionMaster thing and it makes me thing this idea could be duplicated in a series of LLM requests from the same model, to make the final A1111 payload
How to work the feature in elegantly so big dreamers could use it for other cases, that's where I'll be scratching my brain for a bit
Definitely can ye. rpg is very similar to a thing i tried before -- which was literally the above swarm screenshot, that prompt syntax that swarm supports for regional, i had an LLM generate that. Problem was the LLM was really really bad at picking regions if they're any more complex that just left|right|top|bottom
i tried for example to have it to two people on a bench, select regions for each person and the bench, and that's already beyond its limits
made worse by the fact that it's really hard to get good generations from 3 overlapping regions with unique objects even if you do it perfectly
i also tried have it generate separately and combine or inpaint but that rarely gets a reasonably coherent scene, eg if you generate a person it will never exactly fill the frame with the person, it'll zoom in on the face or zoom out really far or... asfgkags
(I wanted to be able to give an LLM one prompt and have it generate complex multi-object scenes in general)
Yes as I understand it, the RPG thing segments each step so one step it knows the subcomponents and just has to set regions, while others step(s) make the subprompts more verbose, another step maybe unifies, etc.
I'm thinking I could have a yaml dict where user can define workflows, and it will hijack the normal routine if one is activated
Activated by trigger phrase (I love these ๐ ), maybe a slash command if more on-the-fly settings seem necessary
I'm almost done with nice update ๐ช Put a lot of hours into this one.
The revamped tags feature is extremely versatile, unifies a lot of the existing features into a much more modular and easy to manage system
It's all good, just fine polishing things in hopes that no one has to migrate settings again a few days later ๐
this system is sweet... hard to contain my excitement on this
I'll also update the wiki in advance...
Squished all bugs that I could identify. Just going to try and add some appropriate print statements, update the wiki and push this thing
ughโฆ had to rush out the door and couldnโt push it in time. Wonโt have access until to the files until tomorrow.
I did update the wiki with information on the new Tags system. Believe it or not, all of the functionality does what it claims to.
A Discord Bot for chatting with Large Language Model (LLM) supported by text-generation-webui - altoiddealer/ad_discordbot
Wiki still needs some more infoโฆ
-There is a section to define a default value across all tags.
-There is a section to define presets. By including tag_preset_name in any tag, is the same as copy/pasting all of them.
Just pushed a quick update to fix error 'sampler_priority' - a new state key added recently in textgenwebui where you can optionally list the order sampling methods are applied
Another quick note to anyone reading my rambling here - the bot works just as well with "SD Forge", except the 'lrctl' extension is bugged in Forge so that feature is not working in the bot w/ Forge
I thought of an interesting 'tag' feature I might add in... after reading some thread about using an LLM to choose the most appropriate image model for a given prompt. I'm thinking I could add a 'description' key for each imgmodel in the dict_imgmodels.yaml.
Then, a tag match could trigger the feature... a request to the LLM with instruction containing the imgmodel list + descriptions, and Choose the most appropriate imgmodel for prompt: "{img_prompt}"
i was thinking about doing that same thing, albeit with loras and the option to select multiple
Ah, let the LLM pick the loras
I see you lurking- Have you peeked at this tag feature I added?
It's already triggering LORAs very reliably so long as they're predefined
The bot instance on my channel you have access to, is now giving some poor outputs when multiple LORAs are triggered...
Reason being, I switched that setup to sd-webui-forge which does not support loractrl. I have a feature that automatically detects lora syntax and applies loractl scaling.
My other bot (NSFW version) is still on A1111 so that feature is working well... got a crapton of loras defined there, and the images are good quality even if 5+ loras get triggered
I may have to implement another feature to simply modify values for multiple LORAs... without the fancy crossfading effects
oh, i hadn't seen that, that's really clever!
forge is, uh... the developer really likes starting fights and causing trouble more than he likes actually developing things
There's no doubt that he's brilliant, though. I'm very impressed with the speed and all.
According to the dev of the loractl extension, he commented that Forge is using really old lora handling code, though. May be part of the whole speed boost
if you like the speed of forge you'll love switching to comfy/swarm months ago lol
it looks like it's using something closer to the pre-1.5 A1111 implementation of loras - which this extension will specifically not work with, since it depends on the 1.5 rewrite of lora handling
Here's screenshot showing the config settings, the scaling results in the cmd window and how the insertions were handled in the image prompt
The scaling factors I have in place has the first LORA start at its full defined strength, then fade to 50% of its strength at the 40% mark in the generation.
Multiplies the scaling factors by the values matched in the loras. So its very dynamic
Really, its a testament to either how good Chat-GPT 3.5 is or how well I can prompt it, lol.
I understand all the code now and can just sit down and code stuff, but ChatGPT wrote vast majority of the code I've implemented
Booty shorts lora could have been stronger but still, pleasing results ๐
different loras should be weighted at different times - "booty shorts" is a structural concept that needs more weight early on and matters less later, vs eg a character's face is something that only matters in the final steps
I have so many ideas in my head... one was a means to assign priority to tags. Could be a solution here - otherwise could be solved by prompting it in reverse heh
priority is currently dictated by the order in which they were matched in the text (not the order they were iterated over)
hi: @halcyon quarry how would i do the command like this maybe? sudo ./start_linux.sh --gradio-auth useranem:mypassword --listen --listen-port 7860 --listen-host zero.talktoai.org --ssl-certfile=/etc/letsencrypt/live/zero.talktoai.org/fullchain.pem --ssl-keyfile=/etc/letsencrypt/live/zero.talktoai.org/privkey.pem --extension LLM_Web_search --extension text-generation-webui-stable_diffusion python bot.py --loader exllama --model NeuralBeagle14-7B-GGUF
For one... I haven't tested this in Linux, and I haven't received any feedback from anyone sayins specifically they used it on Linux. So may not work at all ๐
For starters, Id say try launching it simply... python bot.py --loader exllama --model NeuralBeagle14-7B-GGUF
maybe sudo if needed. But you dont execute native textgenwebui start batch file
Run cmd_linux.sh (activate the venv)
python is the command, is present in the venv
python bot.py --loader exllama --model NeuralBeagle14-7B-GGUF
this will run bot.py with the 2 flags
You can try adding the other flags all at once, or maybe incrementally. They are passed to the webui so they should all be honored
./start_linux.sh
You use start_linux.sh to launch the webui
But you don't use that, when running the bot.
You just run the bot. The bot handles launching the webui
i see will try thanks
Your textgen folder should look like this
bot.db will be created on first launch of the bot, it stores a few settings that need to be persistent ('main' channels, welcome message, etc)
gonna read docs a bit more i am noob, ty
My wiki isn't 100% up to date ๐ Some features are not well documented.
The Install / Update instructions are accurate though
Features ARE well documented as comments in config.py and the various dict files
I try my best ๐ค Updating wikis is boring though ๐
Pushed an update to maintain compatibility with ReActor extension (for anyone using that feature)
They just keep adding more and more key arguments
No... hmmm its been ages since I got my token... lemme look into that
In the Discord Developer Portal, in Applications
It is the "Bot" item... on that page is "USERNAME" and "TOKEN"
After that you go to OAuth2, check off the "bot" item
And select basically everything unless something seems totally out of scope to you. Copy paste the URL into your browser in order to invite the bot to your server
thanks for the reply, will check ๐
d'oh - realized my 'trumps' part of the tags feature isn't working... will fix in next update
I use Ubuntu for all my machines. Rightnow my command is:
python bot.py --api --listen --loader exllamav2_hf --model LoneStriker_dolphin-2.7-mixtral-8x7b-4.0bpw-h6-exl2 --max_seq_len 22768 --num_experts_per_token 2 --gpu-split 6,10,10
Although I haven't git pulled yet to see the changes. I've been messing with MoneyPrinter app, VSCode with continue extension with my new bot, and some autogen studio lately x.x busybusy.
Config.py is damn near 1/2 the size now. Imgtags is scrapped, and thereโs a broad universal system now called Tags
Sounds boss I'll have to give it a go after my son is asleep tonight
Now all the features that were activated by triggers, are matched in 2 searches total (pre-LLM and post-LLM), and only the relevant โtagsโ. Super efficient compared to previous
triggers not required eitherโฆ whatever the tag is will just be insta matched
Trying the bot again, appreciate all the updates you've made!
Not sure whether this is something on my end, but loading characters seem to be broken? The bot returns ```An error occurred while changing character: cannot unpack non-iterable NoneType object
This is the full error
while reading ad_discordbot/dict_base_settings.yaml: while scanning for the next token
found character '%' that cannot start any token
in "ad_discordbot/dict_base_settings.yaml", line 177, column 6 (Line: 401 in load_file, bot.py )
looks like a typo in settings yaml
Welcome back 
Pushed an update which fixes the Tag parameter 'trumps' (actually works now)
in config.py i dont know what to do where to add stuff etc, i am trying, wow 1 hour ago update @halcyon quarry i will not stop until i get it running lol yours if the most understandable for me so far
The bot should run fine with just the bot token, and maybe needing to modify the A1111 url if you changed the default port
i am running on my domain :7086
Once you create a discord bot (discord developer portal) and get your Token, and generate the invitation URL from 0Auth page
would be cooler to run on discord so will try without domain stuff
copy/paste that url into a browser, and you should get to a page where you can invite your bot to a server
nice done the bot bit on discord just need to edit that config file i think
Most of the default settings for everything are pretty sensible... some features need a channel ID to work. theres a comment on that in config.py
Imgmodel handling is "API method" by default, so you don't have to bother with dict_imgmodels unless you want to start customizing settings per imgmodel
to take advantage of most of the cool extra features, you modify dict_tags, or your characters using the example character M1nty for reference
base_settings.yaml is also relevent... this contains all the defauts that can be modified.
It's essentially a duplicate of the core settings in bot.py (which are not intended to be modified).
Settings defined anywhere else will have higher priority (in characters, imgmodels, etc)
thanks i think i should save this convo too lol
Lastly, my overly complex settings handling currently has it so changes in base_settings.yaml do not immediately go into effect. You need to change character (could be same one) or imgmodel, to commit those updates. Iโve been meaning to change this but it makes my head hurt thinking about it ๐
gonna give it a go till maybe 4am see what happens ๐
I moved the old folders, git cloned the new one, copied my tokens and alltalk+sdxl settings. All working so far.
Pushed small update to improve error handling when character not found
Actually, it turns out I was disilusioned - that error was already coming from the imported textgen function lol.
Chasing my tail here
Ok, now the appropriate message is right there and not buried a mile up the list
Even better! How exciting
Can anyone link me to virtually ANY Lora? (one that would work w/ 13b model or less).
I have an open issue on the github stating there is an issue loading LORAs with the bot, but I actually have no friggen clue where to find one for testing myself...
Ask me again in 6 months. It's still on my to-do list for mistral lora training with my mmo game data collection x.x
omg so cool open source thanks guys and @halcyon quarry
Pushed a neat update for some (at least for me ๐ค )
Enhancement for the ReActor extension integration.
https://github.com/Gourieff/sd-webui-reactor
The face_swap tag parameter previously accepted only an image filename (.png or .jpg or .txt in base64).
Now it may also be a directory (choose random image), or a .safetensors face model.
And just a quick FYI - any A1111 extensions that work via its API can be controlled by this bot (not just ReActor and Controlnet), using the 'payload' tag parameter. It would just be a bit verbose, but any payload params can be adjusted from tags including alwayson_scripts (A111 extension params)
Example... verbose way to set the parameters for ReActor
Of course some extensions wonโt function without input generated by the botโฆ open to suggestions for more extension integrations
I haven't tried yet. Whisper STT in voice channel. Is that doable?
I haven't looked into it yet, but from what I've read the extension wants a button to be pressed to activate the recording mode, pressed again to finish.
Sounds a bit tricky to simulate that... I imagine we'd want to keep the recording method active, but not send until a minimum value of text is captured and a trigger phrase, or X duration elapses after any text is captured, then process it and open up the listening again... need to look into that.
Sounds like a hassle yeah :/
I have many ideas to implement, just need to get around to that one ๐ May try that sooner than later
@halcyon quarry i have it all running nice but wondering about it set to use cpu only as it is only using 32% cpu on the main node, also hes running slow my ai agent but very clever, maybe i should leave the setting as he works really good just slow
How slow is slow? I have 3 each different models, hardware with various speeds of 25,7, and 0.5 t/s
ty, is there no command on the end i can add like --cpu-only or something?
Er, if you are using gguf model, could try testing different params
oh so when i run that i can go locally and use the web ui same time?
I donโt think you can use my bot with webui at same time
You can pass the params as arguments when launching the bot (โnlayers X, โthreads X, etc)
ah i see is that mentioned on the read me on github?
You can find the best params using the webui
Then just pass those when launching the bot
I'm starting to like GGUF with llamacpp more than exllama. Older Pascal cards work better with it.
oh you got any models i am using neural beagle 7b it is really clever best i have found so far
might leave as it is, it is so clever right now i dont want to mess with it ^_^
Also using same model now myself
It definitely is less shy with responses for nsfw prompts, and as you said clever in general
Pushed a quick update to add a 'random' parameter to the Tags system.
If 'random' is included (0.0 = 0% chance / 1.0 = 100% chance), it will ignore the tag if it fails an RNG check.
The more you use it, the more efficient the bot runs ๐
Next featureโฆ should be quite easy,,, a tag parameter for โllm_state_variationsโ to behave like the current img_param_variations
You specify an int or float range for whatever params, and it picks a value for each param
will finish it tomorrow... realized the img variances thing was a bit scuffed.
Also expanded the function to accept booleans like 'hr_enable:' true or 'hr_enable:' [true, false] (it will return true or false 50/50 for either syntax).
Also to choose a random string value from a list like 'some_param: ['somevalue1', 'anothervalue', 'whoa_anotherone']
params that are nested in subdictionaries will also work for param_variances
This would pick 1, 2 or 3 at random for clip skip
LLM param variances now working as well (ignore the thing I crossed off).
Pushed this update about the Param Variances
It's actually super cool, and I recommend everyone check it out deeper.
You can add all sorts of variation now, include picking random samplers, turning HR fix on/off, and so on and so forth
And as with all things, these can be defined in a tag preset, or per imgmodel, per character, etc.
Trying out this a1111 Forge. So far a noticable 10% it/s increase.
Only downside is does not support loractl extensions atm
Otherwise, yes everything else works with the bot same as A1111 ๐
From what I can see, the Forge team is working to make the loractrl functionality standard in their app
I guess I really fail at half of the image generation knowledge :/ I have a hard enough time figuring it out on my RTX 2080 super 8GB card
I feel like I exist on both ends of the spectrum. I'm a serious artist that likes to take the easiest way with the best results.
Too lazy to sit down and use loractl syntax, but ambitious enough to write a thing that'll do it for me automatically
Too lazy to write my own prompts, but keep building a thingymajig to do it for me better ๐
Hmm, also something different about this... Idk the generations seem less accurate on forge it's a weird anecdote.\
they may have different defaults
Pushed an update to allow as many 'tags' definitions as you want in config.py for the "API Method" of ImgModel handling
(such as multiple 'tag_preset_name' tags)
This might sound stupid but I swear I'm on my way to adding an "auto-prompter" feature, which will use a new dynamic prompting feature (similar to the A1111 extension).
correct? using cpu only right now: python bot.py --loader llama --model NeuralBeagle14-7B-GGUF --extension LLM_Web_search --auto-devices --cpu
bot is not using much cpu 35% max so far
Looks good - I need to look into that web search extension
Like I said before you could also try playing whackamole with some cpu params, there is a sweet spot with nlayers, threads n whatnot
Systematically try different combos soon enough youโll narrow in on the one with best tokens/sec
I haven't got a clue lol only thanks to you and others I am even able to run this stuff ๐ฅณ I don't know what other commands I could do to make the bot more premium.
read the notes ๐ค
Pushed an update that enhances the "Guess Imgmodel Data" for Imgmodels API method
Now the guess matching isn't limited to just 'filesize'.
'filter' and 'exclude' have been added to compare against the filename of the selected imgmodel.
This addition makes it possible to configure separate SDXL Turbo and SDXL 1.0 params when using the API method
I'm also doubling down on the whole Tags concept - the code samples now use tags for the payload params.
Listing the params still works (for now) but that is being deprecated.
config.py growing again ๐
Bloody hell... I need to walk this latest commit back a bit.
The /image command menus rely on the width and height params at minimum, and running tag matches for this would be super clunky
First 'bad commit' in awhile, man I was on a roll
Pushed an update to fix things.
Notably:
-The 'width' and 'height' are required to be called out separately from 'tags' in config.py, as well as dict_imgmodels.yaml
-The checkpoint name is required to be called out separately from 'tags' in dict_imgmodels.yaml (for YAML method)
Beyond that, I've updated the example settings to handle imgmodel params as I recommend. It is much easier to switch them around by using the tag presets.
oh my nice, i just updated i think it broke maybe you updates again and i need to update
line 39 config.py
ignore me it is ok now my mistake i think
I wouldn't be surprised if it was my mistake though ๐ But yeah line 39 is probably you ๐
Is there a way to load a character on launch? โcharacter doesnโt seem to do anything
Screenshot showing my dict_imgmodels.yaml (I prefer the YAML method).
And my dict_tags.yaml
The width and height in the 'tags' are redundant though... but this is a nice way to apply the settings, and have sensible values for param variances
The last character used is the one which will be loaded
my character auto loads it seems
If it fails to find the character (you changed the filename, etc), just use /character command which is populated by chars in the characters folder
it chooses my fav character zero everytime
i think your code has secret ai inside ^_^ premium
I've got many trigger based image LORA type stuff configured, but beyond that I'm running the same crap with some higher step counts
I work from two locations, I git pull myself constantly lol
You have that LLM_Web_search extension working? It works well?
not sure i have not got anything working properly besides your bot code and the main app, most likely down to me not knowing much but doing stuff anyways, i am doing this all for fun i love it i am sure most of you do too ^_^
i think it does not work
Thanks ๐ Still going to take a peak at it, could be very nice if it does what it claims to
yes you are pro you prob get it working fast, please let me know post here when you get time ๐
Here I am setting up my 2nd box Windows..This is not fun I miss my Ubuntu. Do you all use Windows for your AI needs?
Windows only guy here. I'd used Ubuntu once on a dedicated HTPC notetop for the performance edge, but it was brutal for me
Ok so the P40 + GTX 1080ti are both being seen in nvidia-smi and working with pytorch now without any errors.. Just going to see about getting it to work with a 5B Mixtral model :/ Windows works the same almost, it just looks soo foreign to me for such tasks.
linux mint, cant use windows pc only likes linux lost bios pass etc
INFO [2024-02-20 19:14:34]: Initializing in chat mode (Line: 899 in on_ready, bot.py )
INFO [2024-02-20 19:14:34]: Trying to load character "Coding AI"... (Line: 774 in load_chat, bot.py )
INFO [2024-02-20 19:14:34]: Initializing with character "Coding AI". Use "/character" for changing characters. (Line: 778 in load_chat, bot.py )
WARNING [2024-02-20 19:14:35]: ** No extension params for this character. Reloading extensions with initial values. ** (Line: 756 in update_extensions, bot.py )
19:14:35-009156 INFO Loading the extension "gallery"
INFO [2024-02-20 19:14:35]: Loading the extension "gallery" (Line: 33 in load_extensions, extensions.py )
INFO [2024-02-20 19:14:35]: Bot is ready (Line: 913 in on_ready, bot.py )
WARNING [2024-02-20 19:15:31]: ** No extension params for this character. Reloading extensions with initial values. ** (Line: 756 in update_extensions, bot.py )
19:15:31-485655 INFO Loading the extension "gallery"
INFO [2024-02-20 19:15:31]: Loading the extension "gallery" (Line: 33 in load_extensions, extensions.py )
ERROR [2024-02-20 19:15:32]: Error while changing character username or avatar: 400 Bad Request (error code: 50035): Invalid Form Body
In username: Too many users have this username, please try another. (Line: 470 in update_client_profile, bot.py )
INFO [2024-02-20 19:15:32]: Loaded new character: "Zero". (Line: 2133 in callback, bot.py )
it wont load my character zero for some reason
Frankly, I'm not sure why it let you ever load it with a super popular name
The error is because bot names are registered as usernames, and discord limits the number of users with the same exact username
oh ok i will change thanks i was lost lol
Yeah my Ecne_Bot and Ogma_Bot
At least they respond without the bot part
Pushed a small-ish update
Since before the dawn of time, there was a feature in this bot where a message about the time was arbitrarily added before every prompt.
Later, I made it configurable but it was still clunky.
Tags... again, ported it to this but it was still clunky.
Now, just write {time} anywhere and the time will be swapped in.
If you want it before every message, use the 'instruct' tag... for now.
- instruct: 'it is now {time}.\n{}'
I noticed the LLM response canโt trigger an image response using Tags. Thatโs the next item on the list, and will try to make those processes more flexibleโฆ
My 2nd box is finally finished with ad_discord bot working with command:
python bot.py --api --listen --loader llama.cpp --model dolphin-2.7-mixtral-8x7b.Q4_K_M.gguf --n_ctx 20000 --n-gpu-layers 90 --threads 8 --tensor_split 19,9 --numa --row_split
It was interesting to try to figure out since he's all Pascal GPU...
9 t/s on Pascal vs. 25 t/s on my ampere version
How much vram?
I haven't tried running any mixtral models yet, I probably should try...
lmao
My ampere model with Ecne uses command:
python bot.py --api --listen --loader exllamav2_hf --model LoneStriker_dolphin-2.7-mixtral-8x7b-4.0bpw-h6-exl2 --max_seq_len 22768 --num_experts_per_token 2 --gpu-split 6,10,10
With alltalk working.
Ogma, my Pascal model uses command:
python bot.py --api --listen --loader llama.cpp --model dolphin-2.7-mixtral-8x7b.Q4_K_M.gguf --n_ctx 20000 --n-gpu-layers 90 --threads 8 --tensor_split 19,9 --numa --row_split
And reaches..:
So that's about 30GB for 4Bit Mixtral ?
the GGUF model shows it's more like 4.56 Bit
I won't be testing Mixtral ๐ค with my pleb 4070ti
It's been quite the little venture to setup yeah :/
fixed Ogma, Dolphin is based on 16k context, and I tink having it to 20k was causing issues? Reducing it to 16k seems to have fixed the crazy maybe
I need to start from scratch for the Discord bot for this second one. It's still doing the repeated text after 2nd prompt. VSCode 'continue' extension is working good for coding with at least with the openai api on ooba.
Have you used this bot for coding at all? just wondering because it is capable of outputting code very nicely
Well, as best as possible given the 2000 character message limit. It has a very good message chunking function... which finds the best places to split lines, and looks for discord code markdown in order to correctly reformat any split chunks
So, Ecne as Mixtral model under your discord bot program
He has been used for coding assisting in rAthena decently from my 2 devs. Using the /cont option helps alot with their requirements. Usually just helping with an example NPC script, and asking it to write a new NPC following the format, or events/mobs and such.
The /cont function was bugged when I picked up this bot, I also use it from time to time
I use Ecne at work alot with just simple python scripts. I'm part cyber security, and handle alot of website issues. I've had Ecne build me a number of free python scripts for simplified repeaters, scrap, SQL checks, etc.
Telegram was worthless unfortunately. Discord, the way it handles the text definitely helps with minor coding.
Did a quick google on what Ecne is - my head is spinning after 5 seconds of reading
