Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -203,7 +203,7 @@ css = """
|
|
203 |
with gr.Blocks(css=css) as demo:
|
204 |
with gr.Row():
|
205 |
with gr.Column(scale=6):
|
206 |
-
model = gr.Dropdown(interactive=True,value="
|
207 |
|
208 |
with gr.Column(scale=1):
|
209 |
gr.Markdown(elem_id="powered-by-prodia", value="AUTOMATIC1111 Stable Diffusion Web UI переделано masteroko.<br>Powered by [Prodia](https://prodia.com).<br>For more features and faster generation times check out our [API Docs](https://docs.prodia.com/reference/getting-started-guide).")
|
@@ -212,7 +212,7 @@ with gr.Blocks(css=css) as demo:
|
|
212 |
with gr.Tab("txt2img", id='t2i'):
|
213 |
with gr.Row():
|
214 |
with gr.Column(scale=6, min_width=600):
|
215 |
-
prompt = gr.Textbox("
|
216 |
negative_prompt = gr.Textbox(placeholder="Negative Prompt", show_label=False, lines=3, value="3d, cartoon, anime, (deformed eyes, nose, ears, nose), bad anatomy, ugly")
|
217 |
with gr.Column():
|
218 |
text_button = gr.Button("Сгенерировать", variant='primary', elem_id="generate")
|
@@ -222,7 +222,7 @@ with gr.Blocks(css=css) as demo:
|
|
222 |
with gr.Tab("Генерация"):
|
223 |
with gr.Row():
|
224 |
with gr.Column(scale=1):
|
225 |
-
sampler = gr.Dropdown(value="DPM++ 2M
|
226 |
|
227 |
with gr.Column(scale=1):
|
228 |
steps = gr.Slider(label="количество обработок", minimum=1, maximum=50, value=20, step=1)
|
@@ -233,8 +233,8 @@ with gr.Blocks(css=css) as demo:
|
|
233 |
height = gr.Slider(label="Высота", maximum=1024, value=512, step=8)
|
234 |
|
235 |
with gr.Column(scale=1):
|
236 |
-
batch_size = gr.Slider(label="Batch Size", maximum=1, value=
|
237 |
-
batch_count = gr.Slider(label="Batch Count", maximum=1, value=
|
238 |
|
239 |
cfg_scale = gr.Slider(label="CFG Scale(степень фантазии ии)", minimum=1, maximum=20, value=7, step=1)
|
240 |
seed = gr.Number(label="Семя рандома", value=-1)
|
@@ -243,7 +243,7 @@ with gr.Blocks(css=css) as demo:
|
|
243 |
image_output = gr.Image(value="https://images.prodia.xyz/8ede1a7c-c0ee-4ded-987d-6ffed35fc477.png")
|
244 |
|
245 |
text_button.click(txt2img, inputs=[prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height,
|
246 |
-
seed], outputs=image_output, concurrency_limit=
|
247 |
|
248 |
with gr.Tab("img2img", id='i2i'):
|
249 |
with gr.Row():
|
@@ -260,7 +260,7 @@ with gr.Blocks(css=css) as demo:
|
|
260 |
|
261 |
with gr.Row():
|
262 |
with gr.Column(scale=1):
|
263 |
-
i2i_sampler = gr.Dropdown(value="
|
264 |
|
265 |
with gr.Column(scale=1):
|
266 |
i2i_steps = gr.Slider(label="количество обработок", minimum=1, maximum=50, value=20, step=1)
|
@@ -275,7 +275,7 @@ with gr.Blocks(css=css) as demo:
|
|
275 |
i2i_batch_count = gr.Slider(label="Batch Count", maximum=1, value=1)
|
276 |
|
277 |
i2i_cfg_scale = gr.Slider(label="CFG Scale(степень фантазии ии)", minimum=1, maximum=20, value=7, step=1)
|
278 |
-
i2i_denoising = gr.Slider(label="сила изменения фото", minimum=0, maximum=
|
279 |
i2i_seed = gr.Number(label="Семя рандома ", value=-1)
|
280 |
|
281 |
with gr.Column(scale=2):
|
@@ -283,7 +283,7 @@ with gr.Blocks(css=css) as demo:
|
|
283 |
|
284 |
i2i_text_button.click(img2img, inputs=[i2i_image_input, i2i_denoising, i2i_prompt, i2i_negative_prompt,
|
285 |
model, i2i_steps, i2i_sampler, i2i_cfg_scale, i2i_width, i2i_height,
|
286 |
-
i2i_seed], outputs=i2i_image_output, concurrency_limit=
|
287 |
|
288 |
with gr.Tab("PNG Info"):
|
289 |
def plaintext_to_html(text, classname=None):
|
@@ -322,6 +322,6 @@ with gr.Blocks(css=css) as demo:
|
|
322 |
send_to_txt2img_btn.click(send_to_txt2img, inputs=[image_input], outputs=[tabs, prompt, negative_prompt,
|
323 |
steps, seed, model, sampler,
|
324 |
width, height, cfg_scale],
|
325 |
-
concurrency_limit=
|
326 |
|
327 |
-
demo.queue(max_size=80, api_open=False).launch(max_threads=
|
|
|
203 |
with gr.Blocks(css=css) as demo:
|
204 |
with gr.Row():
|
205 |
with gr.Column(scale=6):
|
206 |
+
model = gr.Dropdown(interactive=True,value="childrensStories_v1ToonAnime.safetensors [2ec7b88b]", show_label=True, label="Stable Diffusion Checkpoint", choices=prodia_client.list_models())
|
207 |
|
208 |
with gr.Column(scale=1):
|
209 |
gr.Markdown(elem_id="powered-by-prodia", value="AUTOMATIC1111 Stable Diffusion Web UI переделано masteroko.<br>Powered by [Prodia](https://prodia.com).<br>For more features and faster generation times check out our [API Docs](https://docs.prodia.com/reference/getting-started-guide).")
|
|
|
212 |
with gr.Tab("txt2img", id='t2i'):
|
213 |
with gr.Row():
|
214 |
with gr.Column(scale=6, min_width=600):
|
215 |
+
prompt = gr.Textbox("nsfw", placeholder="Prompt", show_label=False, lines=3)
|
216 |
negative_prompt = gr.Textbox(placeholder="Negative Prompt", show_label=False, lines=3, value="3d, cartoon, anime, (deformed eyes, nose, ears, nose), bad anatomy, ugly")
|
217 |
with gr.Column():
|
218 |
text_button = gr.Button("Сгенерировать", variant='primary', elem_id="generate")
|
|
|
222 |
with gr.Tab("Генерация"):
|
223 |
with gr.Row():
|
224 |
with gr.Column(scale=1):
|
225 |
+
sampler = gr.Dropdown(value="DPM++ 2M SDE Exponential", show_label=True, label="Sampling Method", choices=prodia_client.list_samplers())
|
226 |
|
227 |
with gr.Column(scale=1):
|
228 |
steps = gr.Slider(label="количество обработок", minimum=1, maximum=50, value=20, step=1)
|
|
|
233 |
height = gr.Slider(label="Высота", maximum=1024, value=512, step=8)
|
234 |
|
235 |
with gr.Column(scale=1):
|
236 |
+
batch_size = gr.Slider(label="Batch Size", maximum=1, value=2)
|
237 |
+
batch_count = gr.Slider(label="Batch Count", maximum=1, value=2)
|
238 |
|
239 |
cfg_scale = gr.Slider(label="CFG Scale(степень фантазии ии)", minimum=1, maximum=20, value=7, step=1)
|
240 |
seed = gr.Number(label="Семя рандома", value=-1)
|
|
|
243 |
image_output = gr.Image(value="https://images.prodia.xyz/8ede1a7c-c0ee-4ded-987d-6ffed35fc477.png")
|
244 |
|
245 |
text_button.click(txt2img, inputs=[prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height,
|
246 |
+
seed], outputs=image_output, concurrency_limit=1024)
|
247 |
|
248 |
with gr.Tab("img2img", id='i2i'):
|
249 |
with gr.Row():
|
|
|
260 |
|
261 |
with gr.Row():
|
262 |
with gr.Column(scale=1):
|
263 |
+
i2i_sampler = gr.Dropdown(value="EDPM++ 3M SDE Exponential", show_label=True, label="Sampling Method", choices=prodia_client.list_samplers())
|
264 |
|
265 |
with gr.Column(scale=1):
|
266 |
i2i_steps = gr.Slider(label="количество обработок", minimum=1, maximum=50, value=20, step=1)
|
|
|
275 |
i2i_batch_count = gr.Slider(label="Batch Count", maximum=1, value=1)
|
276 |
|
277 |
i2i_cfg_scale = gr.Slider(label="CFG Scale(степень фантазии ии)", minimum=1, maximum=20, value=7, step=1)
|
278 |
+
i2i_denoising = gr.Slider(label="сила изменения фото", minimum=0, maximum=2, value=0.7, step=0.05)
|
279 |
i2i_seed = gr.Number(label="Семя рандома ", value=-1)
|
280 |
|
281 |
with gr.Column(scale=2):
|
|
|
283 |
|
284 |
i2i_text_button.click(img2img, inputs=[i2i_image_input, i2i_denoising, i2i_prompt, i2i_negative_prompt,
|
285 |
model, i2i_steps, i2i_sampler, i2i_cfg_scale, i2i_width, i2i_height,
|
286 |
+
i2i_seed], outputs=i2i_image_output, concurrency_limit=1024)
|
287 |
|
288 |
with gr.Tab("PNG Info"):
|
289 |
def plaintext_to_html(text, classname=None):
|
|
|
322 |
send_to_txt2img_btn.click(send_to_txt2img, inputs=[image_input], outputs=[tabs, prompt, negative_prompt,
|
323 |
steps, seed, model, sampler,
|
324 |
width, height, cfg_scale],
|
325 |
+
concurrency_limit=1024)
|
326 |
|
327 |
+
demo.queue(max_size=80, api_open=False).launch(max_threads=4096, show_api=False)
|