LostRuins / lite.koboldai.net

A zero dependency web UI for any LLM backend, including KoboldCpp, OpenAI and AI Horde
GNU Affero General Public License v3.0
81 stars 43 forks source link

"Throbber" (loading spinner) when generating a new message in the "Edit" view "sticks" to up/right/down/left #19

Closed NintendoManiac64 closed 1 year ago

NintendoManiac64 commented 1 year ago

Tested in Pale Moon 32.1.1 and 32.2.0 as well as LibreWolf 112.0.2-1 on Linux Mint (occurs on both Xfce 20.3 and Cinnamon 21.1).

The throbber (loading spinner) used to spin evenly and smoothly. However, since a week (?) ago, it now "sticks" to up/right/down/left, making for a very jerky appearance.

I suppose it's possible that this is an intentional design change but, to be honest, I find the new design more distracting and annoying.

If you're not seeing this on your side then I can record a short video showing it and then compare it to a traditional "smooth" spinning throbber (there's one right on this very Github page when javascript is disabled).

LostRuins commented 1 year ago

Yes this is intentional. Some users have complained that the constant spin animation was slowing down their PC, so I changed it to an animation that doesn't run constantly. Although maybe I should just change it to a gif or something

NintendoManiac64 commented 1 year ago

Maybe this would be one of the perfect use-cases for the rarely-talked about animated PNG format? The main benefit for this use-case is that it supports alpha transparency which is presumably the main reason you didn't use a GIF or the like (though APNG also supports a full 16bit-per-channel color depth).

(fun fact: throbbers with alpha transparency was actually one of the main reasons Mozilla invented the APNG format back in the late 2000s, because the throbbers in Firefox at the time lacked alpha transparency)

APNG also has the neat function to fall-back to the first frame if the viewer only supports non-animated PNGs which, for a throbber, is a decent option since its intended meaning is still moderately conveyed even without animation.

If you need it, my go-to software for making APNGs for over a decade now is APNG Assembler (it even works in Wine!):

 

Unimportant tangent / half-rant

More people don't know about the format because it was hampered by developer politics (tl;dr: Mozilla wanted APNG, Google wanted animated WebP - something not dissimilar to the current JPEG-XL vs AVIF situation, though that's more server and/or offline image devs vs web browser devs...which is a bit weird considering JXL's fancy progressive decoding) causing interest and support to wane until Apple chose APNG as the basis of iMessage's "stickers" but, by that point, the combination of smart phones, tablets, and social media caused GIF to get a "second wind" in popularity that, this time, has stuck and turned it into "MP3 MKII" (AKA even though newer and better formats existed, less tech-savvy users only knew of the old standard causing it to become even more entrenched).

...though, now that both APNG and WebP have widespread browser support, I suppose either format would work? I do recall that animated WebP had notably worse support than non-animated WebP at one point, but I don't think that's still the case? Just... don't use GIF, pretty please? (it's a bit of a sore spot for me if you couldn't tell... my only consolation is that GIF can't do HDR nor 3D so eventually it'll have to be superseded even by "normies" once holodecks are commonplace)

But, then again, animated WebP doesn't have the non-animated fallback benefit that APNG has, so...

LostRuins commented 1 year ago

Fixed, now has a nicer stop motion effect which is also processor friendly.