Kilvoctu / aiyabot

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

max_size wont go above 1024 #159

Closed fiveseven808 closed 1 year ago

fiveseven808 commented 1 year ago

I'm trying to set max_size to 2048 as that's the largest in the webui, and I need a higher resolution for my manual "hires fix" via img2img upscaling.

When I set config.toml's max_size to 2048, nothing in the bot changes, and I am unable to put a value higher than 1024, it complains about an invalid value.

Kilvoctu commented 1 year ago

Thanks for the bug report. This is indeed a bug 🤔 but it's not completely AIYA's fault lol The reason is Discord has a limit of 25 choices per option. Setting the max size to 2048 creates 30 choices (I counted), so Discord will not allow it.
I'll need to write some extra code in for this scenario to get around this limitation.

Kilvoctu commented 1 year ago

Heya, please pull the latest update https://github.com/Kilvoctu/aiyabot/commit/074d54e1bfc3f23c7d1f671eeaaa50cf599d7627 and see if it works for you.

Keep in mind Discord's 25 choices limit also applies to what's visible in the selection window (only 192 to 1728 will be visible). You'll need to type the number to search for values greater than that. image

fiveseven808 commented 1 year ago

There's an issue where the edit button no longer works. It brings up the dialog box to edit the image, but when you click submit it says things like

I can't redraw this! 2048 width is no good! These widths I can do. 1024 height is no good! These heights I can do.

Except when you copy and paste from the clipboard button, or even hit the dice/randomizer it works fine....

Unrelated, but auto1111 repo seems to have some sort of weird vram memory leak? after a while sometimes the generations will fail complaining about a CUDA out of memory error. Loading a different model, and loading the old one back in seems to fix the issue, but the bot just errors out with a

txt2img failed An invalid parameter was found!

Kilvoctu commented 1 year ago

There's an issue where the edit button no longer works.

I had to update the 🖋️ too to support large sizes. Please git pull the new update. It should work in theory, but I'm not able to test it as my PC literally cannot generate images that large. See if it works for you.

Unrelated, but auto1111 repo seems to have some sort of weird vram memory leak?

Please submit a new issue if this happens again.

fiveseven808 commented 1 year ago

The edit button works fine now! However, the clipboard button no longer works for me. I get the following error:

I may have been restarted. This button no longer works. You can get the image info from the context menu or /identify.

Kilvoctu commented 1 year ago

Please give the console log error.

fiveseven808 commented 1 year ago

The image info command broke: list index out of range The clipboard button broke: 'NoneType' object has no attribute 'respond'

Kilvoctu commented 1 year ago

As AIYA mentions on the end user message, buttons don't work after being restarted. If you want to id the image, use the other options.

fiveseven808 commented 1 year ago

No, this happens immediately after the image is generated. The bot has not been restarted.

To further prove my point, both the dice and the edit button still work, it is only the clipboard button that does not.

Kilvoctu commented 1 year ago

Does using the context menu option work?

fiveseven808 commented 1 year ago

I did not try it until now, but I get the following error when trying it: The image information is empty or unreadable!

Kilvoctu commented 1 year ago

After looking into it further, it appears to be something Discord did/broke recently. I created #161

Since it's not related to max_size issue, I will be closing this issue as resolved.