So I thought that the bash script might could use a nice touch up to look a bit prettier for folks who wanna use it. The TUI uses dialog, which should be a common install on most Linux distros. If it's not installed, it falls back to the original, text-based interface. The TUI can use the arrow keys or entered numbers to navigate the menu. It also seamlessly transitions back to the TUI once a user quits out of a running Invoke session. There's still some touches I wanna make to help clean it up some, but I'm curious what others think of this initial TUI for the bash launch script? Definitely want to hear feedback on this, and if y'all like it enough, I'll make a PR for it once it's clean and ready! ๐
#Bash-based TUI for the Invoke.sh file
49 messages ยท Page 1 of 1 (latest)
Here is the TUI script. It's just the original launch script with the appropriate dialog scripts added onto it
Tagging @supple lagoon for this to see what he things of it, also wanna hear from other linux users if it works as it should.
This looks really nice. Is there something similar that can be done in the .bat script?
I actually don't know, honestly. I can do some searching and see if it's possible? What does the .bat file run as in windows? CMD line or PowerShell?
I haven't used windows in any meaningful capacity in.... Years
No worries. I've folded your TUI into 2.3.3-rc1 and given you credit for the work.
Heh, I wasn't done yet ๐
Though I just about am now!
How do you like this @supple lagoon ๐
And that should do it! Hope you like the color scheme I chose for it, tried to go for the purple and gold color scheme that InvokeAI uses in the WebUI ๐
(I can happily edit it to be other colors too!)
Thanks for doing this. I'm red-green colorblind and am not the best judge of color schemes, but I'll fold these in.
So I did a little work on the .sh file myself yesterday to refactor the code so that the case statement wasn't repeated. Could you have a look and let me know what changes from your final revision need to be applied? https://raw.githubusercontent.com/invoke-ai/InvokeAI/1cb88960fe45da54d6b65c9f48bd0db91749feae/installer/templates/invoke.sh.in
Will do, I'll check it out here in the next hour or two and let you know!
Ok, looking at it now, I'll see how I can merge my new changes into it. I assume you want it to users can input --PARAMS when launching the invoke.sh script to actually run with InvokeAI? If so, I'll need to figure out how to handle my --no-tui param option to allow fallling back to the CLI if something goes wrong with dialog
Yes, I like to be able to pass options to invoke.sh that will then be passed to the scripts it later launches.
When might something go wrong with dialog?
IDK, but since I can't anticipate how some Linux user (probably an Arch user if I'm gonna be blunt xD) might mess up their dialog install, I made a way to let users disable it if they want to
I've finished up now with integrating everything. I got the program down to a single while loop too, which helps simplify it further
Here's the two files to be uploaded! .dialogrc didn't change, so should just need to copy the new stuff from the GUI fill to the invoke.sh file. I cleaned up a few other things, changed echo to printf as that's now considered the (albeit nominally) better option to use. Commented stuff, and generally formatted everything to be a bit cleaner ๐
Accounted for that too. The script checks to see if --no-tui is passed. If it is, it removes it to prevent it interfering with the arguments passed to Invoke proper.
Be curious how you like it! ๐
Thanks! I'll take it for a spin. One challenge I have is figuring out how to get these improvements into an update. The updater only updates the python libraries and not the shell script or other files in the invokeai directory.
I'm afraid that the color scheme is very hard for me to use due to my colorblindness (8% of European males). I'm going to change to amber on black if that's OK with you. This is the same color scheme used by the code and model installers.
Sure, no worries at all. Dialog only has a few color choices to choose from, but you can switch it to be black with gold text. I can do that for you if you want me too
Hmm, maybe we should add a "version number" to the shell script. And then do a check via the python code to see if that's present. If it's not, have it do a one time update to the shell script?
@supple lagoon How does this look?
I can make the background black too. It'll just blend in with the window if that helps visibility for you
Let me know which you like better
I actually kinda like the all black and gold one best, but I'm fine with either. Just let me know which you like and I'll pass on the .dialogrc file to you
Here is the updated .dialogrc file for you @supple lagoon. It's with the black and gold scheme you see in the second image. Let me know if that's easier for you to see ๐
Thanks! Last night I implemented a version check and one time upgrade process. So all good.
Awesome! Look forward to seeing this in the next update ๐
Looks really nice. If you want to test the release candidate, it is here: https://github.com/invoke-ai/InvokeAI/releases/tag/v2.3.3-rc6
Awesome, I'll give it a spin and see how it works ๐
Any luck?
Heh, I uhh... Totally forgot... ๐ตโ๐ซ
I'll try it out later this evening and let you know
I see the zip with the source code, but is that was the pre-release pulls from? Not sure how to install the rc6 otherwise just from the zip file? x3
Hi Josh, good question! Two methods. First, you ought to be able to use the updater (invoke.sh option 9) to update to the pre-release (it will version option 1). Then, the next time you run the web or CLI client, it will notice that invoke.sh is not up to date and replace the shell script with the TUI version. Alternatively, you download and install the InvokeAI-Installer.zip installer and give it the OK to reinstall into your invokeai directory.
Ok cool! Will try it out!