Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -206,38 +206,38 @@ with gr.Blocks(css=css) as demo:
|
|
| 206 |
model = gr.Dropdown(interactive=True,value="absolutereality_v181.safetensors [3d9d4d2b]", 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.<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).")
|
| 210 |
|
| 211 |
with gr.Tabs() as tabs:
|
| 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("
|
| 219 |
|
| 220 |
with gr.Row():
|
| 221 |
with gr.Column(scale=3):
|
| 222 |
-
with gr.Tab("
|
| 223 |
with gr.Row():
|
| 224 |
with gr.Column(scale=1):
|
| 225 |
sampler = gr.Dropdown(value="DPM++ 2M Karras", show_label=True, label="Sampling Method", choices=prodia_client.list_samplers())
|
| 226 |
|
| 227 |
with gr.Column(scale=1):
|
| 228 |
-
steps = gr.Slider(label="
|
| 229 |
|
| 230 |
with gr.Row():
|
| 231 |
with gr.Column(scale=1):
|
| 232 |
-
width = gr.Slider(label="
|
| 233 |
-
height = gr.Slider(label="
|
| 234 |
|
| 235 |
with gr.Column(scale=1):
|
| 236 |
-
batch_size = gr.Slider(label="Batch Size", maximum=
|
| 237 |
-
batch_count = gr.Slider(label="Batch Count", maximum=
|
| 238 |
|
| 239 |
-
cfg_scale = gr.Slider(label="CFG Scale", minimum=1, maximum=20, value=7, step=1)
|
| 240 |
-
seed = gr.Number(label="
|
| 241 |
|
| 242 |
with gr.Column(scale=2):
|
| 243 |
image_output = gr.Image(value="https://images.prodia.xyz/8ede1a7c-c0ee-4ded-987d-6ffed35fc477.png")
|
|
@@ -248,14 +248,14 @@ with gr.Blocks(css=css) as demo:
|
|
| 248 |
with gr.Tab("img2img", id='i2i'):
|
| 249 |
with gr.Row():
|
| 250 |
with gr.Column(scale=6, min_width=600):
|
| 251 |
-
i2i_prompt = gr.Textbox("
|
| 252 |
i2i_negative_prompt = gr.Textbox(placeholder="Negative Prompt", show_label=False, lines=3, value="3d, cartoon, anime, (deformed eyes, nose, ears, nose), bad anatomy, ugly")
|
| 253 |
with gr.Column():
|
| 254 |
-
i2i_text_button = gr.Button("
|
| 255 |
|
| 256 |
with gr.Row():
|
| 257 |
with gr.Column(scale=3):
|
| 258 |
-
with gr.Tab("
|
| 259 |
i2i_image_input = gr.Image(type="pil")
|
| 260 |
|
| 261 |
with gr.Row():
|
|
@@ -263,27 +263,27 @@ with gr.Blocks(css=css) as demo:
|
|
| 263 |
i2i_sampler = gr.Dropdown(value="Euler a", show_label=True, label="Sampling Method", choices=prodia_client.list_samplers())
|
| 264 |
|
| 265 |
with gr.Column(scale=1):
|
| 266 |
-
i2i_steps = gr.Slider(label="
|
| 267 |
|
| 268 |
with gr.Row():
|
| 269 |
with gr.Column(scale=1):
|
| 270 |
-
i2i_width = gr.Slider(label="
|
| 271 |
-
i2i_height = gr.Slider(label="
|
| 272 |
|
| 273 |
with gr.Column(scale=1):
|
| 274 |
-
i2i_batch_size = gr.Slider(label="Batch Size", maximum=
|
| 275 |
-
i2i_batch_count = gr.Slider(label="Batch Count", maximum=
|
| 276 |
|
| 277 |
-
i2i_cfg_scale = gr.Slider(label="CFG Scale", minimum=1, maximum=
|
| 278 |
-
i2i_denoising = gr.Slider(label="
|
| 279 |
-
i2i_seed = gr.Number(label="
|
| 280 |
|
| 281 |
with gr.Column(scale=2):
|
| 282 |
i2i_image_output = gr.Image(value="https://images.prodia.xyz/8ede1a7c-c0ee-4ded-987d-6ffed35fc477.png")
|
| 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):
|
|
@@ -324,4 +324,4 @@ with gr.Blocks(css=css) as demo:
|
|
| 324 |
width, height, cfg_scale],
|
| 325 |
concurrency_limit=64)
|
| 326 |
|
| 327 |
-
demo.queue(max_size=80, api_open=False).launch(max_threads=
|
|
|
|
| 206 |
model = gr.Dropdown(interactive=True,value="absolutereality_v181.safetensors [3d9d4d2b]", 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).")
|
| 210 |
|
| 211 |
with gr.Tabs() as tabs:
|
| 212 |
with gr.Tab("txt2img", id='t2i'):
|
| 213 |
with gr.Row():
|
| 214 |
with gr.Column(scale=6, min_width=600):
|
| 215 |
+
prompt = gr.Textbox("писи попы", 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")
|
| 219 |
|
| 220 |
with gr.Row():
|
| 221 |
with gr.Column(scale=3):
|
| 222 |
+
with gr.Tab("Генерация"):
|
| 223 |
with gr.Row():
|
| 224 |
with gr.Column(scale=1):
|
| 225 |
sampler = gr.Dropdown(value="DPM++ 2M Karras", 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)
|
| 229 |
|
| 230 |
with gr.Row():
|
| 231 |
with gr.Column(scale=1):
|
| 232 |
+
width = gr.Slider(label="Ширина", maximum=2048, value=512, step=8)
|
| 233 |
+
height = gr.Slider(label="Высота", maximum=2048, value=512, step=8)
|
| 234 |
|
| 235 |
with gr.Column(scale=1):
|
| 236 |
+
batch_size = gr.Slider(label="Batch Size", maximum=10, value=1)
|
| 237 |
+
batch_count = gr.Slider(label="Batch Count", maximum=10, value=1)
|
| 238 |
|
| 239 |
+
cfg_scale = gr.Slider(label="CFG Scale(степень фантазии ии)", minimum=1, maximum=20, value=7, step=1)
|
| 240 |
+
seed = gr.Number(label="Семя рандома", value=-1)
|
| 241 |
|
| 242 |
with gr.Column(scale=2):
|
| 243 |
image_output = gr.Image(value="https://images.prodia.xyz/8ede1a7c-c0ee-4ded-987d-6ffed35fc477.png")
|
|
|
|
| 248 |
with gr.Tab("img2img", id='i2i'):
|
| 249 |
with gr.Row():
|
| 250 |
with gr.Column(scale=6, min_width=600):
|
| 251 |
+
i2i_prompt = gr.Textbox("тута переделай фотку ", placeholder="Prompt", show_label=False, lines=3)
|
| 252 |
i2i_negative_prompt = gr.Textbox(placeholder="Negative Prompt", show_label=False, lines=3, value="3d, cartoon, anime, (deformed eyes, nose, ears, nose), bad anatomy, ugly")
|
| 253 |
with gr.Column():
|
| 254 |
+
i2i_text_button = gr.Button("Сгенерировать", variant='primary', elem_id="generate")
|
| 255 |
|
| 256 |
with gr.Row():
|
| 257 |
with gr.Column(scale=3):
|
| 258 |
+
with gr.Tab("Генерация"):
|
| 259 |
i2i_image_input = gr.Image(type="pil")
|
| 260 |
|
| 261 |
with gr.Row():
|
|
|
|
| 263 |
i2i_sampler = gr.Dropdown(value="Euler a", 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)
|
| 267 |
|
| 268 |
with gr.Row():
|
| 269 |
with gr.Column(scale=1):
|
| 270 |
+
i2i_width = gr.Slider(label="Ширина", maximum=2048, value=512, step=8)
|
| 271 |
+
i2i_height = gr.Slider(label="Высота", maximum=2048, value=512, step=8)
|
| 272 |
|
| 273 |
with gr.Column(scale=1):
|
| 274 |
+
i2i_batch_size = gr.Slider(label="Batch Size", maximum=10, value=1)
|
| 275 |
+
i2i_batch_count = gr.Slider(label="Batch Count", maximum=10, value=1)
|
| 276 |
|
| 277 |
+
i2i_cfg_scale = gr.Slider(label="CFG Scale(степень фантазии ии)", minimum=1, maximum=40, value=7, step=1)
|
| 278 |
+
i2i_denoising = gr.Slider(label="сила изменения фото", minimum=-0.1, maximum=1, value=0.7, step=0.1)
|
| 279 |
+
i2i_seed = gr.Number(label="Семя рандома ", value=-1)
|
| 280 |
|
| 281 |
with gr.Column(scale=2):
|
| 282 |
i2i_image_output = gr.Image(value="https://images.prodia.xyz/8ede1a7c-c0ee-4ded-987d-6ffed35fc477.png")
|
| 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=124)
|
| 287 |
|
| 288 |
with gr.Tab("PNG Info"):
|
| 289 |
def plaintext_to_html(text, classname=None):
|
|
|
|
| 324 |
width, height, cfg_scale],
|
| 325 |
concurrency_limit=64)
|
| 326 |
|
| 327 |
+
demo.queue(max_size=80, api_open=False).launch(max_threads=1024, show_api=False)
|