Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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",
|
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,
|
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]
|