ford442 commited on
Commit
94888e7
·
1 Parent(s): c9267f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -186,8 +186,8 @@ def generate_60(
186
  if use_resolution_binning:
187
  options["use_resolution_binning"] = True
188
  images = []
189
- #with torch.no_grad():
190
- for i in range(0, num_images, BATCH_SIZE):
191
  batch_options = options.copy()
192
  batch_options["prompt"] = options["prompt"][i:i+BATCH_SIZE]
193
  if "negative_prompt" in batch_options:
@@ -236,8 +236,8 @@ def generate_90(
236
  if use_resolution_binning:
237
  options["use_resolution_binning"] = True
238
  images = []
239
- #with torch.no_grad():
240
- for i in range(0, num_images, BATCH_SIZE):
241
  batch_options = options.copy()
242
  batch_options["prompt"] = options["prompt"][i:i+BATCH_SIZE]
243
  if "negative_prompt" in batch_options:
 
186
  if use_resolution_binning:
187
  options["use_resolution_binning"] = True
188
  images = []
189
+ with torch.no_grad():
190
+ for i in range(0, num_images, BATCH_SIZE):
191
  batch_options = options.copy()
192
  batch_options["prompt"] = options["prompt"][i:i+BATCH_SIZE]
193
  if "negative_prompt" in batch_options:
 
236
  if use_resolution_binning:
237
  options["use_resolution_binning"] = True
238
  images = []
239
+ with torch.no_grad():
240
+ for i in range(0, num_images, BATCH_SIZE):
241
  batch_options = options.copy()
242
  batch_options["prompt"] = options["prompt"][i:i+BATCH_SIZE]
243
  if "negative_prompt" in batch_options: