amildravid4292 commited on
Commit
a7f7674
·
verified ·
1 Parent(s): 8f9ef3b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -96,7 +96,7 @@ def sample_then_run(network, unet):
96
  image = inference( network, unet, prompt, negative_prompt, cfg, steps, seed)
97
  torch.save(network.proj.detach().cpu(), "model.pt" )
98
  print("done saving")
99
- return image, "model.pt", unet.cpu(), network.cpu()
100
 
101
 
102
 
@@ -479,7 +479,7 @@ with gr.Blocks(css="style.css") as demo:
479
  outputs = [input_image, file_output])
480
 
481
 
482
- sample.click(fn=sample_then_run, outputs=[network, unet, input_image, file_output])
483
 
484
  submit.click(
485
  fn=edit_inference, inputs=[prompt, negative_prompt, cfg, steps, seed, injection_step, a1, a2, a3, a4], outputs=[gallery]
 
96
  image = inference( network, unet, prompt, negative_prompt, cfg, steps, seed)
97
  torch.save(network.proj.detach().cpu(), "model.pt" )
98
  print("done saving")
99
+ return image, "model.pt", network.proj.detach().cpu()
100
 
101
 
102
 
 
479
  outputs = [input_image, file_output])
480
 
481
 
482
+ sample.click(fn=sample_then_run, outputs=[network, input_image, file_output])
483
 
484
  submit.click(
485
  fn=edit_inference, inputs=[prompt, negative_prompt, cfg, steps, seed, injection_step, a1, a2, a3, a4], outputs=[gallery]