Spaces:
Running
on
Zero
Running
on
Zero
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) |