From 5a432bbf2c1db06119aee2e6fe4a684ad0446efb Mon Sep 17 00:00:00 2001 From: Anatoly Belikov Date: Fri, 26 Apr 2024 12:40:11 +0300 Subject: [PATCH] fix random number generator in session --- multigen/sessions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multigen/sessions.py b/multigen/sessions.py index 5e8945d..61c768f 100755 --- a/multigen/sessions.py +++ b/multigen/sessions.py @@ -55,8 +55,8 @@ def gen_sess(self, add_count = 0, save_img=True, self.last_index = self.confg.count - 1 self.last_conf = {**inputs} # TODO: multiple inputs? - # inputs['generator'] = torch.Generator().manual_seed(inputs['generator']) - inputs['generator'] = torch.cuda.manual_seed(inputs['generator']) + inputs['generator'] = torch.Generator().manual_seed(inputs['generator']) + image = self.pipe.gen(inputs) if save_img: self.last_img_name = self.get_last_file_prefix() + ".png"