Kilvoctu / aiyabot

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

request - Usage tracker #105

Closed TimyIsCool closed 1 year ago

TimyIsCool commented 1 year ago

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

TimyIsCool commented 1 year ago

also unrelated (wanted to save opening up another issue) Im getting a Exceeded maximum of 1 images! This is the best I can do... how do i increase that to say 4? EDIT: Nvm found how to do this

Kilvoctu commented 1 year ago

These would be interesting things to have, but there are some problems which I think would cause some issues with implementing this feature 🤔 I'll go through each thing and give my thoughts.

GPU, CPU, and RAM usage along with temp and power draw tracker

AIYA is a separate app from Web UI, and I can't assume she'll be on the same machine as what's running Web UI. This means to me it's not practical to give her a native function to monitor machine stats, since she might be on separate machine. I also am not sure I want AIYA to be monitoring user's PC anyways.
The other method would be pulling these stats from Web UI, through the API. The issue is the API only provides the memory usage (at /sdapi/v1/memory); not much particularly useful.
So at this point, it may be more practical to have a dedicated PC stats bot that runs on same machine as Web UI. Something like https://github.com/3ddelano/pc-statbot, or maybe you can find a better one.

like in the 'playing' part or while its generating it shows somewhere

In the past I played around with updating the bot activity status thing. Well, Discord really doesn't like when bots are updating that every second or few seconds, lol.
So I think the next best place is the initial "wait for me" message. I'll look into this sometime to see if it can be done and is practical. I'll add the idea to #85 later.
A possible issue is that AIYA's queue is independent from Web UI's queue, so I'm not sure if I would be able to report on the correct task, and the stats provided by API endpoint /sdapi/v1/progress are a bit lacking.

showing the img say every 5 steps till its done

I like this feature, actually (I use it in Web UI). And I know for example, Midjourney bot does it, but AIYA will not do so. Two reasons:

So for me, I feel like the value of seeing a preview doesn't warrant a rewrite of foundational code and performance loss.