Skip to content

Commit

Permalink
Remove generator seed (mlcommons#1542)
Browse files Browse the repository at this point in the history
  • Loading branch information
rachithaps authored Jan 8, 2024
1 parent 94b0cc4 commit f4e5458
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions text_to_image/backend_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def __init__(
device="cuda",
precision="fp32",
negative_prompt="normal quality, low quality, worst quality, low res, blurry, nsfw, nude",
seed=42
):
super(BackendPytorch, self).__init__()
self.model_path = model_path
Expand All @@ -45,7 +44,6 @@ def __init__(
self.steps = steps
self.negative_prompt = negative_prompt
self.max_length_neg_prompt = 77
self.seed = seed

def version(self):
return torch.__version__
Expand Down Expand Up @@ -345,7 +343,6 @@ def predict(self, inputs):
num_inference_steps=self.steps,
output_type="pt",
latents=latents_input,
generator=torch.Generator(device=self.device).manual_seed(self.seed)
).images[0]
images.append(image)
return images
Expand Down

0 comments on commit f4e5458

Please sign in to comment.