KoboldAI-Client icon indicating copy to clipboard operation
KoboldAI-Client copied to clipboard

Add a TUI frontend

Open nonetrix opened this issue 2 years ago • 7 comments
trafficstars

As KoboldAI can use a lot of RAM VRAM etc. It would be interesting if you could use it in a TUI mode since web browsers require a lot of RAM, this would also allow you to just run it in a TTY which is very minimal

nonetrix avatar Jan 15 '23 01:01 nonetrix

Also just a question, but could further optimizations be made? I remember being able only generate 512x512 on stable diffusion, but with more optimizations I am able to do 1024x1024 and even higher comfortably

nonetrix avatar Jan 15 '23 01:01 nonetrix

note: take a look at charm.sh for an kick ass TUI framework.

chris-aeviator avatar Feb 03 '23 04:02 chris-aeviator

KoboldAI isn't RAM/VRAM intensive because of the web server. A TUI mode would be cute, but is certainly not going to be a performance win. A TUI mode would also require writing an interface for configuration, and is generally less useful than having a web interface, so I don't see this being added (unless you wanted to submit a PR).

tensiondriven avatar Feb 04 '23 03:02 tensiondriven

https://github.com/rothgar/awesome-tuis#libraries

  • https://github.com/louipc/turses is built on urwid for the TUI: https://github.com/urwid/urwid
  • https://github.com/Textualize/textual

westurner avatar Mar 02 '23 22:03 westurner

  • jupyter_console is the IPython REPL with non-ipykernel Jupyter kernels https://github.com/jupyter/jupyter_console
    • re: a [sensorcraft, Minecraft,] jupyter kernel https://news.ycombinator.com/item?id=32657051
    • https://jupyter-client.readthedocs.io/en/latest/kernels.html#making-kernels-for-jupyter
    • https://github.com/microsoft/vscode-jupyter/wiki/Connecting-to-a-remote-Jupyter-server-from-vscode.dev
    • https://research.google.com/colaboratory/local-runtimes.html
    • import IPython; IPython.display.display??

westurner avatar Mar 02 '23 22:03 westurner

There is one already: https://github.com/atisharma/koboldterm

But changes in the API seem to have broken it.

atisharma avatar May 01 '23 19:05 atisharma

From https://news.ycombinator.com/item?id=35767901 :

Could Frogmouth display Markdown cells in Jupyter Notebooks on the CLI? FWIW, IPython is built with Python Prompt Toolkit and Jupyter_console is IPython for non-python kernels; conda install -y jupyter_console; jupyter kernelspec -h. But those only do %logstart -o example.out.py; Markdown in notebooks on the CLI is basically unheard-of.

Frogmouth does CLI Markdown output in Python and is built with textual; https://github.com/Textualize/textual :

Textual adds interactivity to Rich with an API inspired by modern web development.

On modern terminal software (installed by default on most systems), Textual apps can use 16.7 million colors with mouse support and smooth flicker-free animation. A powerful layout engine and re-usable components makes it possible to build apps that rival the desktop and web experience.

westurner avatar May 02 '23 04:05 westurner