diff --git a/ldm/invoke/config/model_install.py b/ldm/invoke/config/model_install.py index c1c861f4a2..df21be54d4 100644 --- a/ldm/invoke/config/model_install.py +++ b/ldm/invoke/config/model_install.py @@ -6,10 +6,7 @@ ''' This is the npyscreen frontend to the model installation application. -The work is actually done in a backend file named model_install_backend.py, -and is kicked off in the beforeEditing() method in a form with -the class name "outputForm". This decision allows the output from the -installation process to be captured and displayed in an attractive form. +The work is actually done in backend code in model_install_backend.py. ''' import argparse @@ -247,9 +244,8 @@ class addModelsForm(npyscreen.FormMultiPageAction): self.parentApp.convert_to_diffusers = self.convert_models.value[0] == 1 # big chunk of dead code -# was intended to be a status area in which output of installation steps (including tqdm) was logged in real time -# Problem is that this requires a fork() and pipe, and not sure this will work properly on windows. -# So not using, but keep this here in case it is useful later +# was intended to be a status area in which output of installation steps (including tqdm) was logged in real time. +# Not used at the current time but retained for possible future implementation. # class Log(object): # def __init__(self, writable): # self.writable = writable diff --git a/ldm/invoke/config/widgets.py b/ldm/invoke/config/widgets.py index b090f83e72..b48ea875df 100644 --- a/ldm/invoke/config/widgets.py +++ b/ldm/invoke/config/widgets.py @@ -5,6 +5,16 @@ import math import npyscreen import curses +class IntSlider(npyscreen.Slider): + def translate_value(self): + stri = "%2d / %2d" % (self.value, self.out_of) + l = (len(str(self.out_of))) * 2 + 4 + stri = stri.rjust(l) + return stri + +class IntTitleSlider(npyscreen.TitleText): + _entry_type = IntSlider + class FloatSlider(npyscreen.Slider): # this is supposed to adjust display precision, but doesn't def translate_value(self):