ford442 commited on
Commit
113922c
·
1 Parent(s): c7ff9ca

Update app.py

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