kilvoctu / aiyabot Goto Github PK
View Code? Open in Web Editor NEWA neat Discord bot for AUTOMATIC1111's Web UI
License: GNU General Public License v2.0
A neat Discord bot for AUTOMATIC1111's Web UI
License: GNU General Public License v2.0
After pulling the latest commit, the bot stucks at saving images' metadata.
Error message are as follows:
Traceback (most recent call last):
File "C:\Users\leo89\Desktop\aipaint\aiyabot\core\stablecog.py", line 239, in dream
metadata = json.dumps(response['info']).strip('"')
KeyError: 'info'
I have 2 models that I put in the bot. MJ4 and SD. If I load the model manually in the WebUI, and then run the discord /draw command, it works perfectly fine. If I try to switch the model using the discord bot, it says
txt2img failed Expecting value: line 1 column 1 (char 0) None
And the bot will refuse to work for a while, unless it is terminated and restarted.
Looking into the terminal, I see
JSONDecodeError when switching models, error in Line 1.
I'm fairly sure my models.csv is formatted correctly. Not sure what other problems could cause this error. Any thoughts?
My workflow is to generate images, and then to remix the result with a different prompt. Right now, I need to download the generated image and reupload it to use it as an init_image
; I'd like to be able to
init_image
with a new prompt.Let me know if you need any further information!
When using the ๐๏ธ button to edit an output image, if user sets the seed field to nothing, there will be an error. I forget what it said, but no matter.
I will fix this tomorrow. I think I'll have both "-1" and a blank field randomize the seed for ๐๏ธ. Don't want to break previous process, but also typing -1 is tedious to do.
Hello I want to add the model list to change by discord bot
but I got some error, when I edit the model.csv
below is the model.csv
display_name|model_full_name|activator_token
default||
SD1.5|v1-5-pruned.ckpt|
wd1.4|wd-1-4-anime_e2.ckpt|
anything4.5|anything-v4.5.ckpt|
and below is the error after the file change
Traceback (most recent call last):
File "F:\aiyabot\aiya.py", line 19, in <module
settings.files_check()
File "F:\aiyabot\core\settings.py", line 320, in files_check
populate_global_vars()
File "F:\aiyabot\core\settings.py", line 417, in populate_global_vars
if row[1].split(os.sep)[-1] == model['filename'].split(os.sep)[-1] \
IndexError: list index out of range
I changed the value already in all the files that my hands got to, but the choice was a maximum of 1024 and remained
Add support to use the user styles in styles.csv on the backend.
The API already makes it very easy to add a user-defined style to payload, e.g.
payload = {
"prompt": "puppy dog",
"steps": 10,
"styles": [
"Anime"
]
}
This will be a proper implementation of the experimental feature on this branch 2112e68
Problems to solve:
A possible solution for 2 is to have the styles
option require user to manually type in the style.
Then, I can make further use of the /tips command and Discord Buttons. /tips can have a 2nd page that provides a list of available styles.
Clunky, but it should work hypothetically.
https://docs.pycord.dev/en/stable/api.html#discord.AutocompleteContext
This could be a way to get around the 25 choice limit
Hey! With the new 768 model it could be really nice to have this feature :o
D:- Descargas\aiyabot-main>python -m venv venv
D:- Descargas\aiyabot-main>venv\Scripts\pip.exe install -r requirements.txt
Requirement already satisfied: py-cord in d:- descargas\aiyabot-main\venv\lib\site-packages (from -r requirements.txt (line 1)) (2.4.0)
Requirement already satisfied: python-dotenv in d:- descargas\aiyabot-main\venv\lib\site-packages (from -r requirements.txt (line 2)) (0.21.1)
Requirement already satisfied: requests in d:- descargas\aiyabot-main\venv\lib\site-packages (from -r requirements.txt (line 3)) (2.28.2)
Requirement already satisfied: Pillow in d:- descargas\aiyabot-main\venv\lib\site-packages (from -r requirements.txt (line 4)) (9.4.0)
Requirement already satisfied: tomlkit in d:- descargas\aiyabot-main\venv\lib\site-packages (from -r requirements.txt (line 5)) (0.11.6)
Requirement already satisfied: typing-extensions<5,>=4 in d:- descargas\aiyabot-main\venv\lib\site-packages (from py-cord->-r requirements.txt (line 1)) (4.4.0)
Requirement already satisfied: aiohttp<3.9.0,>=3.6.0 in d:- descargas\aiyabot-main\venv\lib\site-packages (from py-cord->-r requirements.txt (line 1)) (3.8.3)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in d:- descargas\aiyabot-main\venv\lib\site-packages (from requests->-r requirements.txt (line 3)) (1.26.14)
Requirement already satisfied: charset-normalizer<4,>=2 in d:- descargas\aiyabot-main\venv\lib\site-packages (from requests->-r requirements.txt (line 3)) (2.1.1)
Requirement already satisfied: idna<4,>=2.5 in d:- descargas\aiyabot-main\venv\lib\site-packages (from requests->-r requirements.txt (line 3)) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in d:- descargas\aiyabot-main\venv\lib\site-packages (from requests->-r requirements.txt (line 3)) (2022.12.7)
Requirement already satisfied: frozenlist>=1.1.1 in d:- descargas\aiyabot-main\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord->-r requirements.txt (line 1)) (1.3.3)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in d:- descargas\aiyabot-main\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord->-r requirements.txt (line 1)) (4.0.2)
Requirement already satisfied: yarl<2.0,>=1.0 in d:- descargas\aiyabot-main\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord->-r requirements.txt (line 1)) (1.8.2)
Requirement already satisfied: aiosignal>=1.1.2 in d:- descargas\aiyabot-main\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord->-r requirements.txt (line 1)) (1.3.1)
Requirement already satisfied: attrs>=17.3.0 in d:- descargas\aiyabot-main\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord->-r requirements.txt (line 1)) (22.2.0)
Requirement already satisfied: multidict<7.0,>=4.5 in d:- descargas\aiyabot-main\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord->-r requirements.txt (line 1)) (6.0.4)
[notice] A new release of pip available: 22.2.1 -> 23.0
[notice] To update, run: D:- Descargas\aiyabot-main\venv\Scripts\python.exe -m pip install --upgrade pip
D:- Descargas\aiyabot-main>venv\Scripts\python.exe aiya.py
Using URL: http://127.0.0.1:7860
Using outputs directory: outputs
[2023-02-11 15:52:09] INFO: Cleaning up tasks.
[2023-02-11 15:52:09] INFO: Closing the event loop.
[2023-02-11 15:52:09] ERROR: token must be of type str, not NoneType
Sorry if i need to give another type of information, is my first time opening an issue.
running the "latest" version
$ git show
commit 4c00670a66125ad51867fdeeef529dff47d3261f (HEAD -> main, origin/main, origin/HEAD)
Merge: 324f040 3354781
Author: Kilvoctu <[email protected]>
Date: Thu Nov 24 15:42:02 2022 -0600
Merge pull request #66 from Kilvoctu/add-facefix-to-upscale
Add facefix options to upscalecog
after generating some picture with bot via /draw I click on the randomize seed icon under the picture, the bot tries to load some default checkpoint it seems, which my A1111 does not have.
so the A1111 console throws "error":
Checkpoint not found; loading fallback modernDisney-v1.1.ckpt [c6303f9f]
after that the generation works fine, but stays on that model and when I change it back in the A1111 webui to sd1.5 and generate and then click on randomize, the problem repeats.
ps: when trying to select a model in the /draw request, it shows only "Default"
Traceback (most recent call last):
File "C:\Users\micha\Desktop\New folder (2)\venv\lib\site-packages\requests\models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\micha\Desktop\New folder (2)\aiya.py", line 19, in
settings.files_check()
File "C:\Users\micha\Desktop\New folder (2)\core\settings.py", line 211, in files_check
populate_global_vars()
File "C:\Users\micha\Desktop\New folder (2)\core\settings.py", line 243, in populate_global_vars
for s1 in r1.json():
File "C:\Users\micha\Desktop\New folder (2)\venv\lib\site-packages\requests\models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
AUTOMATIC1111/stable-diffusion-webui@40ff6db (extra networks UI) reworked how hypernetworks are used.
This has caused some issues for API usage, as the rework removed the parameter used to send hypernetwork to the API.
If you're already using Web UI, it seems you can update to current commit (AUTOMATIC1111/stable-diffusion-webui@f2eae61, right now) with no issues. I did so, and hypernetworks still work.
However, if using a fresh Web UI install, it will not include the settings needed for hypernetworks to function. In which case, AUTOMATIC1111/stable-diffusion-webui@e33cace is the commit right before this change, if you want to use hypernetworks.
is it possible to support textual inversion embeddings and hypernetworks? thanks
I don't know exactly which commit it started with, but if updating to a more recent commit of A1111 (currently 30b1bcc64e67ad50c5d3af3a6fe1bd1e9553f34e
), there is a bug in which the model will not swap under some conditions. This is a Web UI issue.
If models (checkpoints) are being cached and VAE files are being used, the model will not swap (it instead loads weights from the VAE). A workaround for now is either:
-don't cache models (set "Checkpoints to cache in RAM" to 0 in Web UI)
-don't use separate VAE files (set "SD VAE" to none
in Web UI)
Otherwise, AIYA should function like usual if anyone wants to update Web UI (to 30b1bcc64e67ad50c5d3af3a6fe1bd1e9553f34e
).
edit: Still an issue as of a1111 web ui commit ac085628540d0ec6a988fad93f5b8f2154209571
.
@philpax was trying to get the model switching working, but it seems whatever the webui is set to overrides the model selection in the discord bot!
How to replicate: Set one model in the webui, try to prompt with another model with the discord bot
Traceback (most recent call last):
File "Y:\stablediff\aiyabot_test\subtest\core\stablecog.py", line 231, in dream
s.post(URL + '/login', data=login_payload)
File "Y:\stablediff\aiyabot_test\subtest\pydata\lib\site-packages\requests\sessions.py", line 635, in post
return self.request("POST", url, data=data, json=json, **kwargs)
File "Y:\stablediff\aiyabot_test\subtest\pydata\lib\site-packages\requests\sessions.py", line 573, in request
prep = self.prepare_request(req)
File "Y:\stablediff\aiyabot_test\subtest\pydata\lib\site-packages\requests\sessions.py", line 484, in prepare_request
p.prepare(
File "Y:\stablediff\aiyabot_test\subtest\pydata\lib\site-packages\requests\models.py", line 368, in prepare
self.prepare_url(url, params)
File "Y:\stablediff\aiyabot_test\subtest\pydata\lib\site-packages\requests\models.py", line 439, in prepare_url
raise MissingSchema(
requests.exceptions.MissingSchema: Invalid URL '/login': No scheme supplied. Perhaps you meant http:///login?
I'm using WebUI with port forward so I could access the UI remotely, set up a password after the recently discovered RCE. I also wanted to share the computing powers with a bunch of friend via Discord. Could a login workaround be possible? Thanks a ton!
The web ui added authentication in this commit AUTOMATIC1111/stable-diffusion-webui@41e242b.
I think the usage for it is --api-auth user:pass
If anyone is using this argument, aiya will just get confused and fail at the first time we need to access the API. At least that's my best guess on what's happening.
Traceback (most recent call last):
File "D:\StableDiffusion\aiyabot-git\aiya.py", line 19, in <module>
settings.files_check()
File "D:\StableDiffusion\aiyabot-git\core\settings.py", line 166, in files_check
global_var.sampler_names.append(s1['name'])
TypeError: string indices must be integers
edit: I don't know how --api-auth
works ๐คทโโ๏ธ. It's just going to be unsupported by aiya, for now.
Hello!
I would love to try and use your bot but sadly i am running into a error when trying to launch the launch.bat
I think the requirements are already satisfied, the --api parameter is added, the SD-Web-UI is running and accessable by /config and /api
Bot token and credentials are present in the .env file.
Maybe someone can fix or help me what the problem is (iยดll copy the whole bunch in here):
`D:\AI-Painting\06_aiyabot>"D:\AI-Painting\06_aiyabot\venv\Scripts\Python.exe" launch.py
Requirement already satisfied: py-cord in d:\ai-painting\06_aiyabot\venv\lib\site-packages (from -r requirements.txt (line 1)) (2.2.2)
Requirement already satisfied: python-dotenv in d:\ai-painting\06_aiyabot\venv\lib\site-packages (from -r requirements.txt (line 2)) (0.21.0)
Requirement already satisfied: requests in d:\ai-painting\06_aiyabot\venv\lib\site-packages (from -r requirements.txt (line 3)) (2.28.1)
Requirement already satisfied: Pillow in d:\ai-painting\06_aiyabot\venv\lib\site-packages (from -r requirements.txt (line 4)) (9.3.0)
Requirement already satisfied: aiohttp<3.9.0,>=3.6.0 in d:\ai-painting\06_aiyabot\venv\lib\site-packages (from py-cord->-r requirements.txt (line 1)) (3.8.3)
Requirement already satisfied: charset-normalizer<3,>=2 in d:\ai-painting\06_aiyabot\venv\lib\site-packages (from requests->-r requirements.txt (line 3)) (2.1.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in d:\ai-painting\06_aiyabot\venv\lib\site-packages (from requests->-r requirements.txt (line 3)) (1.26.12)
Requirement already satisfied: certifi>=2017.4.17 in d:\ai-painting\06_aiyabot\venv\lib\site-packages (from requests->-r requirements.txt (line 3)) (2022.9.24)
Requirement already satisfied: idna<4,>=2.5 in d:\ai-painting\06_aiyabot\venv\lib\site-packages (from requests->-r requirements.txt (line 3)) (3.4)
Requirement already satisfied: attrs>=17.3.0 in d:\ai-painting\06_aiyabot\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord->-r requirements.txt (line 1)) (22.1.0)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in d:\ai-painting\06_aiyabot\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord->-r requirements.txt (line 1)) (4.0.2)
Requirement already satisfied: multidict<7.0,>=4.5 in d:\ai-painting\06_aiyabot\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord->-r requirements.txt (line 1)) (6.0.2)
Requirement already satisfied: frozenlist>=1.1.1 in d:\ai-painting\06_aiyabot\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord->-r requirements.txt (line 1)) (1.3.1)
Requirement already satisfied: aiosignal>=1.1.2 in d:\ai-painting\06_aiyabot\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord->-r requirements.txt (line 1)) (1.2.0)
Requirement already satisfied: yarl<2.0,>=1.0 in d:\ai-painting\06_aiyabot\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord->-r requirements.txt (line 1)) (1.8.1)
[notice] A new release of pip available: 22.2.2 -> 22.3
[notice] To update, run: D:\AI-Painting\06_aiyabot\venv\Scripts\python.exe -m pip install --upgrade pip
['aiohttp', 'aiosignal', 'async-timeout', 'attrs', 'certifi', 'charset-normalizer', 'frozenlist', 'idna', 'multidict', 'Pillow', 'py-cord', 'python-dotenv', 'requests', 'urllib3', 'yarl'] installed
[2022-11-02 09:55:27] WARNING: PyNaCl is not installed, voice will NOT be supported
Using URL: http://127.0.0.1:7860
Using outputs directory: outputs
Traceback (most recent call last):
File "D:\AI-Painting\06_aiyabot\launch.py", line 12, in
import aiya
File "D:\AI-Painting\06_aiyabot\aiya.py", line 20, in
settings.old_api_check()
File "D:\AI-Painting\06_aiyabot\core\settings.py", line 124, in old_api_check
for d in range(len(old_config["dependencies"])):
KeyError: 'dependencies'`
The bot is able to delete its generations in Discord servers, but not DMs.
It will throw this error
Traceback (most recent call last):
File "D:\StableDiffusion\aiyabot-git\venv\lib\site-packages\discord\client.py", line 377, in _run_event
await coro(*args, **kwargs)
File "D:\StableDiffusion\aiyabot-git\aiya.py", line 74, in on_raw_reaction_add
message = await self.get_channel(ctx.channel_id).fetch_message(ctx.message_id)
AttributeError: 'NoneType' object has no attribute 'fetch_message'
Some recent update to a1111 repo is causing metadata to be saved incorrectly now. I think it was AUTOMATIC1111/stable-diffusion-webui@db9ab1a. I need to update what key is read from the api response.
fresh install excluding .env
which sets a URL and discord token.
C:\sd\aiyabot>git show
commit 61331b72c85ec120c9c6111c7610739cddfceb50 (HEAD -> main, origin/main, origin/HEAD)
Merge: 04b68e8 9353f79
Author: Kilvoctu <[email protected]>
Date: Tue Nov 8 23:29:48 2022 -0600
Merge pull request #45 from Kilvoctu/model-activator-token
Option to provide preset model activation token
C:\sd\aiyabot>git status
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
C:\sd\aiyabot>.\launch.bat
C:\sd\aiyabot>python -m venv venv
C:\sd\aiyabot>venv\Scripts\pip.exe install -r requirements.txt
Requirement already satisfied: py-cord in c:\sd\aiyabot\venv\lib\site-packages (from -r requirements.txt (line 1)) (2.2.2)
Requirement already satisfied: python-dotenv in c:\sd\aiyabot\venv\lib\site-packages (from -r requirements.txt (line 2)) (0.21.0)
Requirement already satisfied: requests in c:\sd\aiyabot\venv\lib\site-packages (from -r requirements.txt (line 3)) (2.28.1)
Requirement already satisfied: Pillow in c:\sd\aiyabot\venv\lib\site-packages (from -r requirements.txt (line 4)) (9.3.0)
Requirement already satisfied: aiohttp<3.9.0,>=3.6.0 in c:\sd\aiyabot\venv\lib\site-packages (from py-cord->-r requirements.txt (line 1)) (3.8.3)
Requirement already satisfied: idna<4,>=2.5 in c:\sd\aiyabot\venv\lib\site-packages (from requests->-r requirements.txt (line 3)) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\sd\aiyabot\venv\lib\site-packages (from requests->-r requirements.txt (line 3)) (1.26.12)
Requirement already satisfied: certifi>=2017.4.17 in c:\sd\aiyabot\venv\lib\site-packages (from requests->-r requirements.txt (line 3)) (2022.9.24)
Requirement already satisfied: charset-normalizer<3,>=2 in c:\sd\aiyabot\venv\lib\site-packages (from requests->-r requirements.txt (line 3)) (2.1.1)
Requirement already satisfied: yarl<2.0,>=1.0 in c:\sd\aiyabot\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord->-r requirements.txt (line 1)) (1.8.1)
Requirement already satisfied: aiosignal>=1.1.2 in c:\sd\aiyabot\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord->-r requirements.txt (line 1)) (1.3.1)
Requirement already satisfied: attrs>=17.3.0 in c:\sd\aiyabot\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord->-r requirements.txt (line 1)) (22.1.0)
Requirement already satisfied: multidict<7.0,>=4.5 in c:\sd\aiyabot\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord->-r requirements.txt (line 1)) (6.0.2)
Requirement already satisfied: frozenlist>=1.1.1 in c:\sd\aiyabot\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord->-r requirements.txt (line 1)) (1.3.3)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in c:\sd\aiyabot\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord->-r requirements.txt (line 1)) (4.0.2)
[notice] A new release of pip available: 22.2.1 -> 22.3.1
[notice] To update, run: C:\sd\aiyabot\venv\Scripts\python.exe -m pip install --upgrade pip
C:\sd\aiyabot>venv\Scripts\python.exe aiya.py
[2022-11-09 21:03:37] WARNING: PyNaCl is not installed, voice will NOT be supported
Using URL: http://localhost:9595
Using outputs directory: outputs
Traceback (most recent call last):
File "C:\sd\aiyabot\aiya.py", line 19, in <module>
settings.files_check()
File "C:\sd\aiyabot\core\settings.py", line 134, in files_check
sampler = s1['name']
TypeError: string indices must be integers
Python 3.10.6
Windows 10 Pro, 21H1
Solution: ...this is apparently what a connection problem looks like. Remember to launch a1111 with --listen --api
etc...
Leaving the issue open - this needs a safety check to make sure it can talk to the api, and it needs to throw a reasonable error (ideally without immediately exiting when launched by double-clicking the .bat).
I installed the plugin in A1111 and it works, all nsfw content is blacked out.
Is it possible to make Aiyabot use it also?
EDIT: I tried adding built-in nsfw filter in discord, it filters my messages, but doesn't filter those coming from Aiya.
The issue:
The bot itself will break sometimes for no apparent reason. It will spew out "an invalid parameter was found" even though the prompt did not have anything changed in it, as well as the settings (From when the prompt was working).
Ignoring exception in command draw:
Traceback (most recent call last):
File "Y:\AI-GIT-CLONE\aiyabot\venv\lib\site-packages\discord\commands\core.py", line 124, in wrapped
ret = await coro(arg)
File "Y:\AI-GIT-CLONE\aiyabot\venv\lib\site-packages\discord\commands\core.py", line 978, in _invoke
await self.callback(self.cog, ctx, **kwargs)
File "Y:\AI-GIT-CLONE\aiyabot\core\stablecog.py", line 319, in dream_handler
await ctx.send_response(
File "Y:\AI-GIT-CLONE\aiyabot\venv\lib\site-packages\discord\interactions.py", line 825, in send_message
await self._locked_response(
File "Y:\AI-GIT-CLONE\aiyabot\venv\lib\site-packages\discord\interactions.py", line 1090, in _locked_response
await coro
File "Y:\AI-GIT-CLONE\aiyabot\venv\lib\site-packages\discord\webhook\async_.py", line 219, in request
raise NotFound(response, data)
discord.errors.NotFound: 404 Not Found (error code: 10062): Unknown interaction
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "Y:\AI-GIT-CLONE\aiyabot\venv\lib\site-packages\discord\bot.py", line 1114, in invoke_application_command
await ctx.command.invoke(ctx)
File "Y:\AI-GIT-CLONE\aiyabot\venv\lib\site-packages\discord\commands\core.py", line 375, in invoke
await injected(ctx)
File "Y:\AI-GIT-CLONE\aiyabot\venv\lib\site-packages\discord\commands\core.py", line 132, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: NotFound: 404 Not Found (error code: 10062): Unknown interaction
From the error, I'd guess it has something to do with my internet, but it still does not explain why the back msg goes through discord
Note, the code above appears in the command line, but sometimes, JUST SOMETIMES everything works. (The bot still spew out errors and says that app is unavailable, but the command goes through to the AI interface)
Windows 10 pro edition, git clone
I think this will require upstream work on the API (just looking at the FastAPI listing), but it would be nice to switch models so that you can use specific models for specific generation tasks. Not sure if it makes sense to make it a per-generation setting, or just a global setting that someone can change as required.
Hi, i was wondering if some sort of GPU, CPU, and RAM usage along with temp and power draw tracker would be nice, like in the 'playing' part or while its generating it shows somewhere, i would find it useful
also a 'cached in vram' (idk if it has a cached in vram or if it only loads one model into vram) and 'cached in ram' when looking at all models would be nice
EDIT: Also a it/s counter would be cool and maybe showing the img say every 5 steps till its done
Hey there! Would've put this in a GH discussion but those aren't enabled for forks by default.
Just wanted to say I appreciate you setting up a bot to work against a1111's UI - we (friends and I) can now collaborate like we do with Midjourney, and use the web UI when we need more control. This is a huge workflow improvement for us, thank you :)
Updated to newer commit of sd-webui and some reason autocomplete and /tips wont show the models in my list, just shows the last one.
It was working fine with the commit from two weeks ago
This is whats in my models.csv
display_name|model_full_name|activator_token
AnythingV3|Anything-V3.0.ckpt|
AbyssOrangeMix2|AbyssOrangeMix2.ckpt|
ProtoGenX3.4|ProtoGen_X3.4.ckpt|
BerryMix|berry_mix.ckpt|
SimpMaker3K3|SimpMaker 3k3.ckpt|
HDDream|HDDream.ckpt|
OpenJourney|openjourney-v2.ckpt|mdjrny-v4style
WildsMixv1|wildSMix_v1Alloround.ckpt|
EimisAnimeDiffusion|EimisAnimeDiffusion_1-0v.ckpt|
StablediffusionV1.5|v1-5-pruned-emaonly.ckpt|
ZombiMixV8|ZombiMix-v8.ckpt|
SeekArtMegav1|seekartmegav1.ckpt|
Regarding the comment from 8534a11#commitcomment-87409492
My issue
Request -- cyber_official#0001 -- Prompt: a giant egg
Ignoring exception in command draw:
Traceback (most recent call last):
File "Y:\stablediff\aiyabot\datadir\lib\site-packages\discord\commands\core.py", line 124, in wrapped
ret = await coro(arg)
File "Y:\stablediff\aiyabot\datadir\lib\site-packages\discord\commands\core.py", line 970, in _invoke
await self.callback(self.cog, ctx, **kwargs)
File "Y:\stablediff\aiyabot\core\stablecog.py", line 134, in dream_handler
PayloadFormatter.do_format(self, PayloadFormatter.PayloadFormat.TXT2IMG)
File "Y:\stablediff\aiyabot\core\PayloadFormatter.py", line 47, in do_format
dependenciesjson = responsestr["dependencies"]
KeyError: 'dependencies'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "Y:\stablediff\aiyabot\datadir\lib\site-packages\discord\bot.py", line 1088, in invoke_application_command
await ctx.command.invoke(ctx)
File "Y:\stablediff\aiyabot\datadir\lib\site-packages\discord\commands\core.py", line 374, in invoke
await injected(ctx)
File "Y:\stablediff\aiyabot\datadir\lib\site-packages\discord\commands\core.py", line 132, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: KeyError: 'dependencies'
I have tried to use the suggested commit, and bot still doesn't run
I am running into an issue in the latest version of Aiyabot.
After the image is generated by StableDiffusion, I get an error from Aiyabot and it doesn't post it to discord.
This has worked before on an earlier version of Aiyabot.. not sure what went wrong.
I am using the recommended git version of AUTOMATIC1111 that is mentioned in the Readme.
I am getting the following error
`
/draw prompt:test steps:30 height:512 width:512 guidance_scale:7.0 sampler:Euler a seed:2987020433 count:1
Traceback (most recent call last):
File "C:\AI-ART\aiyabot\aiyabot\core\stablecog.py", line 323, in dream
image = Image.open(io.BytesIO(base64.b64decode(image_base64.split(",",1)[1])))
IndexError: list index out of range
Request -- Kate#xxxx -- Prompt: test
/draw prompt:test steps:30 height:512 width:512 guidance_scale:7.0 sampler:Euler a seed:373217648 count:1
Traceback (most recent call last):
File "C:\AI-ART\aiyabot\aiyabot\core\stablecog.py", line 323, in dream
image = Image.open(io.BytesIO(base64.b64decode(image_base64.split(",",1)[1])))
IndexError: list index out of range
`
Hey there,
How can I set GfpGan with this?
Hello, can you please make a google colab with your repository? I tried to make it, but I lack the knowledge of python. Yesterday I updated python on colab and even managed to run launch.py and aiya.py at the same time, but nothing worked. Today I couldn't even do that. Please, I beg you, this will be very useful for people with an amd graphics card like me, or people who don't have a powerful enough graphics card to run stable diffusion. Thanks in advance
Think I broke this with commit d4ddc6e.
The code for populating the samplers and styles list occurs after the check for Web UI running. Even though aiya launches "normally" after getting a connection, that block of code doesn't seem to execute.
It appears that there is a problem with your image generation system when multiple users are trying to use it at the same time. When one user is already generating an image and another user starts a new one, it cancels the first user's generation and doesn't put it in a queue, resulting in a incomplete image.
I want to set up a single discord channel for stable diffusion generation which will have slow mode enabled, so the bot will not respond to prompts on any other channel, to keep things nicely organized.
I disallowed the bot to see/post channel content, but it still reacts to slash commands and will attempt to generate an image, failing to post a reply with an image due to 403. It should not even attempt to generate or reply "bear with me", just ignore, since it's not shown in the members list.
When trying to edit an image (๐๏ธ) using 50 steps (50 is max_steps) the bot will tell you that 50 steps is beyond the boundary (0-50) despite 50 being the upper limit.
viewhandler.py > Line 144
if 0 < int(line.split(':', 1)[1]) < max_steps:
Instead, should be:
if 0 < int(line.split(':', 1)[1]) <= max_steps:
This change seems to fixes the issue for me.
Describe the bug
On my machine it takes between 4-4.5sec to generate an image with 30 steps, and an additional 6-10sec for the bot to post it.
I have a 1000/50M internet connection. Is this a bug, a limitation of discord (it throttles all bot messages) or a config issue? I would think total bot overhead should be <1sec.
Any way I can troubleshoot this more to provide better breakdown of where the time is going?
My processor is Ryzen 9 5900x, PC was not doing any other tasks at the time, no running backups in the background etc.
Environment
The latest commit mentioned the fix of this issue, but I am still able to recreate the error on a fresh clone.
Have tried issue #2 's fix by ironing out the crlf, still no luck.
Any investigation is greatly appreciated!
Ignoring exception in command draw:
Traceback (most recent call last):
File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 124, in wrapped
ret = await coro(arg)
File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 970, in _invoke
await self.callback(self.cog, ctx, **kwargs)
File "C:\Users\\Desktop\aipaint\aiyabot\core\stablecog.py", line 141, in dream_handler
PayloadFormatter.do_format(self, PayloadFormatter.PayloadFormat.TXT2IMG)
File "C:\Users\\Desktop\aipaint\aiyabot\core\PayloadFormatter.py", line 54, in do_format
dependenciesjson = responsestr["dependencies"]
KeyError: 'dependencies'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 1088, in invoke_application_command
await ctx.command.invoke(ctx)
File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 374, in invoke
await injected(ctx)
File "C:\Users\\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 132, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: KeyError: 'dependencies'
I'm tired af at the moment so I'm not debugging it right now but here it is:
Traceback (most recent call last):
File "D:\githu\aiyabot-main\aiya.py", line 24, in <module>
self.load_extension('core.stablecog')
File "D:\githu\aiyabot-main\venv\lib\site-packages\discord\cog.py", line 893, in load_extension
self._load_from_module_spec(spec, name)
File "D:\githu\aiyabot-main\venv\lib\site-packages\discord\cog.py", line 760, in _load_from_module_spec
raise errors.ExtensionFailed(key, e) from e
discord.errors.ExtensionFailed: Extension 'core.stablecog' raised an error: TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
it is solved by setting .env DIR = outputs
Could you include a bash script in addition to the .bat so this can be easily run on a Linux machine?
Forgive me if its a fucky-wucky by me, I followed the install/use steps and its throwing this error
aiyabot-main\env\lib\site-packages\requests\sessions.py", line 792, in get_adapter
raise InvalidSchema(f"No connection adapters were found for {url!r}")
requests.exceptions.InvalidSchema: No connection adapters were found for '192.168.100.105:7860/login'
it is worth mentioning that 192.168.100.105:7860/login shows "Method Not Allowed"
It would be really great to have an ability to order the bot to delete a created image from the chat.
very important in cases when the created image has explicit content not allowed by TOS of discord.
Just a simple "note" when the bot is posting an image with the hint "react with X to delete created picture"
and under it the wanted reaction a user can click.
Have seen it working perfectly on another bot.
Like that:
A PR was merged on a1111 repo adding API endpoints for the Extras tab.
AUTOMATIC1111/stable-diffusion-webui@d5f31f1
Need to update later and look at that endpoint.
I don't use the Extras tab often, though the upscaler in it may be a nice feature to add to aiya.
The bot should both ping the user who made the request as well as reply to its original message where it confirms the request and lists the settings. This would make it easier to discern which prompt/options resulted in the image, for instance when sending many different prompts in the same channel.
Getting reports of an error with recent PR #81
Something like:
pen[3] = [k for k, v in settings.global_var.simple_model_pairs.items() if v == fixed_short][0]
an index error out of range
The root of this issue comes from my poor handling of the models.csv
Currently the preferred way to populate models.csv is "simple" way as added with PR #68 (details there); that is, no file extension nor hash
That said, I need to support each method of models.csv format.
Will look into this later
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.