ford442 commited on
Commit
71ad8aa
·
1 Parent(s): 959d236

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -190,8 +190,8 @@ def generate_60(
190
  options["use_resolution_binning"] = True
191
 
192
  images = []
193
- #with torch.no_grad():
194
- for i in range(0, num_images, BATCH_SIZE):
195
  batch_options = options.copy()
196
  batch_options["prompt"] = options["prompt"][i:i+BATCH_SIZE]
197
  if "negative_prompt" in batch_options:
@@ -245,8 +245,8 @@ def generate_90(
245
  options["use_resolution_binning"] = True
246
 
247
  images = []
248
- #with torch.no_grad():
249
- for i in range(0, num_images, BATCH_SIZE):
250
  batch_options = options.copy()
251
  batch_options["prompt"] = options["prompt"][i:i+BATCH_SIZE]
252
  if "negative_prompt" in batch_options:
 
190
  options["use_resolution_binning"] = True
191
 
192
  images = []
193
+ with torch.no_grad():
194
+ for i in range(0, num_images, BATCH_SIZE):
195
  batch_options = options.copy()
196
  batch_options["prompt"] = options["prompt"][i:i+BATCH_SIZE]
197
  if "negative_prompt" in batch_options:
 
245
  options["use_resolution_binning"] = True
246
 
247
  images = []
248
+ with torch.no_grad():
249
+ for i in range(0, num_images, BATCH_SIZE):
250
  batch_options = options.copy()
251
  batch_options["prompt"] = options["prompt"][i:i+BATCH_SIZE]
252
  if "negative_prompt" in batch_options: