ford442 commited on
Commit
aac562e
·
verified ·
1 Parent(s): a5b6657

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -305,7 +305,6 @@ def generate_30(
305
  sd_image[0].save(filename,optimize=False,compress_level=0)
306
  upload_to_ftp(filename)
307
  uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
308
- image_paths = save_image(sd_image)
309
  torch.setfloat32_matmul_precision("medium")
310
  with torch.no_grad():
311
  upscale = upscaler(sd_image, tiling=True, tile_width=256, tile_height=256)
@@ -361,7 +360,6 @@ def generate_60(
361
  sd_image[0].save(filename,optimize=False,compress_level=0)
362
  upload_to_ftp(filename)
363
  uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
364
- image_paths = save_image(sd_image)
365
  torch.setfloat32_matmul_precision("medium")
366
  with torch.no_grad():
367
  upscale = upscaler(sd_image, tiling=True, tile_width=256, tile_height=256)
@@ -417,7 +415,6 @@ def generate_90(
417
  sd_image[0].save(filename,optimize=False,compress_level=0)
418
  upload_to_ftp(filename)
419
  uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
420
- image_paths = save_image(sd_image)
421
  torch.setfloat32_matmul_precision("medium")
422
  with torch.no_grad():
423
  upscale = upscaler(sd_image, tiling=True, tile_width=256, tile_height=256)
@@ -468,13 +465,13 @@ with gr.Blocks(theme=gr.themes.Origin(),css=css) as demo:
468
  placeholder="Enter your prompt",
469
  container=False,
470
  )
471
- latent_file = gr.File(label="Image File (Required)")
472
  run_button_30 = gr.Button("Run 30 Seconds", scale=0)
473
  run_button_60 = gr.Button("Run 60 Seconds", scale=0)
474
  run_button_90 = gr.Button("Run 90 Seconds", scale=0)
475
  result = gr.Gallery(label="Result", columns=1, show_label=False)
476
 
477
  with gr.Row():
 
478
  style_selection = gr.Radio(
479
  show_label=True,
480
  container=True,
 
305
  sd_image[0].save(filename,optimize=False,compress_level=0)
306
  upload_to_ftp(filename)
307
  uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
 
308
  torch.setfloat32_matmul_precision("medium")
309
  with torch.no_grad():
310
  upscale = upscaler(sd_image, tiling=True, tile_width=256, tile_height=256)
 
360
  sd_image[0].save(filename,optimize=False,compress_level=0)
361
  upload_to_ftp(filename)
362
  uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
 
363
  torch.setfloat32_matmul_precision("medium")
364
  with torch.no_grad():
365
  upscale = upscaler(sd_image, tiling=True, tile_width=256, tile_height=256)
 
415
  sd_image[0].save(filename,optimize=False,compress_level=0)
416
  upload_to_ftp(filename)
417
  uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
 
418
  torch.setfloat32_matmul_precision("medium")
419
  with torch.no_grad():
420
  upscale = upscaler(sd_image, tiling=True, tile_width=256, tile_height=256)
 
465
  placeholder="Enter your prompt",
466
  container=False,
467
  )
 
468
  run_button_30 = gr.Button("Run 30 Seconds", scale=0)
469
  run_button_60 = gr.Button("Run 60 Seconds", scale=0)
470
  run_button_90 = gr.Button("Run 90 Seconds", scale=0)
471
  result = gr.Gallery(label="Result", columns=1, show_label=False)
472
 
473
  with gr.Row():
474
+ latent_file = gr.Image(label="Image Prompt (Required)", interactive=True)
475
  style_selection = gr.Radio(
476
  show_label=True,
477
  container=True,