ford442 commited on
Commit
17b2995
·
1 Parent(s): bd54a4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -63,6 +63,8 @@ BATCH_SIZE = int(os.getenv("BATCH_SIZE", "1"))
63
 
64
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
65
 
 
 
66
  style_list = [
67
  {
68
  "name": "3840 x 2160",
@@ -165,7 +167,7 @@ def generate(
165
  global models
166
  pipe = models[model_choice]
167
  seed = int(randomize_seed_fn(seed, randomize_seed))
168
- generator = torch.Generator(device=device).manual_seed(seed)
169
 
170
  prompt, negative_prompt = apply_style(style_selection, prompt, negative_prompt)
171
 
 
63
 
64
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
65
 
66
+ generator = torch.Generator(device=device)
67
+
68
  style_list = [
69
  {
70
  "name": "3840 x 2160",
 
167
  global models
168
  pipe = models[model_choice]
169
  seed = int(randomize_seed_fn(seed, randomize_seed))
170
+ generator.manual_seed(seed)
171
 
172
  prompt, negative_prompt = apply_style(style_selection, prompt, negative_prompt)
173