Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -211,6 +211,9 @@ def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
|
|
| 211 |
return seed
|
| 212 |
|
| 213 |
def uploadNote():
|
|
|
|
|
|
|
|
|
|
| 214 |
with open(filename, "w") as f:
|
| 215 |
f.write(f"Realvis 5.0 (Tester B): {seed} png\n")
|
| 216 |
f.write(f"Date/time: {timestamp} \n")
|
|
@@ -265,10 +268,7 @@ def generate_30(
|
|
| 265 |
options["use_resolution_binning"] = True
|
| 266 |
images = []
|
| 267 |
pipe.scheduler.set_timesteps(num_inference_steps,device)
|
| 268 |
-
|
| 269 |
-
filename= f'tst_{seed}.txt'
|
| 270 |
-
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
| 271 |
-
|
| 272 |
for i in range(0, num_images, BATCH_SIZE):
|
| 273 |
batch_options = options.copy()
|
| 274 |
batch_options["prompt"] = options["prompt"][i:i+BATCH_SIZE]
|
|
@@ -323,9 +323,6 @@ def generate_60(
|
|
| 323 |
options["use_resolution_binning"] = True
|
| 324 |
images = []
|
| 325 |
pipe.scheduler.set_timesteps(num_inference_steps,device)
|
| 326 |
-
# write note txt
|
| 327 |
-
filename= f'tst_{seed}.txt'
|
| 328 |
-
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
| 329 |
uploadNote()
|
| 330 |
for i in range(0, num_images, BATCH_SIZE):
|
| 331 |
batch_options = options.copy()
|
|
@@ -381,9 +378,6 @@ def generate_90(
|
|
| 381 |
options["use_resolution_binning"] = True
|
| 382 |
images = []
|
| 383 |
pipe.scheduler.set_timesteps(num_inference_steps,device)
|
| 384 |
-
# write note txt
|
| 385 |
-
filename= f'tst_{seed}.txt'
|
| 386 |
-
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
| 387 |
uploadNote()
|
| 388 |
for i in range(0, num_images, BATCH_SIZE):
|
| 389 |
batch_options = options.copy()
|
|
|
|
| 211 |
return seed
|
| 212 |
|
| 213 |
def uploadNote():
|
| 214 |
+
# write note txt
|
| 215 |
+
filename= f'tst_B_{seed}.txt'
|
| 216 |
+
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
| 217 |
with open(filename, "w") as f:
|
| 218 |
f.write(f"Realvis 5.0 (Tester B): {seed} png\n")
|
| 219 |
f.write(f"Date/time: {timestamp} \n")
|
|
|
|
| 268 |
options["use_resolution_binning"] = True
|
| 269 |
images = []
|
| 270 |
pipe.scheduler.set_timesteps(num_inference_steps,device)
|
| 271 |
+
uploadNote()
|
|
|
|
|
|
|
|
|
|
| 272 |
for i in range(0, num_images, BATCH_SIZE):
|
| 273 |
batch_options = options.copy()
|
| 274 |
batch_options["prompt"] = options["prompt"][i:i+BATCH_SIZE]
|
|
|
|
| 323 |
options["use_resolution_binning"] = True
|
| 324 |
images = []
|
| 325 |
pipe.scheduler.set_timesteps(num_inference_steps,device)
|
|
|
|
|
|
|
|
|
|
| 326 |
uploadNote()
|
| 327 |
for i in range(0, num_images, BATCH_SIZE):
|
| 328 |
batch_options = options.copy()
|
|
|
|
| 378 |
options["use_resolution_binning"] = True
|
| 379 |
images = []
|
| 380 |
pipe.scheduler.set_timesteps(num_inference_steps,device)
|
|
|
|
|
|
|
|
|
|
| 381 |
uploadNote()
|
| 382 |
for i in range(0, num_images, BATCH_SIZE):
|
| 383 |
batch_options = options.copy()
|