Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -385,9 +385,8 @@ def generate_30(
|
|
385 |
pyx.upload_to_ftp(filename)
|
386 |
#uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
387 |
batch_options = options.copy()
|
388 |
-
|
389 |
-
|
390 |
-
rv_image = pipe(**batch_options).images[0]
|
391 |
sd_image_path = f"rv_C_{timestamp}.png"
|
392 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
393 |
pyx.upload_to_ftp(sd_image_path)
|
@@ -435,9 +434,8 @@ def generate_60(
|
|
435 |
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
436 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
437 |
batch_options = options.copy()
|
438 |
-
|
439 |
-
|
440 |
-
rv_image = pipe(**batch_options).images[0]
|
441 |
sd_image_path = f"rv_C_{timestamp}.png"
|
442 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
443 |
upload_to_ftp(sd_image_path)
|
@@ -478,9 +476,8 @@ def generate_90(
|
|
478 |
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
479 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
480 |
batch_options = options.copy()
|
481 |
-
|
482 |
-
|
483 |
-
rv_image = pipe(**batch_options).images[0]
|
484 |
sd_image_path = f"rv_C_{timestamp}.png"
|
485 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
486 |
upload_to_ftp(sd_image_path)
|
|
|
385 |
pyx.upload_to_ftp(filename)
|
386 |
#uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
387 |
batch_options = options.copy()
|
388 |
+
with torch.inference_mode():
|
389 |
+
rv_image = pipe(**batch_options).images[0]
|
|
|
390 |
sd_image_path = f"rv_C_{timestamp}.png"
|
391 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
392 |
pyx.upload_to_ftp(sd_image_path)
|
|
|
434 |
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
435 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
436 |
batch_options = options.copy()
|
437 |
+
with torch.inference_mode():
|
438 |
+
rv_image = pipe(**batch_options).images[0]
|
|
|
439 |
sd_image_path = f"rv_C_{timestamp}.png"
|
440 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
441 |
upload_to_ftp(sd_image_path)
|
|
|
476 |
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
477 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
478 |
batch_options = options.copy()
|
479 |
+
with torch.inference_mode():
|
480 |
+
rv_image = pipe(**batch_options).images[0]
|
|
|
481 |
sd_image_path = f"rv_C_{timestamp}.png"
|
482 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
483 |
upload_to_ftp(sd_image_path)
|