Kilvoctu / aiyabot

A neat Discord bot for AUTOMATIC1111's Web UI
GNU General Public License v2.0
309 stars 76 forks source link

A1111 v1.6.0 - Samplers > 25 #212

Closed wizz13150 closed 10 months ago

wizz13150 commented 1 year ago

Hey,

I think it's legit to open an Issue for this, for an official and proper fix.

((:

Discussed in https://github.com/Kilvoctu/aiyabot/discussions/211

Originally posted by **wizz13150** September 4, 2023 Hey, there is too many Samplers in the last update. Causing a 'choices >25' error at launch of the bot. Not sure which samplers should be ignored, so i just added this in `settings.py` : ![image](https://github.com/Kilvoctu/aiyabot/assets/22177081/557d3e4b-6feb-487e-a20c-8f5ae7680e41) An existing bot will be 'fine', But this error also prevents the synchronization of commands, so it's **blocking** for fresh installations or modifications. Annoying. Maybe this should be in Issue 🤔 Cheers ! 🥂
wizz13150 commented 1 year ago

Log DEBUG level for discord :

blablabla

{"name":"sampler","description":"Set default sampler for the channel","type":3,"required":false,"choices":[{"name":"DPM++ 2M Karras","value":"DPM++ 2M Karras"},{"name":"DPM++ SDE Karras","value":"DPM++ SDE Karras"},{"name":"DPM++ 2M SDE Exponential","value":"DPM++ 2M SDE Exponential"},{"name":"DPM++ 2M SDE Karras","value":"DPM++ 2M SDE Karras"},{"name":"Euler a","value":"Euler a"},{"name":"Euler","value":"Euler"},{"name":"LMS","value":"LMS"},{"name":"Heun","value":"Heun"},{"name":"DPM2","value":"DPM2"},{"name":"DPM2 a","value":"DPM2 a"},{"name":"DPM++ 2S a","value":"DPM++ 2S a"},{"name":"DPM++ 2M","value":"DPM++ 2M"},{"name":"DPM++ SDE","value":"DPM++ SDE"},{"name":"DPM++ 2M SDE","value":"DPM++ 2M SDE"},{"name":"DPM++ 2M SDE Heun","value":"DPM++ 2M SDE Heun"},{"name":"DPM++ 2M SDE Heun Karras","value":"DPM++ 2M SDE Heun Karras"},{"name":"DPM++ 2M SDE Heun Exponential","value":"DPM++ 2M SDE Heun Exponential"},{"name":"DPM++ 3M SDE","value":"DPM++ 3M SDE"},{"name":"DPM++ 3M SDE Karras","value":"DPM++ 3M SDE Karras"},{"name":"DPM++ 3M SDE Exponential","value":"DPM++ 3M SDE Exponential"},{"name":"DPM fast","value":"DPM fast"},{"name":"DPM adaptive","value":"DPM adaptive"},{"name":"LMS Karras","value":"LMS Karras"},{"name":"DPM2 Karras","value":"DPM2 Karras"},{"name":"DPM2 a Karras","value":"DPM2 a Karras"},{"name":"DPM++ 2S a Karras","value":"DPM++ 2S a Karras"},{"name":"Restart","value":"Restart"},{"name":"DDIM","value":"DDIM"},{"name":"PLMS","value":"PLMS"},{"name":"UniPC","value":"UniPC"}],

blablabla

( 30 samplers, i did count lol )

solareon commented 1 year ago

This is a discord api limitation. You are only allowed to present up to 25 options in a menu, 25 buttons, 25 attachments, etc. Anything more requires pagination in some fashion.

wizz13150 commented 1 year ago

Yeah, but we're talking about a fresh installation of the bot, not allowing to sync commands, therefore no commands available when on, and no way to create/sync/use the commands in discord. Using the v1.6+ releases of the webui, tho.

The bot is broken atm, cause of the webui update introducing new samplers. ((:

I noticed the error, but also noticed no impact on the bot. So I closed my eyes for a while. Then i was touching the code to add some options to /generate, and waited way too long for them to appears. I finished in this debug line above and settings.py, from a DEBUG logging of the bot.

Not sure what would be a good approach for this, cause some users may want the most useless samplers, at some point, so... Here I am lol

My [:25] fix is fine for me cause i don't really care, just using a few, i'm functionnal.

Edit: Yeah, i should add that I said to a friend to help me for a /minigame command. It was impossible for him to install the webui 1.6.0 and to get the bot functionnal. Until I found this.