if self.item_img:
params_strs = [f'{k}: ' + str(getattr(self.item_img, k.lower()))
for k in GEN_PARAMS]
- self.metadata.props.label = '\n'.join([self.item_img.full_path]
- + params_strs)
+ offset = len(self.unsorted_dirs) + 1
+ position = self.selection.props.selected + 1 - offset
+ total = len(self.unsorted_files)
+ title = f'{self.item_img.full_path} ({position} of {total})'
+ self.metadata.props.label = '\n'.join([title] + params_strs)
pic = Gtk.Picture.new_for_filename(self.item_img.full_path)
pic.props.halign = Gtk.Align.START
self.viewer.append(pic)
temp_gen_paramses = [None]
if parsed_args.defaults_from_stdin:
temp_gen_paramses = []
- for line in [l for l in stdin.readlines() if len(l.rstrip())]:
+ for line in [line for line in stdin.readlines() if len(line.rstrip())]:
temp_gen_paramses += [GenParams.from_str(line)]
parsed_args.models = []
parsed_args.gen_paramses = []
from stable.core import ImageMaker # noqa: E402
old_model_path = ''
maker = None
+ total = len(args.models) * args.quantity
for i, model_name in enumerate(args.models):
new_model_path = path_join(args.models_dir, model_name)
if new_model_path != old_model_path:
gen_params.seed = start_seed + n + seed_corrector
path = save_path(i*args.quantity + n)
maker.set_gen_params(gen_params)
- print(f'GENERATING: {path}; {gen_params.to_str}')
+ index = i*args.quantity + n
+ print(f'GENERATING {index}/{total}: {path}; {gen_params.to_str}')
maker.gen_image_to(path)