eienmojiki's picture
Update app.py
304ca9b verified
raw
history blame
1.15 kB
import os
import numpy as np
import gradio as gr
from utils.t2i import t2i_gen
MAX_SEED = np.iinfo(np.int32).max
MIN_IMAGE_SIZE = int(os.getenv("MIN_IMAGE_SIZE", "512"))
MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "2048"))
with gr.Blocks(
title="πŸͺ„ LayerDiffuse - Flux version β˜”",
theme="CultriX/gradio-theme"
) as demo:
gr.Markdown(
"""
# πŸͺ„ LayerDiffuse - Flux version β˜”
A Flux version implementation of LayerDiffuse ([LayerDiffuse](https://github.com/lllyasviel/LayerDiffuse))
"""
)
prompt = gr.Text(
label="Prompt",
info="Your prompt here",
placeholder="E.g: glass bottle, high quality"
)
with gr.Row:
width = gr.Slider(
label="Width",
minimum=MIN_IMAGE_SIZE,
maximum=MAX_IMAGE_SIZE,
step=32,
value=1024,
)
height = gr.Slider(
label="Height",
minimum=MIN_IMAGE_SIZE,
maximum=MAX_IMAGE_SIZE,
step=32,
value=1024,
)
if __name__ == "__main__":
demo.queue(max_size=20).launch(show_error=True)