Srimanth Agastyaraju commited on
Commit
2aad33f
1 Parent(s): 00deb53

Fix generator bug

Browse files
Files changed (2) hide show
  1. .ipynb_checkpoints/app-checkpoint.py +1 -0
  2. app.py +1 -0
.ipynb_checkpoints/app-checkpoint.py CHANGED
@@ -20,6 +20,7 @@ def inference(prompt, model, n_images, seed):
20
 
21
  # Run inference
22
  result_images = []
 
23
  print(f"Inferencing '{prompt}' for {n_images} images.")
24
 
25
  for i in range(n_images):
 
20
 
21
  # Run inference
22
  result_images = []
23
+ generators = [torch.Generator().manual_seed(i) for i in range(seed, n_images+seed)]
24
  print(f"Inferencing '{prompt}' for {n_images} images.")
25
 
26
  for i in range(n_images):
app.py CHANGED
@@ -20,6 +20,7 @@ def inference(prompt, model, n_images, seed):
20
 
21
  # Run inference
22
  result_images = []
 
23
  print(f"Inferencing '{prompt}' for {n_images} images.")
24
 
25
  for i in range(n_images):
 
20
 
21
  # Run inference
22
  result_images = []
23
+ generators = [torch.Generator().manual_seed(i) for i in range(seed, n_images+seed)]
24
  print(f"Inferencing '{prompt}' for {n_images} images.")
25
 
26
  for i in range(n_images):