@@ -395,13 +395,23 @@ def create(self):
395395 max_width = 80 ,
396396 scroll_exit = True ,
397397 )
398- self .max_cache_size = self .add_widget_intelligent (
399- IntTitleSlider ,
398+ self .nextrely += 1
399+ self .add_widget_intelligent (
400+ npyscreen .TitleFixedText ,
400401 name = "RAM cache size (GB). Make this at least large enough to hold a single full model." ,
401- value = clip (old_opts .max_cache_size , range = (3.0 , MAX_RAM )),
402- out_of = MAX_RAM ,
403- lowest = 3 ,
404- begin_entry_at = 6 ,
402+ begin_entry_at = 0 ,
403+ editable = False ,
404+ color = "CONTROL" ,
405+ scroll_exit = True ,
406+ )
407+ self .nextrely -= 1
408+ self .max_cache_size = self .add_widget_intelligent (
409+ npyscreen .Slider ,
410+ value = clip (old_opts .max_cache_size , range = (3.0 , MAX_RAM ), step = 0.5 ),
411+ out_of = round (MAX_RAM ),
412+ lowest = 0.0 ,
413+ step = 0.5 ,
414+ relx = 8 ,
405415 scroll_exit = True ,
406416 )
407417 if HAS_CUDA :
@@ -417,7 +427,7 @@ def create(self):
417427 self .nextrely -= 1
418428 self .max_vram_cache_size = self .add_widget_intelligent (
419429 npyscreen .Slider ,
420- value = clip (old_opts .max_vram_cache_size , range = (0 , MAX_VRAM )),
430+ value = clip (old_opts .max_vram_cache_size , range = (0 , MAX_VRAM ), step = 0.25 ),
421431 out_of = round (MAX_VRAM * 2 ) / 2 ,
422432 lowest = 0.0 ,
423433 relx = 8 ,
@@ -596,13 +606,13 @@ def default_user_selections(program_opts: Namespace) -> InstallSelections:
596606
597607
598608# -------------------------------------
599- def clip (value : float , range : tuple [float , float ]) -> float :
609+ def clip (value : float , range : tuple [float , float ], step : float ) -> float :
600610 minimum , maximum = range
601611 if value < minimum :
602612 value = minimum
603613 if value > maximum :
604614 value = maximum
605- return value
615+ return round ( value / step ) * step
606616
607617
608618# -------------------------------------
0 commit comments