Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -372,7 +372,9 @@ def generate_30(
|
|
372 |
pyx.upload_to_ftp(filename)
|
373 |
#uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
374 |
batch_options = options.copy()
|
375 |
-
|
|
|
|
|
376 |
sd_image_path = f"rv_C_{timestamp}.png"
|
377 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
378 |
pyx.upload_to_ftp(sd_image_path)
|
@@ -420,7 +422,9 @@ def generate_60(
|
|
420 |
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
421 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
422 |
batch_options = options.copy()
|
423 |
-
|
|
|
|
|
424 |
sd_image_path = f"rv_C_{timestamp}.png"
|
425 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
426 |
upload_to_ftp(sd_image_path)
|
@@ -461,7 +465,9 @@ def generate_90(
|
|
461 |
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
462 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
463 |
batch_options = options.copy()
|
464 |
-
|
|
|
|
|
465 |
sd_image_path = f"rv_C_{timestamp}.png"
|
466 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
467 |
upload_to_ftp(sd_image_path)
|
|
|
372 |
pyx.upload_to_ftp(filename)
|
373 |
#uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
374 |
batch_options = options.copy()
|
375 |
+
with torch.no_grad():
|
376 |
+
torch.compiler.cudagraph_mark_step_begin()
|
377 |
+
rv_image = pipe(**batch_options).images[0]
|
378 |
sd_image_path = f"rv_C_{timestamp}.png"
|
379 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
380 |
pyx.upload_to_ftp(sd_image_path)
|
|
|
422 |
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
423 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
424 |
batch_options = options.copy()
|
425 |
+
with torch.no_grad():
|
426 |
+
torch.compiler.cudagraph_mark_step_begin()
|
427 |
+
rv_image = pipe(**batch_options).images[0]
|
428 |
sd_image_path = f"rv_C_{timestamp}.png"
|
429 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
430 |
upload_to_ftp(sd_image_path)
|
|
|
465 |
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
466 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
467 |
batch_options = options.copy()
|
468 |
+
with torch.no_grad():
|
469 |
+
torch.compiler.cudagraph_mark_step_begin()
|
470 |
+
rv_image = pipe(**batch_options).images[0]
|
471 |
sd_image_path = f"rv_C_{timestamp}.png"
|
472 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
473 |
upload_to_ftp(sd_image_path)
|