mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
preparation for startup option editor
This commit is contained in:
parent
c55bbd1a85
commit
587faa3e52
@ -6,10 +6,7 @@
|
|||||||
|
|
||||||
'''
|
'''
|
||||||
This is the npyscreen frontend to the model installation application.
|
This is the npyscreen frontend to the model installation application.
|
||||||
The work is actually done in a backend file named model_install_backend.py,
|
The work is actually done in backend code in 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.
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
@ -247,9 +244,8 @@ class addModelsForm(npyscreen.FormMultiPageAction):
|
|||||||
self.parentApp.convert_to_diffusers = self.convert_models.value[0] == 1
|
self.parentApp.convert_to_diffusers = self.convert_models.value[0] == 1
|
||||||
|
|
||||||
# big chunk of dead code
|
# 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
|
# 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.
|
# Not used at the current time but retained for possible future implementation.
|
||||||
# So not using, but keep this here in case it is useful later
|
|
||||||
# class Log(object):
|
# class Log(object):
|
||||||
# def __init__(self, writable):
|
# def __init__(self, writable):
|
||||||
# self.writable = writable
|
# self.writable = writable
|
||||||
|
@ -5,6 +5,16 @@ import math
|
|||||||
import npyscreen
|
import npyscreen
|
||||||
import curses
|
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):
|
class FloatSlider(npyscreen.Slider):
|
||||||
# this is supposed to adjust display precision, but doesn't
|
# this is supposed to adjust display precision, but doesn't
|
||||||
def translate_value(self):
|
def translate_value(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user