Update app.py
Browse files
app.py
CHANGED
|
@@ -76,7 +76,7 @@ class Prodia:
|
|
| 76 |
def image_to_base64(image):
|
| 77 |
# Convert the image to bytes
|
| 78 |
buffered = BytesIO()
|
| 79 |
-
image.save(buffered, format="
|
| 80 |
|
| 81 |
# Encode the bytes to base64
|
| 82 |
img_str = base64.b64encode(buffered.getvalue())
|
|
@@ -817,7 +817,7 @@ margin-bottom: 70px;
|
|
| 817 |
with gr.Blocks(css=css) as demo:
|
| 818 |
with gr.Row():
|
| 819 |
with gr.Accordion(label="Модель", open=False):
|
| 820 |
-
model = gr.Radio(interactive=True, value="
|
| 821 |
|
| 822 |
with gr.Tabs() as tabs:
|
| 823 |
|
|
@@ -832,12 +832,12 @@ with gr.Blocks(css=css) as demo:
|
|
| 832 |
|
| 833 |
with gr.Row():
|
| 834 |
with gr.Column(scale=1):
|
| 835 |
-
steps = gr.Slider(label="Sampling Steps", minimum=1, maximum=50, value=
|
| 836 |
|
| 837 |
with gr.Row():
|
| 838 |
with gr.Column(scale=1):
|
| 839 |
-
width = gr.Slider(label="Ширина", minimum=15, maximum=1024, value=
|
| 840 |
-
height = gr.Slider(label="Длина", minimum=15, maximum=1024, value=
|
| 841 |
|
| 842 |
with gr.Tab("Расширенные настройки"):
|
| 843 |
with gr.Row():
|
|
|
|
| 76 |
def image_to_base64(image):
|
| 77 |
# Convert the image to bytes
|
| 78 |
buffered = BytesIO()
|
| 79 |
+
image.save(buffered, format="WEBP") # You can change format to PNG if needed
|
| 80 |
|
| 81 |
# Encode the bytes to base64
|
| 82 |
img_str = base64.b64encode(buffered.getvalue())
|
|
|
|
| 817 |
with gr.Blocks(css=css) as demo:
|
| 818 |
with gr.Row():
|
| 819 |
with gr.Accordion(label="Модель", open=False):
|
| 820 |
+
model = gr.Radio(interactive=True, value="epicrealism_naturalSinRC1VAE.safetensors [90a4c676]", show_label=False, choices=prodia_client.list_models())
|
| 821 |
|
| 822 |
with gr.Tabs() as tabs:
|
| 823 |
|
|
|
|
| 832 |
|
| 833 |
with gr.Row():
|
| 834 |
with gr.Column(scale=1):
|
| 835 |
+
steps = gr.Slider(label="Sampling Steps", minimum=1, maximum=50, value=40, step=1)
|
| 836 |
|
| 837 |
with gr.Row():
|
| 838 |
with gr.Column(scale=1):
|
| 839 |
+
width = gr.Slider(label="Ширина", minimum=15, maximum=1024, value=1024, step=8)
|
| 840 |
+
height = gr.Slider(label="Длина", minimum=15, maximum=1024, value=1024, step=8)
|
| 841 |
|
| 842 |
with gr.Tab("Расширенные настройки"):
|
| 843 |
with gr.Row():
|