Spaces:
Running
Running
Commit
•
79e5823
1
Parent(s):
98511b0
`app.py`: integrate seed
Browse files
app.py
CHANGED
@@ -81,7 +81,7 @@ def image_to_base64(image_path):
|
|
81 |
|
82 |
prodia_client = Prodia(api_key=os.getenv("PRODIA_API_KEY"))
|
83 |
|
84 |
-
def flip_text(prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height):
|
85 |
result = prodia_client.generate({
|
86 |
"prompt": prompt,
|
87 |
"negative_prompt": negative_prompt,
|
@@ -90,7 +90,8 @@ def flip_text(prompt, negative_prompt, model, steps, sampler, cfg_scale, width,
|
|
90 |
"sampler": sampler,
|
91 |
"cfg_scale": cfg_scale,
|
92 |
"width": width,
|
93 |
-
"height": height
|
|
|
94 |
})
|
95 |
|
96 |
job = prodia_client.wait(result)
|
@@ -111,7 +112,7 @@ with gr.Blocks(css=css) as demo:
|
|
111 |
model = gr.Dropdown(interactive=True,value="v1-5-pruned-emaonly.safetensors [d7049739]", show_label=True, label="Stable Diffusion Checkpoint", choices=prodia_client.list_models())
|
112 |
|
113 |
with gr.Column(scale=1):
|
114 |
-
gr.Markdown(value="AUTOMATIC1111 Stable Diffusion Web UI.<br>Powered by [Prodia](https://prodia.com).")
|
115 |
|
116 |
with gr.Tab("txt2img"):
|
117 |
with gr.Row():
|
@@ -167,7 +168,7 @@ with gr.Blocks(css=css) as demo:
|
|
167 |
with gr.Column(scale=2):
|
168 |
image_output = gr.Image()
|
169 |
|
170 |
-
text_button.click(flip_text, inputs=[prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height], outputs=image_output)
|
171 |
|
172 |
|
173 |
demo.launch()
|
|
|
81 |
|
82 |
prodia_client = Prodia(api_key=os.getenv("PRODIA_API_KEY"))
|
83 |
|
84 |
+
def flip_text(prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height, seed):
|
85 |
result = prodia_client.generate({
|
86 |
"prompt": prompt,
|
87 |
"negative_prompt": negative_prompt,
|
|
|
90 |
"sampler": sampler,
|
91 |
"cfg_scale": cfg_scale,
|
92 |
"width": width,
|
93 |
+
"height": height,
|
94 |
+
"seed": seed
|
95 |
})
|
96 |
|
97 |
job = prodia_client.wait(result)
|
|
|
112 |
model = gr.Dropdown(interactive=True,value="v1-5-pruned-emaonly.safetensors [d7049739]", show_label=True, label="Stable Diffusion Checkpoint", choices=prodia_client.list_models())
|
113 |
|
114 |
with gr.Column(scale=1):
|
115 |
+
gr.Markdown(elem_id="powered-by-prodia", value="AUTOMATIC1111 Stable Diffusion Web UI.<br>Powered by [Prodia](https://prodia.com).")
|
116 |
|
117 |
with gr.Tab("txt2img"):
|
118 |
with gr.Row():
|
|
|
168 |
with gr.Column(scale=2):
|
169 |
image_output = gr.Image()
|
170 |
|
171 |
+
text_button.click(flip_text, inputs=[prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height, seed], outputs=image_output)
|
172 |
|
173 |
|
174 |
demo.launch()
|