Skip to content

Commit

Permalink
bug fix with local random
Browse files Browse the repository at this point in the history
  • Loading branch information
Necr0x0Der committed Jul 10, 2024
1 parent 4d4d211 commit 46c56ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion multigen/prompting.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ def __next__(self):
(nseeds > 0 and self.count - self.start_count == self.max_seed_rounds * nseeds) or \
(self.max_count == 0 and nseeds == 0):
raise StopIteration
thread_data.random = random.Random()
seed = self.seeds[self.count % nseeds] if nseeds > 0 else \
thread_data.random.randint(1, 1024*1024*1024*4-1)
self.count += 1

thread_data.random = random.Random()
thread_data.random.seed(seed)
result = {'prompt': get_prompt(self.prompt),
'generator': seed,
Expand Down

0 comments on commit 46c56ac

Please sign in to comment.