Skip to content

Commit

Permalink
fix random number generator in session
Browse files Browse the repository at this point in the history
  • Loading branch information
noskill committed Apr 26, 2024
1 parent 07749b8 commit 5a432bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions multigen/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 5a432bb

Please sign in to comment.