InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

Add 'update' action to launcher script

Open lstein opened this issue 2 years ago • 4 comments

  • Adds an update action to launcher script
  • This action calls new python script invokeai-update, which prompts user to update to latest release version, main development version, or an arbitrary git tag or branch name.
  • It then uses pip to update to whatever tag was specified.

The user interface (such as it is) looks like this: updater-screenshot

lstein avatar Feb 12 '23 03:02 lstein

@ebr I cribbed the rich commands from your messages.py script, but I didn't take the time to understand how everything works. Is there a way to put the output messages from pip into a black box the way the welcome text is?

lstein avatar Feb 12 '23 03:02 lstein

I haven't done it with streaming output of a subprocess, but off the top of my head it should be possible using an instance of rich.Live, which updates a renderable in realtime. If you don't mind a short delay, I can take a stab at it when I'm back at the computer tomorrow afternoon.

ebr avatar Feb 12 '23 04:02 ebr

I haven't done it with streaming output of a subprocess, but off the top of my head it should be possible using an instance of rich.Live, which updates a renderable in realtime. If you don't mind a short delay, I can take a stab at it when I'm back at the computer tomorrow afternoon.

That would be awesome.

lstein avatar Feb 12 '23 22:02 lstein

@lstein This seems pretty close: image

I'm not sure how to get the "Choice: " and the manual entry prompts to fill the line. This might be just a limitation of terminals with a light background. But it could be a future improvement.

(love the ":crossed_fingers:" by the way ;) )

just pushed a commit implementing this - let me know what you think.

ebr avatar Feb 13 '23 00:02 ebr

@lstein i'm approving this, pending your acceptance of my changes (the prompt lines are still not styled)

This looks fine. Can @blessedcoolant or @tildebyte have a look?

lstein avatar Feb 20 '23 14:02 lstein