Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -190,8 +190,8 @@ def generate_60(
|
|
190 |
options["use_resolution_binning"] = True
|
191 |
|
192 |
images = []
|
193 |
-
|
194 |
-
|
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 |
-
|
249 |
-
|
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:
|