Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -218,7 +218,7 @@ def sample_then_run():
|
|
218 |
steps = 25
|
219 |
image = inference( prompt, negative_prompt, cfg, steps, seed)
|
220 |
torch.save(network.value.proj, "model.pt" )
|
221 |
-
return image, "model.pt"
|
222 |
|
223 |
|
224 |
class CustomImageDataset(Dataset):
|
@@ -452,7 +452,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
452 |
outputs = [input_image, file_output])
|
453 |
|
454 |
|
455 |
-
sample.click(fn=sample_then_run, outputs=[input_image, file_output])
|
456 |
|
457 |
submit.click(
|
458 |
fn=edit_inference, inputs=[prompt, negative_prompt, cfg, steps, seed, injection_step, a1, a2, a3, a4], outputs=[gallery]
|
|
|
218 |
steps = 25
|
219 |
image = inference( prompt, negative_prompt, cfg, steps, seed)
|
220 |
torch.save(network.value.proj, "model.pt" )
|
221 |
+
return image, "model.pt", network.value
|
222 |
|
223 |
|
224 |
class CustomImageDataset(Dataset):
|
|
|
452 |
outputs = [input_image, file_output])
|
453 |
|
454 |
|
455 |
+
sample.click(fn=sample_then_run, outputs=[input_image, file_output, network])
|
456 |
|
457 |
submit.click(
|
458 |
fn=edit_inference, inputs=[prompt, negative_prompt, cfg, steps, seed, injection_step, a1, a2, a3, a4], outputs=[gallery]
|