Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat]: Replace CustomTkInter with PyQt6 #584

Open
Arcitec opened this issue Nov 23, 2024 · 3 comments
Open

[Feat]: Replace CustomTkInter with PyQt6 #584

Arcitec opened this issue Nov 23, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@Arcitec
Copy link
Contributor

Arcitec commented Nov 23, 2024

  • CustomTkInter is a buggy library by one solo dude who quit development in June 2023. It has major issues with UI scaling and extremely slow GUI rendering, lots of bugs and rendering glitches.
  • We have been talking about the need for a native rendering library that's faster and better.
  • PyQt6 has a very similar API and event loop, allowing us to keep our native rendering (no web UI, meaning no browser, meaning no GPU VRAM being wasted by the UI, and no complicated server/client architecture).
  • PyQt6 is a professional GUI library operated by a company that has existed for over 30 years and is well-funded. It's free for GPL-based software (and has a license fee for anyone else).
  • PyQt6 can be themed with custom color schemes and widget styles. There's lots of available themes. By default, it uses platform-appropriate themes which look completely native on Mac, Windows and Linux. But "app identity" themes can also be created.
  • PyQt6 includes tons of GUI widgets for everything we could want. Many professional applications are written in it.
  • It is well documented. There's a great, free e-book / documentation site at https://www.pythonguis.com/, and there's also tons of videos.
  • There's also something called PySide, which is another Qt library binding for Python, but available under LGPL license instead. People say it's almost a drop-in replacement, but that it has worse docs. It seems pointless to go for it since OneTrainer is a GPL project and can use the fully mature PyQt instead.
@Arcitec Arcitec added the enhancement New feature or request label Nov 23, 2024
@FurkanGozukara
Copy link

I would love GUI to move away from CustomTkInter . It is just this problematic on cloud ubuntu : https://youtu.be/hmu-7ycJ_E4

@ppbrown
Copy link

ppbrown commented Nov 24, 2024

Im not sure the problems are really the gui toolkit.
I use it remotely via VNC, and it is mostly fine.
I think its more that parts of the code are not written with an interactive GUI in mind.

For example, when doing prolonged caching, the GUI updates maybe once every 5 seconds.
I'm guessing thats more to do with the backend being single threaded rather than the GUI toolkit.

That being said.. migrating toolkit is typically a huge undertaking.
I'm not a OneTrainer dev, but I woudl guess only way that will happen is if someone stepped and submitted a huge PR to implement it.

@O-J1
Copy link
Collaborator

O-J1 commented Nov 24, 2024

Its a mixture of both, Furkan in my opinion somewhat abuses the host machine by running multiple UI instances of OT at once and since customtkinter is single threaded, 8 UIs brings it to a grinding halt.

Feats can be aspirational

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants