Update app.py
Browse files
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 |
-
|
| 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 |
-
|
| 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:
|