Spaces:
Running
on
Zero
Running
on
Zero
File size: 1,152 Bytes
332f3a6 304ca9b c7435a7 332f3a6 c7435a7 ab3ccf8 c7435a7 332f3a6 c7435a7 37becc8 332f3a6 c7435a7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
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) |